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

MU STU ID and FZU STU ID

19104553_831902205

Directory

Background

Question1

Question2 

Question3 

Question4

Question5

Question6 

Question7 


Background

        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.


Question1

List some actors that interact with this system. Explain the relevance of each actor.

  • Merchant: People who give their products’ instructions to anchors and make anchors promote these products by using anchors’ tricks. 
  • Anchor: People who try their best to promote products and attract consumers to buy.
  • Consumer: People who watch the live-streaming broadcast, listen to the anchors and decide which products they will buy.
  • Live Broadcast platform company: People who check whether products or anchors are illegal and provide technical support for the live broadcast.

Question2 

Prepare a use case diagram for this system.


Question3 

Prepare a normal scenario for each use case.

  • Use case: Live-streaming Broadcast

Participant: Live Broadcast Platform Company, Anchor and Consumer

Description: A platform provided by live broadcast platform company will complete basic settings and make all the preparations. Anchor can begin their live-streaming broadcast by clicking on a button “start” on the platform and the broadcasting room will be ready. And anchor will begin their broadcast to promote products even if there are nobody watching. Consumer can watch the broadcast by clicking on a button “watch” and enter the broadcasting room to watch live-streaming broadcast.

  • Use case: Purchase Product

Participant: Live Broadcast Platform Company and Consumer

Description: Consumer can purchase products they want and pay money to the platform. Platform will receive these money, process orders and give the orders and money to merchant.

  • Use case: Process Orders

Participant: Live Broadcast Platform Company and Merchant

Description: The platform will receive the buying request of consumer and give merchant orders to make them prepare the delivery of product.

  • Use case: Regulate the Platform

Participant: Live Broadcast Platform Company, Anchor and Merchant

Description: Merchant should provide introductions of product and product itself for the live broadcast platform company before the broadcast to check whether they are illegal. The company will provide the broadcasting room for the merchant if the product is legal. The company will also supervise the actions of anchor to let them obey the rules.

  • Use case: Technical Support and System Maintenance

Participant: Live Broadcast Platform Company

Description: Live broadcast platform company should provide technical support and system maintenance for this live-streaming sale system. They should maintain this system daily and solve each problem users encounter. They can also provide some functions such as searching, recommending and paying which are sub-use cases.


Question4

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. 

  • Live-stream Broadcast:

Sequence diagram:

Activity diagram:

  • Regulate the Platform

Sequence diagram:


 

Activity diagram:

  • Technical Support and System Maintenance

Sequence diagram:

 Activity diagram:


Question5

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

Object-oriented principles applied in my design:

  • Single Responsibility Principle (SRP): Every object should have a single responsibility, and that responsibility should be entirely encapsulated by the class.
  • Law of Demeter (LoD): Each unit should have only limited knowledge about other units: only units "closely" related to the current unit.

Question6 

Prepare state diagrams for primary classes.

  • For Consumer:

  • For anchor: 


Question7 

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

  • Anchor.java

import java.util.*;

/**
 * 
 */
public class Anchor {

    /**
     * Default constructor
     */
    public Anchor() {
    }

    /**
     * 
     */
    public string name;

    /**
     * 
     */
    public string id;

    /**
     * 
     */
    public string qualification;




    /**
     * 
     */
    public void startLiveStreaming() {
        // TODO implement here
    }

    /**
     * 
     */
    public void applyForLiveStreaming() {
        // TODO implement here
    }

}
  •  Consumer.java

import java.util.*;

/**
 * 
 */
public class Consumer {

    /**
     * Default constructor
     */
    public Consumer() {
    }

    /**
     * 
     */
    public string name;

    /**
     * 
     */
    public string id;



    /**
     * 
     */
    public void watch() {
        // TODO implement here
    }

    /**
     * 
     */
    public void pay() {
        // TODO implement here
    }

    /**
     * 
     */
    public void searchForIntersest() {
        // TODO implement here
    }

}
  •  live_streamingSaleSystem.java

import java.util.*;

/**
 * 
 */
public class live_streamingSaleSystem {

    /**
     * Default constructor
     */
    public live_streamingSaleSystem() {
    }





    /**
     * 
     */
    public void checkQualificationOfAnchor() {
        // TODO implement here
    }

    /**
     * 
     */
    public void giveApprovalOfAnchor() {
        // TODO implement here
    }

}
  • liveBroadcastPlatformCompany.java 

import java.util.*;

/**
 * 
 */
public class liveBroadcastPlatformCompany {

    /**
     * Default constructor
     */
    public liveBroadcastPlatformCompany() {
    }

    /**
     * 
     */
    public string name;

    /**
     * 
     */
    public string brand;




    /**
     * 
     */
    public void superviseLiveStreaming() {
        // TODO implement here
    }

    /**
     * 
     */
    public void checkQualificationOfMerchant() {
        // TODO implement here
    }

    /**
     * 
     */
    public void lookForProblemsInSystem() {
        // TODO implement here
    }

    /**
     * 
     */
    public void solveProblems() {
        // TODO implement here
    }

    /**
     * 
     */
    public void modifyCodes() {
        // TODO implement here
    }

}
  • Merchant.java

import java.util.*;

/**
 * 
 */
public class Merchant {

    /**
     * Default constructor
     */
    public Merchant() {
    }

    /**
     * 
     */
    public string name;

    /**
     * 
     */
    public string brand;

    /**
     * 
     */
    public string product;





    /**
     * 
     */
    public void processOrders() {
        // TODO implement here
    }

    /**
     * 
     */
    public void deliverProducts() {
        // TODO implement here
    }

    /**
     * 
     */
    public void provideIntroductionOfProductAndProductItself() {
        // TODO implement here
    }

}

  • 0
    点赞
  • 0
    评论
  • 0
    收藏
  • 打赏
    打赏
  • 扫一扫,分享海报

参与评论 您还未登录,请先 登录 后发表或查看评论
©️2022 CSDN 皮肤主题:1024 设计师:我叫白小胖 返回首页

打赏作者

RamblerLan

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值