Presentation is loading. Please wait.

Presentation is loading. Please wait.

Software Models for a Toll Gate System

Similar presentations


Presentation on theme: "Software Models for a Toll Gate System"— Presentation transcript:

1 Software Models for a Toll Gate System
COP 4331 and EEL4884 OO Processes for Software Development © Dr. David A. Workman School of EE and Computer Science University of Central Florida February 10, 2009

2 Use Case Diagram February 10, 2009 (c) Dr. David A. Workman
A Toll Gate Pay By Epass «includes» Epass Vehicles Post Transaction Pick Up Cash Receipts «includes» State Toll Road TPS Armored Currier Service «includes» Pay By Cash Cash Vehicles February 10, 2009 (c) Dr. David A. Workman

3 Use Case Specification: Pay by Cash
Cash Vehicles 1: Request Toll Fee 2: Accept Payment 3a: Payment Rejected 3b: Return Change & Receipt Toll Clerk Gate Exit Lane 6b: Pass Through Rejected Vehicle Return Lane 4a: Return Through 4b: Signal Go 5b: Flash Go Stop/Go Light February 10, 2009 (c) Dr. David A. Workman

4 Analysis Model Specification: Pay by Cash
2g: Tansaction ACK 1: Request Toll Fee 2d: Produce Receipt Toll Clerk Cash Vehicles 2a: Accept Payment 2c: Enter Transaction 2f: Transmit Cash Transaction 3a: Payment Rejected POS Terminal State TPS 4b: Signal Go 2b: Deposit Payment & Remove Change 3b: Return Change & Receipt 2e: Create 5b: Flash Go Stop/Go Light Cash Transaction 6b: Pass Through Gate Exit Lane Cash Drawer 4a: Return Through Rejected Vehicle Return Lane February 10, 2009 (c) Dr. David A. Workman

5 Analysis Model: Class Diagram
Transaction GateId: Text Location: Address YYMMDD: Date HHMMSS: Time TPS There are three Instances of this class: Approaching, Rejected, Cleared * VehicleContainer Cash Transaction Payment: Money Change: Money Epass Transaction EpassId: Account Currier Transaction DriverId: Employee TruckId: PlateNo Amount: Money * CashRegister Drawer: Money Vehicle VehicleId: PlateNo Receipt GateId: Text Location: Address YYMMDD: Date HHMMSS: Time TollPaid: Money 1 ArmoredTruck DriverId: Employee Amount: Money EpassVehicle EpassId: Account CashVehicle Cash: Money TollRecord: Receipt 1 February 10, 2009 (c) Dr. David A. Workman

6 Analysis Model: Communication Diagram
:EpassVehicle 3a: Get Vehicle Id TPS 6a: Send Epass Tansaction Process Epass Vehicles Approaching: VehicleContainer Transaction 2a: Serve Epass Vehicle 1: remove next vehicle 8c: Send Currier Tansaction 4a: Create Epass Transaction 5a: Add Cleared EpassVehicle 6c: Create Currier Transaction Manage Approaching Vehicles Transaction Cleared: VehicleContainer 7c: Add Currier Process Courier 7b-2: Create CashTransaction 9b-2: Add Cleared Cash Vehicle 2b: Serve Cash Vehicle 2c: Serve Currier 10b-2: Send CashTansaction Process Cash Vehicles 5b-1: Add Rejected Cash Vehicle 5c: Transfer Cash Rejected: VehicleContainer 3c: remove daily cash receipts 4b-2: deposit payment 4c:Get Currier Info 3b: Request Payment 6b-2: Return Change 5b-2: Remove Change :CashVehicle 4b-1: Return Insufficient Payment CashRegister Currier: ArmoredTruck 8b-2: Return Receipt February 10, 2009 (c) Dr. David A. Workman

7 Analysis Sequence Diagram: Pay by Cash
:CashVehicle Toll Clerk CashDrawer POS TPS Pay Toll Fee (Amount) Cash Payment Enter Transaction Amount Deposit Payment :CashTransaction Remove Change create Transmit Transaction Return receipt Return Change Light Return Receipt Signal "GO" "GO!" February 10, 2009 (c) Dr. David A. Workman

8 Design Model: Class Diagram
Transaction -GateId: Text -Location: Address -YYMMDD: Date -HHMMSS: Time Cash Payment: Money Change: Money Epass EpassId: Account Currier DriverId: Employee TruckId: PlateNo Amount: Money TPS: ostream * +getGateId() +getLocation() +Extract() +Insert() +operator>> +operator<< #Get() #Put() CashRegister Drawer: Money +Deposit( Money) +Remove(Money) Transaction is an abstract Class. GateId and Location are static data, hard coded at load time. The constructor for this class sets Date and Time via calls to system library functions. Money Sign: char Dollars: short Cents: short +operator-() +operator+(Money) +operator-(Money) +operator<(Money) +operator>(Money) +operator==(Money) +operator<=(Money) +operator>=(Money) +operator<<(Money&) +operator>>(Money&) +getDollars() +getCents() +getSign() February 10, 2009 (c) Dr. David A. Workman

9 Design Model: Manage Approaching Vehicles
Open Approaching Vehicle Stream Extract Next Vehicle Dispatch to Process Epass Vehicles Dispatch to Process Cash Dispatch to Process Currier [No more Vehicles] [type=EpassVehicle] [type=CashVehicle] [type=Currier] Close February 10, 2009 (c) Dr. David A. Workman


Download ppt "Software Models for a Toll Gate System"

Similar presentations


Ads by Google