You are on page 1of 1

Cab Management

ola tannous | April 21, 2020

1
User
1
- userName // String
- password // String
1
- isDriver boolean // optional
Driver

+ setPassword (String): void


- static bookingFee: double []
+ setIsDriver (boolean): void// optional
- static mileCost double []
+ getUserName () : String
- static waitTimeCost double []
+ getPassword () : String
1 - minimumFee: double []
+ getIsDriver () : String //optional
- userName: String
- zipCode: int []
Customer - isAvailable: boolean
1 - balance: double
- carTypoe: int
+owns - name: String
// 1 for van, 2 for regular, 3 for luxury or you can do enum
1..* - address: String or Date
- dob String
card - card: Card + static setBookingFee (double []): void
- userName: String + static setMileCost (double []) : void
+ static setWaitTimeCost (double []) : void
+ static setMinimumFee( double []) : void
- cardNumber: int + setName (String): void + static getBookingFee () : double []
- name: String +setAddress (String): void + static getMileCost(): double []
- billingAddress: String +setDOB: (String): void + static getWaitTimeCost(): double []
- type: String +setCard (Card): void + static getMinimumFee(): double []
- expirationDate: String or Date +setUserName (String): void + userName: String
- cvv: int
+ setZipCode (int []) : void
- amount: double +requestRide(zipCode String, type + setIsAvailable (boolean): void
int ) + setBalance (double) : void
+ setCarTypoe (int) : void
+ getUserName (): String
Application
+setBillingAddress ( String): void + getZipCode () : int []
+ setExpirationDate (String): void + getIsAvailable (): boolean
+ setCVV (String): void userArry: User [] + getBalance (): double
+ setBillingAddress: (String) void driverArray: Driver [] + getCarTypoe(): int
+ setName (String) : void customer Array: Customer []
+ setAmount ( double) : void + requestPayment();
+ getName (): Sting + calculateRide (int waitTime, int mileage, boolean isRush,
+ main (String [] args): void tipAmount)
+ getType (): String
+ getAmount (): double + calculateTip (boolean userPercentage, double number) : double
+ getBillingAddress: (): String number)// this method allow user to enter if they want to user
+ getExpirationDate (): String percentage (usePercentage true and number woud be the
+ getCVV(): boolean percentage amount otherwise usePercentage is false an number
is the number to be added as a tip
you can create a method
addPurchase to charge the card or
use setter
An alternative way to add ride informaiton is to create ride
class that includes the fee, and calculateRIde method

You might also like