EE308_LAB9

Wei_Liu_19103832 2021-11-16 20:13:04
The Link Your Class https://bbs.csdn.net/forums/MUEE308FZ
The Link of Requirement of This Assignment https://bbs.csdn.net/topics/603386400
MU STU ID and FZU STU ID19103832_831901226

Question

Live-streaming sale, through some Internet platforms, is a new way of service using live-streaming technology for close commodity display, consultation response, and shopping guide. Merchants can open their own live broadcast room, or employ professional anchors to recommend goods. At present, not only many celebrities flock into this field, but some big companies’ executives are also frequently involved. Please try to design a comprehensive live-streaming sale system.

(i) List some actors that interact with this system. Explain the relevance of each actor.

Actors:
The customer: the people who can go into the live broadcast room, buy goods, and evaluate the business.

The anthor: the people who open direct broadcast rooms to provide customers with commodity information, recommend customers to buy goods, delivery to customers.

Platform manager: the people who monitor the content of the broadcast room, monitor customer comments and maintain the platform.

(ii) Prepare a use case diagram for this system.

img

(iii) Prepare a normal scenario for each use case. (i.e. describe each use case in words)

The following is the description of the buyers logging in to the broadcast room:
(1) Anchors sell commodities;
(2) Buyers click on the list of goods;
(3) Buyers view the details of the product and related reviews, if they like to buy, otherwise they will view the next product or exit the product list;
(4) If the buyer purchases the goods;

  1. Payment;
  2. Check logistics;
  3. Confirm receipt of goods.

The following is the description of the situation of anchor creating a live broadcast room :
(1) The anchor establishes a live broadcast room;
(2) Release commodity information;
(3) Live broadcast to promote products.

The following is a description of the use case platform manager management background :
(1) The administrator builds the background;
(2) Display of products and comments;
(3) Order payment and tracking;
(4) Regular maintenance.

(iv)Prepare sequence diagrams or activity diagrams for primary scenarios. By the way, each scenario can be described by a sequence diagram or an activity diagram, but both diagrams must be used in this question.

Sequence diagram:

img

Activity diagram:

img

(v) Prepare a class diagram for this system. Explain which principles of object-oriented are applied in your design.

img

(vi) Prepare state diagrams for primary classes.

img

(vii) Write the skeleton code corresponding to the class diagram in C++, Java, Python, or C#.

#include <iostream>
using namespace std;
class commodity{
    public:
        string id;
        string name;
        int price;
        string classification;
};
class order:public commodity{
    public:
        string order_id;
        string data;
        string user_id;
        string com_id;
        double com_price;
        string sadto;
        void cancel();
        void modify();
        void look();
        virtual void buy();
        virtual void salereturn();
};
#include "order.h"
class Merchant{
    public:
        string id;
        string related_commodity;
        string numer_commodity;
        string related_live_room;
        void offer_commodity();
        void look_info();
        void choose_anchor();
        void deliver_goods() ;    
};
class customer{
    public:
        string id;
        string password: 
        int age;
        int balance;
        string address;
        void login();
           void modify_info();
        void look_info();
        void purchase();
        void watch_the_live_broadcast();
        void give_a_like();
        void collect();
        virtual void buy();
        virtual void salereturn();
        virtual void commit();
};
class live_online_room{
    public:
        string id;
        string name;
        string related_commodity;
        commodity com;
        void live streaming();
        void choose_commodity();
        void change_time();
        void look_info();
        virtual void commit();
    private:
        int balance;
        int address;
};
class Platform_manager{
    public:
        string id;
        string name;
        void login_admin();
        virtual void delete_commit();
};



...全文
136 回复 打赏 收藏 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

183

社区成员

发帖
与我相关
我的任务
社区描述
福州大学 梅努斯国际工程学院 软件工程 教学
软件工程 高校
社区管理员
  • 单步调试
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧