EE308 LAB 9 UML Exercises

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 use 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.
Your Answer:

Audience. Who watches the anchor’s performance, and can interact with the anchor, and can also buy the merchant’s goods.

Anchor. Who is responsible for performing in the live studio, and arouse the interest of the audience.

Administrators. Who is responsible for managing the live broadcasting room and preventing the excessive behavior or words of the anchor or audience.

Merchant. Who communicates with the anchor and ask the anchor to help it advertise. After the audience buys goods, the merchant is responsible for delivering goods to the audience.

(ii) Prepare a use case diagram for this system.
Your Answer:

请添加图片描述
(iii) Prepare a normal scenario for each use case. (i.e. describe each use case in words)
Your Answer:

Use case name: audience purchases goods

Basic event flow:
1. The audience enters the live studio
2. Watch the anchor introduce the product
3. Interested in goods
4. add to cart
5. Fill in the address and other basic information and pay
6. Merchant deliver goods
7. The audience received the goods

(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 the question.
Your Answer:

activity diagram:
请添加图片描述
sequence diagram:
请添加图片描述
(v) Prepare a class diagram for this system. Explain which principles of object-oriented are applied in your design.
Your Answer:

请添加图片描述
(vi) Prepare state diagrams for primary classes.
Your Answer:

请添加图片描述
(vii) Write the skeleton code corresponding to the class diagram in C++, Java, Python, or C#.
Your Answer:

JAVA code:

public class User {

	private int account;
	private String password;
	private String userName;

	public boolean register() {
		// TODO - implement User.register
		throw new UnsupportedOperationException();
	}

	public boolean login() {
		// TODO - implement User.login
		throw new UnsupportedOperationException();
	}

	public void enterLiveBroadcastingRoom() {
		// TODO - implement User.enterLiveBroadcastingRoom
		throw new UnsupportedOperationException();
	}

	/**
	 * 
	 * @param String
	 */
	public void interaction(int String) {
		// TODO - implement User.interaction
		throw new UnsupportedOperationException();
	}

}
public class Administrators extends User {

	/**
	 * 
	 * @param User
	 */
	public boolean Ban(int User) {
		// TODO - implement Administrators.Ban
		throw new UnsupportedOperationException();
	}

}
public class Anchor extends User {

	private int studioID;

	public boolean startLive() {
		// TODO - implement Anchor.startLive
		throw new UnsupportedOperationException();
	}

	public void updateProductInformation() {
		// TODO - implement Anchor.updateProductInformation
		throw new UnsupportedOperationException();
	}

}
public class Audience extends User {

	private String receivingAddress;
	private int telephoneNumber;
	private String idNumber;
	private String name;

	public void shoppingCart() {
		// TODO - implement Audience.shoppingCart
		throw new UnsupportedOperationException();
	}

	public boolean payment() {
		// TODO - implement Audience.payment
		throw new UnsupportedOperationException();
	}

}
public class Enterlive {

	public int studioID;
	public String Anchor;
	public boolean whetherStartLive;
	public Good[] good;

	public void shoppingInformationOfLive() {
		// TODO - implement Enterlive.shoppingInformationOfLive
		throw new UnsupportedOperationException();
	}

}
public class Good extends Anchor {

	public int goodID;
	public String goodName;
	public double goodValue;
	public image goodImage;
	public int goodSales;

}
public class Loginwindow {

	private int account;
	private String password;

	public boolean login() {
		// TODO - implement Loginwindow.login
		throw new UnsupportedOperationException();
	}

}
public class Purchase {

	private Good[] good;
	private int[] number;

}
public class Registrationwindow {

	private String userName;
	private int account;
	private String password;

	public boolean register() {
		// TODO - implement Registrationwindow.register
		throw new UnsupportedOperationException();
	}

}
The Link Your ClassEE308 MIEC
The Link of Requirement of This AssignmentLAB 9 Object-oriented Modeling and Design with UML
The Aim of This AssignmentMaster the writing method of UML
MU STU ID and FZU STU ID19103387_831902225
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值