Ask a question from expert

Ask now

IN2013 Object-Oriented Analysis and Design

4 Pages1073 Words204 Views
   

Object-Oriented Analysis and Design (IN2013)

   

Added on  2021-11-16

IN2013 Object-Oriented Analysis and Design

   

Object-Oriented Analysis and Design (IN2013)

   Added on 2021-11-16

BookmarkShareRelated Documents
Q1. Sequence Diagram
user GUI Controller
alt
[Communication exists]
Submit() ShoppingListID()
EasyLivingCloud
checkShoppingListID()
Return ShoppingListID
create Barcode 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.
IN2013 Object-Oriented  Analysis and Design_1

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:
o Communication exists, where if there is communication with the backend of the system,
the user can proceed to check shopping list existence.
o The 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.
o The 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
IN2013 Object-Oriented  Analysis and Design_2

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
IN2013 Object- Oriented Analysis and Design
|5
|756
|180