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 AssignmentUML drawing
NameYuwei,Jiang
MU STU ID and FZU STU ID19105134_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.

img

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

  1. Login: Users can login the livestream system
  2. Order goods: Customers can order goods they want through this
  3. Watch livestream: Customers can see the livestream
  4. Consult customer service: Customer can ask the questions about goods to customer service people
  5. Start livestream: Anchor can start livesreaming through this
  6. Share sale link of goods: Anchor can share the order link of goods
  7. Viewing background order data: Backstage crew can see the exact order data of the livestream each time
  8. Deliverying goods: Deliver ordered goods
  9. Supervising anchors behaviors: See whether the anchors have illegal behaviours
  10. Close Broadcast Room: If the anchors have illegal behaviours, the management can close the broadcast room

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

img

(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) {

        }

作业不要发问答来提问,请自己实现作业。