Sin t - PowerPoint PPT Presentation

About This Presentation
Title:

Sin t

Description:

custom operating system interrupts for the. coordinates and ... pressed (); pressed (); pressed (); pressed (); door- Switch. tripped (); locked (); inserted ... – PowerPoint PPT presentation

Number of Views:17
Avg rating:3.0/5.0
Slides: 17
Provided by: maricarm8
Category:
Tags: pressed | sin

less

Transcript and Presenter's Notes

Title: Sin t


1
1
1-
1-
service the
buy items from the
1
1
Mark I Vending Machine (MIVM) System application
2
(No Transcript)
3
(No Transcript)
4
4
CLIENT INTERFACE LAYER
handles and interprets custom operating system
interrupts for the
COORDINATION LAYER
coordinates and forwards appropriate inputs to the
MODEL LAYER
reuses application-independent classes from the
controls output devices and displays non-mode
information via the
displays mode information via the
SERVER INTERFACE LAYER
reuses application- independent classes from the
reuses application-information classes from the
reuses application-independent classes from the
FOUNDATION LAYER
5
5
CUSTOM OPERATING SYSTEM
customOperatingSystemInterrupts
event (aString)
CLIENT INTERFACE PACKAGE
tripped ()
door- Switch
pressed ()
pressed ()
pressed ()
inserted (aCoin)
inserted (aBill)
pressed ()
locked ()
refund- Button
bill- Validator
coin- Validator
gate
mode- Button
valid (aCoin)
selected (aLetter)
changeMode ()
valid (aBill)
refund ()
selected (anInteger)
currentModeProxy
doorLocked ()
COORDINATION PACKAGE
6
6
CLIENT INTERFACE PACKAGE
bill- Validator
coin- Validator
door
mode- Button
refund- Button
currentModeProxy
valid (aCoin)
selected (aLetter)
changeMode ()
doorLocked ()
selected (anInteger)
refund ()
valid (aBill)
?
COORDINATION PACKAGE
refund () reset () selected (anInteger) selecte
d (aLetter) valid (aMoney) throws
UnexpectedMoneyException
refund () reset () selected (anInteger) selecte
d (aLetter) valid (aMoney) throws
UnexpectedMoneyException
displayMessages () refund () reset () selected
(anInteger) selected (aLetter) valid (aMoney)
dispenseItemMode
displayHistoryMode
setPriceMode
serviceRepresentative
display (currentMode)
displayMessages () refund () reset () throws
CouldNotResetException selected
(anInteger) selected (aLetter) valid (aMoney)
displayTotalIncome () displayTotalItemsSold ()
reset () selected (anInteger) selected
(aLetter)
coinDispenserAssemblyLoaded ()
main- Display
SERVER INTERFACE PACKAGE
customer
ROLE PACKAGE
7
(No Transcript)
8
serviceRepresentative
8
customer- Messages
ROLE PACKAGE
service- Representative- Selection
customer- Credit
customer- Selection
getTotalIncome () getTotalItemsSold ()
isWarningNeeded ()
coinDispenserAssembly
itemDispenserAssembly
dispenseAt (aLocation) throws InvalidSelectionExce
ption priceAt (aLocation) throws InvalidSelection
Exception
priceAt (aLocation) throws InvalidSelectionExcepti
on priceAt (aLocation,aMoney) throws InvalidSelec
tionException
dispense (aMoney) throws CouldNotDispense- AllExce
ption inserted (aCoin)
loaded ()
isPractical (aPrice)
?
?
DISPENSER PACKAGE
dispense (aMoney) throws CouldNotDispenseAllExcept
ion isPractical (aPrice)
coinDispensingPolicy
dispense () throws InvalidSelectionException pric
e () throws InvalidSelectionException price
(aMoney) throws InvalidSelectionException
coinType () haveCoin () coinInserted ()
next () coinType () dispense () throws
CouldNotDispenseException
?
?
itemStepperMode
coinSolenoid
display (aLocation,aPrice) throws
NoItemDisplayException
step (360) throws NoMotorException
push () throws NoCoinException
itemDisplay
SERVER INTERFACE PACKAGE
9
currentModeProxy
9
serviceRepresentative
COORDINATION PACKAGE
customer
?
?
ROLE PACKAGE
DISPENSER PACKAGE
service- Representative- Selection
customer- Messages
customer- Selection
customOperatingSystemCalls
?
?
itemStepperMotor
display (aString)
step (360) throws NoMotorException
itemDisplay
display (aLocation,aPrice) throws
NoItemDisplayException
mainDisplay
push () throws NoCoinException
coinSolenoid
dispenseItemFrom (aPort) throws FailedException
itemDisplay (aString,aPort) throws
FailedException
dispenseCoinFrom (aPort) throws FailedException
mainDisplay (aString)
SERVER INTERFACE PACKAGE
10
(No Transcript)
11
11
MIVM Software
A Concurrently
Customer Inserts a Valid Bill
A and
Customer Inserts a Valid Coin
A end concurrently.
12
12
custom- OperatingSystem Interrupts
custom- Operating- SystemCalls
bill- Validator
current- ModeProxy
dispense- ItemMode
customer
customer- Credit
customer- Selection
main- Display
inserted (aBill)
valid (aBill)
valid (aBill)
?
valid (aBill)
add (aBill)
?
creditIncremented ()
?
A If itemSelected
Attempt to Dispense
A else
display ()
display (amount)
displayMain (amount)
A end if.
13
coin- Dispenser- Assembly
coin- Dispensing- Policy
13
customer- Credit
dispense (credit)
dispense (credit)
?
A If credit gt Money.none ()
Dispense Quarters
A end if.
B If credit gt Money.none ()
Dispense Dimes
B end if.
C If credit gt Money.none ()
Dispense Nickels
C end if.
Display Greeting
14
coin- Dispensing- Policy
customOperating- SystemCalls
aCoinDispenser
aCoinSolenoid
14
A For each coin dispenser in coinDispensers while
the amount to dispense is not less than a
quarter, loop
next ()
coinType ()
B If coinType () Coin.quarter (), then
C While amount to dispense is not less than a
quarter and can dispense, loop
dispense ()
dispenseCoinFrom (aPort)
push ()
?
D If a quarter was dispensed, then
FailedException!
D else
NoCoinException!
CouldNotDispenseException!
D end if.
C end loop.
B end if.
A end loop.
15
(No Transcript)
16
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com