In: Computer Science
Q2) In order for a student to register for courses at UHV, a student need to login in to the system, search for classes, select certain classes and submit his/her request. Create a sequence diagram for that.
Q3) Create a UML class diagram for the following description, your UML should show associations with cardinality; generalizations if any. Each class should at least have two attributes. (hint: the easiest way to identify classes is to look for nouns)
E-gaming Store: An e gaming store is a store that does not have a physical presence for its products. The products are in three categories, Games, Consoles, and Accessories. A customer adds products to a basket. Once a customer checks out the basket it becomes an order.
Q2) Sequence Diagram:
Please find below the steps to create Sequence diagram:
Step 1: Identify Actor:
The system has actor STUDENT
Step 2: List objects:
Below are the objects to be available in the system:
1. UHVSystem: The interface with which the actor interacts
2. Classes SubSystem: That holds the available classes
3. registrationSystem: That holds the registration details
Step 3: Final Diagram:
-----------------------------------------------------
Q3) Class Diagram:
Please follow the below steps to create UML Class Diagram for the give system:
Step 1: List the classes along with attributes:
1. Product(productName, price, description)
2. Customer(customerName, address, phoneNumber)
3. Basket(basketID, isCheckedOut, orderDate, amount); when isCheckedOut is true, basket becomes an order and new basket is assigned to customer for new shopping.
Step 2: List relationship between the classes:
1. Customer has one or more Baskets but a basket belongs to one Customer only. This is association with 1:M cardinality.
2. Basket contains none or many Products and a product is added to none or many Baskets. It is an association with M:N cardinality.
3. Product has two sub types as below which will be shown as generalization relationship:
a) Game
b) Console
c) Accessories
Step 3: Create diagram: