0% found this document useful (0 votes)
143 views

Design Phase

This document describes how an automated gas station filling system works. Drivers swipe their credit cards at the pump, which verifies the card with a credit company computer and establishes a fuel limit. The driver can then pump the required fuel. When fueling is complete, the driver's credit card account is debited for the cost of the fuel. If the card is invalid, it is returned before fuel is dispensed.

Uploaded by

Chai Jin Ying
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
143 views

Design Phase

This document describes how an automated gas station filling system works. Drivers swipe their credit cards at the pump, which verifies the card with a credit company computer and establishes a fuel limit. The driver can then pump the required fuel. When fueling is complete, the driver's credit card account is debited for the cost of the fuel. If the card is invalid, it is returned before fuel is dispensed.

Uploaded by

Chai Jin Ying
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

A filling station (gas station) is to be set up for fully automated operation.

Drivers swipe
their credit card through a reader connected to the pump; the card is verified
by communication with a credit company computer, and a fuel limit is established. The
driver may then take the fuel required. When fuel delivery is complete and the pump
hose is returned to its holster, the drivers credit card account is debited with the cost of
the fuel taken. The credit card is returned after debiting. If the card is invalid, the pump
returns it before fuel is dispensed.
Tips: Please refer to chapter 6 and 7 from Ian book to answer these questions.
1. Using the UML graphical notation for object classes, design the following object
classes identifying attributes and operations. Use your own experience to decide
on the attributes and operations that should be associated with the objects: A
telephone, A printer for a personal computer, a personal stereo system, A bank
account, A library catalogue.
2. Identify possible objects in the system below and develop an object-oriented
design for the system.

Question 1

Object
Pump

Attributes
Fuel dispensed

:Pump
Price

Car reader

swipeCard(g
as)

Operations
Activate

:
CardCompanyCompu

Deactivate

Hose status

Deliver fuel

Trigger status

Stock update

Fuel type
Card number

:
AutomatedGasSyste

verifyCard()

Read card

acknowledge
Card type
Check status
()
[isValid]
Card status

Process(gas)

Credit limit
Current fuel level

Fuel tank
Communication system
System controller

Print receipt
Add fuel

fuel_limit_establish(
Remove fuel
)
Number dialed
Send card number
fuel_taken()
Credit limit
Return card status
Card Numbercost_acknowledg

e()
debit_amoun
Max delivery t()
return_card() Price table
acknowledge
()
Fuel delivered
Card type

Price table

acknowledge
()

Fuel prices

[isValid]

Lookup
Amend price

fuel_dispensed()

Question 2

You might also like