LAB 9 Object-oriented Modeling and Design with UML

weixin_46091852 2021-11-16 19:25:37
The Link Your Classhttps://bbs.csdn.net/forums/MUEE308FZ
The Link of Requirement of This Assignmenthttps://bbs.csdn.net/topics/603389875
The Aim of This AssignmentImprove the understanding of UML
MU STU ID and FZU STU ID19104154_831901227

 

  1. Please issue your Lab Blog on CSDN.
  2. The Link of your blog of this lab and This Lab Sheet (This Word File) must be submitted to Moodle, or you will lose the score of this Lab. (VERY IMPORTANT: You should submit TWO things)
  3. Modeling must be done using professional tools.
  4. You should EXPLAIN your diagrams in words if necessary.

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:

Customer:The person who buy products.

Merchant: The person who sell products.

Anchors: The person who promoting products.

Platform: The person who provide live streaming platform.


(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:

Platform offers live streaming platform.

Merchants perform merchandise management, customer management, order management, returns processing and login. In the merchandise management, including put the goods on the shelves, modify goods and delete goods.

Customers perform shopping cart management, returned goods, payment and login. In the shopping cart management, including add goods to your shopping cart, modify your shopping cart goods, delete goods in your shopping cart and submit your order.

Anchors introducing the products and promoting products.


 (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:

  1. Single Responsibility principle: In the case of a class, there should be only one cause that causes it to change.
  2. Composite Reuse Principle:It requires that when reusing software, it is implemented using association relationships such as combination or aggregation as far as possible first, and inheritance relationships are considered second.

 (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:

class Customers{
	private:
		string Customer_Address;
		string Customer_Name;
		string Customer_Telephone;
		string Customer_Password;
		void Add_to_cart();
		void Payment();
	public:
		void Watching_Alive();
};
class Customers_Shopping_cart{
	private:
		int Cart_Quantity;
		float Final_Price;
	public:
		string Products_ID;
};
class Order{
	private:
		void Get_total();
		void Get_address();
		void Get_quantity();
};
class Products{
	public:
		void Products_Name();
		void Products_Size();
		void Products_Style();
		void Products_Quantity();
		void Products_Price();
};
class Merchants{
	public:
		void Merchandise_sold(); 
	private:
		void Return_processing();
		void Deliver_goods();
		void Handle_orders();		
};
class Anchors{
	public:
		void Live_Streaming();
		void Recommended_products();
};

 

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

183

社区成员

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

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