EE308_Lab9
-
| The Link Your Class | https://bbs.csdn.net/forums/MUEE308FZ |
|---|---|
| The Link of Requirement of This Assignment | https://bbs.csdn.net/topics/603386400 |
| The Aim of This Assignment | mprove the understanding of UML |
| MU STU ID and FZU STU ID | 19104987 831901324 |
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.
Your Answer:
Administrator:Maintaining system stability
user : use the live-streaming sale system close commodity display, consultation response, and shopping guide.
Anchor :use the live-streaming sale system to recommend goods
Merchants :use the live-streaming sale system to open their own live broadcast room, or employ professional anchors to recommend goods
(ii) Prepare a use case diagram for this system.
Your Answer:

(iii) Prepare a normal scenario for each use case. (i.e. describe each use case in words)
Your Answer:
Users log in to the system to view products, browse shopping guides, and consult relevant information. After the user sees the product they want to buy, they can check the product information and confirm whether to buy it or not. After selecting the purchase, they can receive the order information.
Administrators log in to the system for system maintenance.
Merchants first login system, can undertake the order management, in the system can manage their own goods, such as adding, modify or delete items goods, also can query the purchase order, and review the order details, merchants can also live on their own platform open to promote their own products to other users, can also hire other professional anchor to help promote sales.
Anchors first log in the system, open their own live broadcast room, to recommend goods
(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.
Your Answer:


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

Single Responsibility Principle (SRP): Every object should have a single responsibility, and that responsibility should be entirely encapsulated by the class.
Open-Closed Principle (OCP): Software entities should be open for extension, but closed for modification.
Interface Segregation Principle (ISP): Clients should not be forced to depend upon interfaces that they do not use.
Law of Demeter (LoD): Each unit should have only limited knowledge about other units: only units "closely" related to the current unit.
(vi) Prepare state diagrams for primary classes.
Your Answer:

(vii) Write the skeleton code corresponding to the class diagram in C++, Java, Python, or C#.
Your Answer:
.
#include
.
.
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();
.
.
};
.
.
.
.
相关推荐
EE-308 LAB4 final version.7z
这是本次实验的压缩包
《模式识别与数据挖掘》配套PPT课件
《模式识别与数据挖掘》配套PPT课件
科技成果转化项目进场交易前,评估备案环节需要准备哪些材料?_8.docx
科易网基于AI模型+行业大数据,在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,推出科技创新领域的AI+工具与数智化解决方案,推动科技创新与产业创新智能化发展。
人工智能通识教育(中职版)课程标准+PPT课件+部分素材+电子活页+在线考核
人工智能通识教育(中职版)课程标准+PPT课件+部分素材+电子活页+在线考核
跨境电商供应链管理(AIGC版)课件+教案+参考答案
跨境电商供应链管理(AIGC版)课件+教案+参考答案


