EE308 Lab9

Key_Board_ 2021-11-16 23:43:36
The Link Your Classhttps://bbs.csdn.net/forums/MUEE308FZ
The Link of Requirement of This Assignmenthttps://bbs.csdn.net/topics/603386400
The Aim of This AssignmentImprove the understanding and use of UML
MU STU ID and FZU STU ID<19105665_831902229>

Requirement

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.

My Answer:

Anchor:The person who responsible for introducing and selling products

Customers:The person who wants to purchase the product.

Merchant:The person who responsible for providing goods 

Adminstrator:The person who responsible for checking whether there are any violations of laws and regulations in the broadcast room

 

------------------------------------------------------

II. Prepare a use case diagram for this system.

My Answer:

------------------------------------------------------

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

Name:Browse BroadcastRoom

Description:

1.every actor can browse the BroadcastRoom

 

Name:Manage BroadcastRoom

Description:

1.Only anchor and administrator can manage the BroadcastRoom

2.The adminsitrator can manage speech (ban illegal speech users) and control the live broadcast room (shut down live broadcast room)

3.Anchor can manage speech (ban illegal speech users) and do some activity

 

Name:Browse information of merchandise

Description:

1.every actor can browse the information of merchandise

 

Name:Change information of merchandise

Description:

Only merchant can change information of merchandise

Merchant can increase, decrease the goods and change the price of goods, etc

------------------------------------------------------

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.

My Answer:

The scenario where a user places an order

 The Scenario of user login:

 

------------------------------------------------------

V. Prepare a class diagram for this system. Explain which principles of object-oriented are applied in your design.

My Answer:

  1. Liskov Substitution Principle, LSP
  2. Interface Segregation Principle, ISP

------------------------------------------------------

VI. Prepare state diagrams for primary classes.

 

------------------------------------------------------

VII.Write the skeleton code corresponding to the class diagram in C++, Java, Python, or C#.

I ues Java and the code is generated from the class diagram.

import java.util.;

public class Adminstrator extends User {

    /

      Default constructor

     /

    public Adminstrator() {

    }

 

    private void Username;

    private void Browse the broadcast room() {

        // TODO implement here

    }

    private void Manage the broadcast room() {

        // TODO implement here

    }

 

 

    private void Viewing Product Information() {

        // TODO implement here

    }

 

}

 

import java.util.;

 

public class Anchor extends User {

 

    public Anchor() {

    }

    private void ID;

    private void Star rating;

    private void Browse the broadcast room() {

        // TODO implement here

    }

    private void Manage the broadcast room() {

        // TODO implement here

    }

}

 

 

import java.util.;

 

public class Customer extends User {

 

    /

      Default constructor

     /

    public Customer() {

    }

 

    private void Shipping address;

    private void Browse the broadcast room() {

        // TODO implement here

    }

    private void Viewing Product Information() {

        // TODO implement here

    }

    public void The shopping cart() {

        // TODO implement here

    }

    public void Payment() {

        // TODO implement here

    }

 

}

 

import java.util.;

 

public class Manage the broadcast room {

    public Manage the broadcast room() {

    }

    public void Ban illegal users() {

        // TODO implement here

    }

 

}

 

 

import java.util.;

 

 

 

public class Merchant extends User {

 

    public Merchant() {

    }

    private void ID;

    private void credibility;

    private void Browse the broadcast room() {

        // TODO implement here

    }

    private void Viewing Product Information() {

        // TODO implement here

    }

    private void Update product information() {

        // TODO implement here

    }

 

}

 

 

import java.util.;

 

public class Payment window {

    public Payment window() {

    }

    public void The order number;

    public void Pay the amount;

    public void pay() {

        // TODO implement here

    }

 

}

 

 

import java.util.;

 

public class Registration window {

    public Registration window() {

    }

    public void account;

    public void password;

    public void username;

 

   

    public void registered() {

        // TODO implement here

    }

 

}

 

import java.util.;

 

public class Shopping cart window {

 

    public Shopping cart window() {

    }

    public void The order number;

    public void number;

    public void Add shopping cart() {

        // TODO implement here

    }

    public void Change shopping cart() {

        // TODO implement here

    }

    public void Delete shopping cart() {

        // TODO implement here

    }

    public void Operation4() {

        // TODO implement here

    }

}

 

 

import java.util.;

public class The order {

    public The order() {

    }

    public void The order number;

    public void Commodity information;

    public void The number of the commodity;

    public void The consignee;

    public void The order time;

    public void The order amount;

    public void The order status;

    public void Payment records;

 

}

 

 

 

import java.util.;

public class Update product information {

    public Update product information() {

    }

    public void Increase the commodity() {

        // TODO implement here

    }

    public void Reduce the goods() {

        // TODO implement here

    }

    public void Change of commodity price() {

        // TODO implement here

    }

 

}

 

 

import java.util.;

public class User login window {

    public User login window() {

    }

    public void account;

    public void passwo;

    public void login() {

        // TODO implement here

    }

 

}

 

 

import java.util.;

 

public class User {

    public User() {

    }

    public void account;

    public void Anchor;

    public void Customer;

 

    public void Merchant;

    public void Adminstrator;

    public void password;    private void login() {

        // TODO implement here

    }

 

}

 OK,I have to go to bed,see u next time~

 

 

 

 

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

183

社区成员

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

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