Requirement
- Please issue your Lab Blog on CSDN.
- 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)
- Modeling must use professional tools.
- 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:
Audience. Who watches the anchor’s performance, and can interact with the anchor, and can also buy the merchant’s goods.
Anchor. Who is responsible for performing in the live studio, and arouse the interest of the audience.
Administrators. Who is responsible for managing the live broadcasting room and preventing the excessive behavior or words of the anchor or audience.
Merchant. Who communicates with the anchor and ask the anchor to help it advertise. After the audience buys goods, the merchant is responsible for delivering goods to the audience.
(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:
Use case name: audience purchases goods
Basic event flow:
1. The audience enters the live studio
2. Watch the anchor introduce the product
3. Interested in goods
4. add to cart
5. Fill in the address and other basic information and pay
6. Merchant deliver goods
7. The audience received the 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 the question.
Your Answer:
activity diagram:

sequence diagram:

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

(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:
JAVA code:
public class User {
private int account;
private String password;
private String userName;
public boolean register() {
// TODO - implement User.register
throw new UnsupportedOperationException();
}
public boolean login() {
// TODO - implement User.login
throw new UnsupportedOperationException();
}
public void enterLiveBroadcastingRoom() {
// TODO - implement User.enterLiveBroadcastingRoom
throw new UnsupportedOperationException();
}
/**
*
* @param String
*/
public void interaction(int String) {
// TODO - implement User.interaction
throw new UnsupportedOperationException();
}
}
public class Administrators extends User {
/**
*
* @param User
*/
public boolean Ban(int User) {
// TODO - implement Administrators.Ban
throw new UnsupportedOperationException();
}
}
public class Anchor extends User {
private int studioID;
public boolean startLive() {
// TODO - implement Anchor.startLive
throw new UnsupportedOperationException();
}
public void updateProductInformation() {
// TODO - implement Anchor.updateProductInformation
throw new UnsupportedOperationException();
}
}
public class Audience extends User {
private String receivingAddress;
private int telephoneNumber;
private String idNumber;
private String name;
public void shoppingCart() {
// TODO - implement Audience.shoppingCart
throw new UnsupportedOperationException();
}
public boolean payment() {
// TODO - implement Audience.payment
throw new UnsupportedOperationException();
}
}
public class Enterlive {
public int studioID;
public String Anchor;
public boolean whetherStartLive;
public Good[] good;
public void shoppingInformationOfLive() {
// TODO - implement Enterlive.shoppingInformationOfLive
throw new UnsupportedOperationException();
}
}
public class Good extends Anchor {
public int goodID;
public String goodName;
public double goodValue;
public image goodImage;
public int goodSales;
}
public class Loginwindow {
private int account;
private String password;
public boolean login() {
// TODO - implement Loginwindow.login
throw new UnsupportedOperationException();
}
}
public class Purchase {
private Good[] good;
private int[] number;
}
public class Registrationwindow {
private String userName;
private int account;
private String password;
public boolean register() {
// TODO - implement Registrationwindow.register
throw new UnsupportedOperationException();
}
}
| The Link Your Class | EE308 MIEC |
|---|---|
| The Link of Requirement of This Assignment | LAB 9 Object-oriented Modeling and Design with UML |
| The Aim of This Assignment | Master the writing method of UML |
| MU STU ID and FZU STU ID | 19103387_831902225 |
该博客详细阐述了一个综合的直播销售系统设计。系统涉及的参与者包括观众、主播、管理员和商家。观众可以观看直播并购买商品,主播负责展示商品,管理员管理直播室秩序,商家与主播合作并负责发货。系统的主要用例包括观众购买商品,通过顺序和活动图描绘了购物流程。此外,还提供了类图和状态图的部分代码框架。此设计旨在掌握UML的写作方法。
1万+

被折叠的 条评论
为什么被折叠?



