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 | UML drawing |
Name | Yuwei,Jiang |
MU STU ID and FZU STU ID | 19105134_831901109 |
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.
Anchor: The person who advertises goods for sale using livestream.
Customers: The person who want to buy things that they want through livestream.
Backstage Crew: The person who is responsible for viewing background order data and deliverying goods.
Room Management: The person who is responsible for supervising whether the anchors have illegal behaviors and customers comments regulation etc.
(ii) Prepare a use case diagram for this system.
(iii) Prepare a normal scenario for each use case. (i.e. describe each use case in words)
(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.
(v) Prepare a class diagram for this system. Explain which principles of object-oriented are applied in your design.
(vi) Prepare state diagrams for primary classes.
** (vii) Write the skeleton code corresponding to the class diagram in C++, Java, Python, or C#.**
public class ConcreteUser{
public int id;
protected String passWord;
protected String address;
protected int phone;
public String name;
ConcreteUser(){
}
ConcreteUser(int id,String passWord,String address,int phone,String name){
}
public void changePassWord(String str) {
}
public void changePhone(String str) {
}
public void changeAddress(String str) {
}
}
public class Customer extends ConcreteUser{
public ArrayList <Goods> purchased = new ArrayList<Goods>();
public void purchase(Goods g) {
}
public void refund(Goods g) {
}
}
public class Merchant extends ConcreteUser{
public ArrayList <Goods> ownedGoods = new ArrayList<Goods>();
public void newGoods(Goods g) {
}
public void modifyGoods(Goods g) {
}
public void deleteGoods(Goods g) {
}
}
public class Anchor extends ConcreteUser{
public ArrayList <Goods> promoteSale = new ArrayList<Goods>();
public void nextGoods() {
}
public void modifyGoods(Goods g) {
}
public void deleteGoods(Goods g) {
}
}
public class Goods{
public double price;
public String name;
public double count;
public int quantity;
Goods(){
}
Goods(double price,String name,double count,int quantity){
}
public void changePrice(double price) {
}
public void changeName(String str) {
}
public void changeCount(double count) {
}
public void addQuantity(int number) {
}
public void decreaseQuantity(int number) {
}
作业不要发问答来提问,请自己实现作业。