2005 targil 1- vending machine 1 the problem חברה רוצה לפתח מכונה אוטומטית...

11
2005 Targil 1- Vending Machine 1 The problem תתתתתתתת תתתתת תתתת תתתת תתתת( תתתתת תתתתתתVending Machine ) תתתת תתתת"ת. תתתתת תתתתתת, תתתת תתתתת תת תתתת תתתתת תת( Customer תתתת תתתתתת. תתתת) תתתת תתתתתת תתתתתת:

Upload: daniel-gill

Post on 27-Mar-2015

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 2005 Targil 1- Vending Machine 1 The problem חברה רוצה לפתח מכונה אוטומטית למכירת שתייה (Vending Machine) לשוק בארה"ב. הציור המצורף,

2005 Targil 1- Vending Machine 1

The problem

 

אוטומטית מכונה לפתח רוצה חברה ( שתייה לשוק Vending Machineלמכירת )

בארה"ב. הציור המצורף, מתאר את נקודת ( הלקוח של לגבי Customerהמבט )

המערכת. להלן תאור תכונות המערכת:

Page 2: 2005 Targil 1- Vending Machine 1 The problem חברה רוצה לפתח מכונה אוטומטית למכירת שתייה (Vending Machine) לשוק בארה"ב. הציור המצורף,

2005 Targil 1- Vending Machine 2

VM Characteristics1. Accept nickels, dimes and quarters from customers. Any other coins are to be

treated as slugs and returned to the customer.

2. Check each coin to make sure it is not a slug. This is to be done by validating the size and weight of each coin.

3. Initiate payment computations only after detecting a valid coin. The system is to be difficult for people to trick.

4. Accept product selection from the customer.

5. Check to see whether the selected product is available in the dispenser. If not available, return coins and notify customer.

6. A variety of products which will change from time to time shall be offered. The product prices should be changeable.

7. Return the customer payment on request if he/she decides not to make a selection.

8. Dispense the product if payment conditions are fulfilled and product is available.

9. Return correct change to customer.

10. Disable product selection after the product is dispensed and until the next validated coin is received.

11. Make deposited coins available for change together with initial set of coins.

Page 3: 2005 Targil 1- Vending Machine 1 The problem חברה רוצה לפתח מכונה אוטומטית למכירת שתייה (Vending Machine) לשוק בארה"ב. הציור המצורף,

2005 Targil 1- Vending Machine 3

VM - Customer View

MoneySlot

ProductSelector

CoinsReturn

Customer Message

Customer Approval

Return Money

Vending Machine -Customer view

Page 4: 2005 Targil 1- Vending Machine 1 The problem חברה רוצה לפתח מכונה אוטומטית למכירת שתייה (Vending Machine) לשוק בארה"ב. הציור המצורף,

2005 Targil 1- Vending Machine 4

VM - Operator ViewCoins

Products

EmbeddedComputer

Display

Keyboard

MechanicalSubsystem

Vending Machine -Operator view

Page 5: 2005 Targil 1- Vending Machine 1 The problem חברה רוצה לפתח מכונה אוטומטית למכירת שתייה (Vending Machine) לשוק בארה"ב. הציור המצורף,

2005 Targil 1- Vending Machine 5

VM – Context diagram

Vending Machine

System

Op

erat

or

Cu

sto

mer

Op

erat

or

Cu

sto

mer

Objects

Customer selection

Products in

Coins in

Database information in

Slugs

Returned coins

Product

Database information out

Coins outBIT information in

BIT status

Page 6: 2005 Targil 1- Vending Machine 1 The problem חברה רוצה לפתח מכונה אוטומטית למכירת שתייה (Vending Machine) לשוק בארה"ב. הציור המצורף,

2005 Targil 1- Vending Machine 6

VM – DFD-0 (Vending machine system) Vending Machine

System

VendProduct

1

MaintainMachine

2

Op

erat

or

Cu

sto

mer

Op

erat

or

Cu

sto

mer

Objects

Customer selection

Products in

Coins in

Database information in

Slugs

Returned coins

Product

Database information out

Coins outBIT information in

BIT status

Page 7: 2005 Targil 1- Vending Machine 1 The problem חברה רוצה לפתח מכונה אוטומטית למכירת שתייה (Vending Machine) לשוק בארה"ב. הציור המצורף,

2005 Targil 1- Vending Machine 7

VM – DFD-1 (Vend product)

Get customerpayments

1.1

Slugs

Coins

Inserted

coinsExtractedcoins

DispenseChange

1.2

Returned coins

Validatepayment

1.3

Payment

Chang

e du

eProducts

Price data Get product

Price1.4

Price

Get validselection

1.5

Customer selection

Dispenseproduct

1.6

Prod

uct d

ata

Valid selection

Product

Objects

Price table

Page 8: 2005 Targil 1- Vending Machine 1 The problem חברה רוצה לפתח מכונה אוטומטית למכירת שתייה (Vending Machine) לשוק בארה"ב. הציור המצורף,

2005 Targil 1- Vending Machine 8

VM – DFD-1.1 (Get customer payment)

Validatecoins1.1.1

Slugs

Coinparameters

ClearPayment

1.1.2

Accumulatepayment

1.1.3

Held coins

AccumulateCoins1.1.4

DepositCoins1.1.5

Inserted coins

Object

Coins value

Custom

e

coins

Payment

Page 9: 2005 Targil 1- Vending Machine 1 The problem חברה רוצה לפתח מכונה אוטומטית למכירת שתייה (Vending Machine) לשוק בארה"ב. הציור המצורף,

2005 Targil 1- Vending Machine 9

VM – PSPEC-1.1.1 – 1.1.5 Pspec 1.1.1: Validate coins• Examine OBJECT to see if it matches any set of COIN PARAMETERS

- If so: Accept OBJECT as COIN

- Else: Return OBJECT as SLUG

Pspec 1.1.2: Clear payment• Issue PAYMENT = 0

Pspec 1.1.3: Accumulate payment• Add COIN VALUE to PAYMENT

Pspec 1.1.4: Accumulate coins• Examine if HELD COINS .LE. HOLD CAPACITY then:

- If so: Return COIN as SLUGS

- Else: Add COIN to HELD COINS

Pspec 1.1.5: Deposit coins• Transfer HELD COINS to COINS

Page 10: 2005 Targil 1- Vending Machine 1 The problem חברה רוצה לפתח מכונה אוטומטית למכירת שתייה (Vending Machine) לשוק בארה"ב. הציור המצורף,

2005 Targil 1- Vending Machine 10

VM – Dictionary Sample

TermDefinition

Coins{Quarters, Dimes, Nickels}

Customer selection

{Soda, Candy, Gum, Cracker}

Objects{Coins, Slugs}

BIT statusBuilt-In-Test status results {OK, NOT-OK}, {Status}

Status = {Computer, Keyboard, Display, Coins,

Products, Mechanical}

Database information out

Display (reflect) “database information in”

Page 11: 2005 Targil 1- Vending Machine 1 The problem חברה רוצה לפתח מכונה אוטומטית למכירת שתייה (Vending Machine) לשוק בארה"ב. הציור המצורף,

2005 Targil 1- Vending Machine 11