The Link Your Class | |
The Link of Requirement of This Assignment | |
MU STU ID and FZU STU ID | 19104553_831902205 |
Directory
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
}
}