Limited-time offer! Save up to 50% Off | Solutions starting at $6 each  

IN2013 Object-Oriented Analysis and Design

Added on - 16 Nov 2021

Trusted by +2 million users,
1000+ happy students everyday
Showing pages 1 to 2 of 4 pages
Q1. Sequence Diagram
userGUIController
alt
[Communication exists]
Submit()ShoppingListID()
EasyLivingCloud
checkShoppingListID()
Return ShoppingListID
createBarcode Getway
gateway
scanBarcode()
(barcode)
alt
[Barcode Match?]
SetSession()
records
loop
[Item In Memory]
AddSession()
AddShoppingList()
Records
loop
[For no item matching barcode]updateShoppingList()
clearMemory()
ShoppingList found
BarcodeMismatch
[communication not made]
Done()Done()
RetrieveRecordCount()
Item Not Found

The diagram illustrates how a user creates and updates a shopping list before discarding or
submitting it. Four loops and alternatives are involved to take care of iterations of the program. A
gateway is introduced to manage communication between the cloud and the controller. The user exits
cloud after submitting the shopping list.

Q1 Analysis Class Diagram
Supermarket
AutoPreferences
-name
+SetFavorite()
-branch
-address
-DayTime
-dayWeek
+addSupermarket()
Item
Controller
+scanBarcode
+withdrawItem
+addItem
+adjustItem()
+sendOrder()
+editorder()
+setThreshhold()
+addNotification()
-barcode
-description
-itemName
-itemNumber
-qty
ShoppingList
-id
-Status
-createdDate
-SubmittedDate
-DeliveredDate
+addItem()
+retrieveDate()
+setSubmitted()
+setDelivered()
+removeItem()
Timer
-whenEvent
+setWhen
SensorControls
-internalTemperature
+adjustAirFlow()
+activateAlarm()
+is90secDoorOpen()
+isDoorOpen()
BarcodeReader
+scan()
-email
-deliveryTime
DeliveryDay
-uRL
-PaymentURL
-authenticationToken
Notifications
-text
+retrieveText()
GUIgetway
-data
+addItem()
+withdrawItem()
+editOrder()
+adjustTemp()
+sendOrder()
+setThreshhold()
+addUser()
+removeUser()
+addEngineer()
+removeEngineer()
+retrieveNotifications()
Engineer
-phoneNumber
-emailAddress
+retrieveData()
FridgeItem
-DateItemAdded
-stockReorderThreshold
+adjustQty()
+adjustThreshold
LCDGateWay
+turnOn()
+turnOff()
MobileAppGateWay
+connect()
Report
-startDate
-endDate
-content
+generate()
+view()
+store()
+email()ItemConsumed
+generate()
-item
AllItemsConsumed
+generate()
Itemsinfridge
+generate()
create
uses
reads
contains
User
-userName
-password
-paymentDetails
-address
+retrieveDetails
create
-memberName
-memberName
communicates with

Explanations
The sequence diagram has three loops:
oCommunication exists, where if there is communication with the backend of the system,
the user can proceed to check shopping list existence.
oThe barcode match, for every existing shopping list, the user will add a barcode of an
item. If the barcode does not exist, the user checks from cloud information.
oThe user updates shopping list for every item that matches the barcode searched. If the
barcode is not in the list, it is checked from cloud data. This repeats until the user has
input all items.

When the user is done updating the shopping list, he can chose to submit the list to cloud and
then discard it from memory of the SXfridge or leave it for later updates.
Q2
desklib-logo
You’re reading a preview
Preview Documents

To View Complete Document

Click the button to download
Subscribe to our plans

Download This Document