SOLVED:HW 2: Using the Unified Modeling Language

$50.00

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (7 votes)

The assignment is to create the appropriate UML diagrams for each of the problems listed. Some
problems may require more than one diagram.
You are encouraged to use modeling tools.
The following are some recommended modeling tools:
LucidChart
PlantUML
PlantUML tutorial
You can also install the PlantUML tool in your IDE using a plugin. For example, JetBrains offers the
PlantUML plugin
SequenceDiagram
Sequence Diagrams tutorial
For each problem, please submit a JPEG/PNG of the diagram. If you use PlantUML, SequenceDiagram, or any
other UML tool that uses code to generate the diagram, then please also submit the corresponding code used to
generate the diagram. For example, submit both a diagram picture file named my_diagram.jpeg. And if required,
submit the corresponding text file that contains code to generate the diagram, e.g. my_diagram.txt.
Problem 1: Represent a Business’s Customer
Produce a class diagram to capture the essence of the following objects:
1. A customer is someone who shops at stores. A customer has a name, billing address, a phone number, and a
wallet. A business may assign a unique ID to each customer. A customer’s wallet may have any number of
credit cards. A credit card has a type (AMEX, MC, Visa, Discover), a number that is unique, an expiraon
date, three or four digit code, and an issuing bank. A customer may have linked a bank account, which is
idenfied by a roung number and an account number. A customer has a unique user name and password.
Passwords must be at least eight (8) characters long.
Problem 2: Model Nelix Customers
Produce a class diagram to capture the essence of the following objects by extending the enes created in the
“Business’s customer” queson:
1. Customers have an age, which is derived from birthday or provided as a number.
2. Customers have a playlist of videos watched or are currently watching.
3. For each entry in the playlist, a pointer to where in the video the customer is presently is kept.
4. Customers may self‑idenfy favorites, either genres or specific tles.
5. Titles may be individual videos or series.
6. Titles have a name, a rang, a genre, a length, the names of the directors and actors, and
an idenfier of its type (high definion or standard definion)
Problem 3: Model Streaming Video
Produce a class diagram to capture the essence of the following objects:
1. A pixel has four properes:
red, green, blue, and intensity. A picture is an ‘l’ by ‘w’ collecon of pixels in
which ‘l’ means length and ‘w’ means width and in which the posion of any given pixel in the picture is
given as (l, w).
2. Audio is a collecon of encoded samples, where the encoding can be one of MP3, Vorbis, AAC or Opus.
MP3 is an ordered collecon of frames, with each frame being an MP3 header and MP3 data.
3. A video is a collecon of pictures and audio synchronized by me. Thus, video is sequencing through a
number of pictures (frames) at a given rate (meaning in plain speak, moving pictures are created by flipping
through 30 pictures a second) along with playing the audio samples that correspond to the same me
segment (meaning in plain speak, the audio track is flipping through the audio samples for the same second
as the video). A video comes in standard definion, high definion, blu‑ray, and ultra‑high definion (4K),
meaning the corresponding video is of a certain picture density (number of pixels).
Problem 4: Coffee Shop
Supply the appropriate diagrams for each part of the problem.
Part 1
Considering Use Case0 in the lecture notes, present use case diagrams from the customer’s and from the
barista’s perspecve. Suppose the coffee shop in Use Case0 wants to add food to its menu:
1. Starts when the customer approaches the counter and the cashier says “How may I help
you?”
2. The customer tells the cashier what she wants. The cashier acknowledges the item.
3. The cashier enters the item into the point‑of‑sale system (POS)
4. This dialogue connues unl the customer either stops talking or says “that’s it.”
5. The cashier then repeats the enre order.
6. If the order includes one or more drinks, the cashier gets a cup for each drink.
7. The cashier asks for the customer’s name and notes it on the order and on each cup.
8. The customer pays for the order
9. The cashier records the payment
10. If there are drinks that require the expresso machine, the cashier communicates the order details to the
barista. In parallel, if there are food items in the order, the cashier communicates the order details to the
food handler.
11. If there are drinks that do not require the expresso machine, the cashier prepares each of these drinks and
hands them to the customer.
12. The food handler prepares the food order. When each item is done, the food handler places the item on the
pick‑up
counter and calls out the type of food the item is.
13. The barista prepares the beverage order.
14. Upon compleon of the order, the barista places the beverages on the pick‑up counter and
calls the customer’s name
15. The customer picks up
the beverage and walks away.
Part 2
Extend the use case diagrams for the customer’s and cashier’s perspecve.
Part 3
Create a stac data model for the extended coffee shop example.
Part 4
Create a sequence diagram for the extended coffee shop example.
Problem 5: Model a Grocery
Store
Propose a UML informaon model to cover shopping at a grocery store. You can make it a plain vanilla store or
you can make it fancy like Whole Foods.
For scope, your model should cover everything needed to answer quesons about products, products on shelves
(which products are on which shelves), and product prices. In other words, your model should be able to answer
quesons that would enable a shopper to peruse shelves, pick products, and put products into a cart.
More details about the informaon the model should support:
1. Products may be food or non‑food items
2. Food products may be packaged or loose
3. All products have a price.
4. All products may be a sale item (discounted).
5. Loose products are sold by count or weight.
6. All packaged products have a UPC code.
7. All loose products have store code.
8. Food products are not taxed. Non food items are taxed (10%).
9. Customers may be known to the store. They may not be known. They are known through phone numbers.
10. Customers may have a wallet, which may have zero or more credit cards.
11. Customers may select which credit card to pay for a purchase. Customers may have a preferred credit card
(a default card).
12. Credit cards are composed of a cc number, expiraon date, user’s name, CVV, type (AMEX, MC, Visa,
Discover), and possibly a bank.
13. Customers may pay in cash.
14. Receipts contain informaon about day/me, customer, items purchased, taxaon, item categories (e.g.
dairy, produce, deli, packaged goods, dry goods), cashier number, register id, payment method.
15. Cashiers have names and ID numbers.
16. Cash registers have ID numbers.
17. Shelves can handle a fixed number of items based on the size of the items. Shelves are arranged into rows.
More than one shelf may be in a row. Rows have names (numbers). Shelves have names (numbers).
Your modeling should include behaviors for shopping and check‑out. Assume normal credit validaons during
check‑out. Check‑out generates a receipt, which can be saved for later data science work.