CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from...

38
CarRental Vratil, Hagara

Transcript of CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from...

Page 1: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

CarRental

Vratil, Hagara

Page 2: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Table of ContentsUse Case Diagram.................................................................................................................................4Book a Car...........................................................................................................................................13Registration...........................................................................................................................................16Analytical Class Diagram..................................................................................................................... 19Entity Relationship Diagram.................................................................................................................21Book a Car...........................................................................................................................................23Confirm Reservation.............................................................................................................................25Confirm Car Transport......................................................................................................................... 27Registration...........................................................................................................................................29Statistics............................................................................................................................................... 31Account.................................................................................................................................................33Class Diagram......................................................................................................................................34Deployment Diagram............................................................................................................................36Package Diagram.................................................................................................................................38

Page 3: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Table of FiguresUse Case Diagram.................................................................................................................................4Book a Car...........................................................................................................................................13Registration...........................................................................................................................................16Analytical Class Diagram..................................................................................................................... 19Entity Relationship Diagram.................................................................................................................21Book a Car...........................................................................................................................................23Confirm Reservation.............................................................................................................................25Confirm Car Transport......................................................................................................................... 27Registration...........................................................................................................................................29Statistics............................................................................................................................................... 31Account.................................................................................................................................................33Class Diagram......................................................................................................................................34Deployment Diagram............................................................................................................................36Package Diagram.................................................................................................................................38

Page 4: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Use Case Diagram

Use Case Diagram

System

Preregisteronline

Send em ailext ension point s

Book a car

Cancelbooking

Finish onlineregist rat ion

Register newcustom er

Approve cart ransport

Viewstat ist ics

Register car

UnregistercarManage users

Maintainsystem

1.1.2.2.3.3.

Verifycustom erident ity

Lookup car

Login intosystem

Logout fromsystem Send em ail

ext ension point s

Confirm booking

Lookupbooking

Send em ail

Unregistered Custom er

Agent

Manager

Technician

Preim ium Mem ber

Mem ber

< < Extend...

< < Extend...

< < Include...

< < Include...

< < Include...

< < Include...

< < Include...

< < Include...

< < Include...

Vis u a l Pa ra d ig m for UML Sta n d a rd Ed it ion (Ma s a ryk Un ive rs ity)

SummaryName Documentation

Member

Preimium Member

Unregistered Customer

Technician

Page 5: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Agent

Manager

Send email

Lookup booking

Confirm booking

Logout from system

Login into system

Lookup car

Verify customer identity

Non-functional requirements Non-functional requirements 1. System is easy to use after one hour of usage 2. System is available in multiple languages 3. User password is stored salted and hashed

Maintain system

Manage users

Unregister car

Register car

View statistics

Approve car transport

Register new customer

Finish online registration

Cancel booking

Book a car

Preregister online

System

Details

MemberPreimium MemberUnregistered CustomerTechnicianAgentManagerN/AN/A

Page 6: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Send emailUse Case Descriptions

Use Case ID Send email

Brief Description Sends email notification to email specified in target account

Primary Actors

Secondary Actors

Preconditions

Main Flow of Events

Alternative Flows

Post-conditions

Lookup bookingUse Case Descriptions

Use Case ID Lookup booking

Brief Description Lists all bookings, or returns a specific requested booking, if it exists inthe database

Primary Actors

Secondary Actors

Preconditions

Main Flow of Events

Alternative Flows

Post-conditions

Confirm bookingExtension PointsSend email

Use Case Descriptions

Use Case ID Confirm booking

Brief Description Confirms booking created by customer

Primary Actors Agent

Secondary Actors Member

Preconditions Agent is logged into the system Booking exists

Main Flow of Events 1. Use case begins when money booking deposit arrive to rental bankaccount 2. Agent is notified by system about new payment 3. INCLUDE(Lookup Booking) 4. IF payment is correct

Page 7: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

4.1 Agent confirms the booking 5 IF payment is not correct 5.1 Agent rejects the booking EXTENSION POINT(Send email) 6. System notifies the customer about booking change

Alternative Flows

Post-conditions Booking is confirmed or rejected

Logout from systemLogin into systemLookup car

Use Case Descriptions

Use Case ID Lookup car

Brief Description Returns list of all cars in the database, or a specific requested car, if itexists in the database

Primary Actors

Secondary Actors

Preconditions

Main Flow of Events

Alternative Flows

Post-conditions

Verify customer identityUse Case DescriptionsMain

Use Case ID Verify customer identity

Brief Description Agent verifies customer's ID and driving license and inserts it into thesystem

Primary Actors Agent

Secondary Actors

Preconditions

Main Flow of Events

Alternative Flows

Post-conditions

Non-functional requirementsMaintain system

Use Case Descriptions

Use Case ID Maintain system

Page 8: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Brief Description Provides technician with detailed information about system load,generated errors, etc.

Primary Actors

Secondary Actors

Preconditions

Main Flow of Events

Alternative Flows

Post-conditions

Manage usersUse Case Descriptions

Use Case ID Manage users

Brief Description Adds a means to add, remove and alter user accounts and manage theirprivileges

Primary Actors

Secondary Actors

Preconditions

Main Flow of Events

Alternative Flows

Post-conditions

Unregister carUse Case Descriptions

Use Case ID Unregister car

Brief Description When manager decides that a car should be solved, it is removed fromthe system so that no further bookings can be made for that car

Primary Actors Manager

Secondary Actors

Preconditions Manager is logged in, car exists in the system

Main Flow of Events 1. INCLUDE(Lookup car) 2. Manager marks car for deletion 3. IF car is booked 3.1 System refuses to unregister car from the system 4 IF car is not booked 4.1 Car is unregistered from the system, further bookings are notavailable

Alternative Flows

Post-conditions Car is removed from the system

Register carUse Case Descriptions

Page 9: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Use Case ID Register car

Brief Description When a new car is bought, it is added to the system

Primary Actors Manager

Secondary Actors

Preconditions

Main Flow of Events

Alternative Flows

Post-conditions

View statisticsUse Case Descriptions

Use Case ID View statistics

Brief Description Managers have access to overall statistics collected by the system

Primary Actors

Secondary Actors

Preconditions

Main Flow of Events

Alternative Flows

Post-conditions

Approve car transportUse Case Descriptions

Use Case ID Approve car transport

Brief Description When customer requests a car to be transported from a different rental,the request is enqueued for approval by the manager

Primary Actors Manager

Secondary Actors

Preconditions

Main Flow of Events

Alternative Flows

Post-conditions

Register new customerUse Case DescriptionsMain

Use Case ID Register new customer

Brief Description A new user account is created and customer's identity is verified

Page 10: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Primary Actors Agent

Secondary Actors

Preconditions

Main Flow of Events

Alternative Flows

Post-conditions

Finish online registrationUse Case DescriptionsMain

Use Case ID Finish online registration

Brief Description Confirming identity of customer pre-registered via the online form

Primary Actors Agent

Secondary Actors Unregistered Customer

Preconditions

Main Flow of Events

Alternative Flows

Post-conditions

Cancel bookingUse Case Descriptions

Use Case ID Cancel booking

Brief Description Customer cancels booking for a car

Primary Actors Member

Secondary Actors

Preconditions A booking exists

Main Flow of Events

Alternative Flows

Post-conditions

Book a carExtension PointsSend email

Use Case Descriptions

Use Case ID Book a car

Brief Description Customer chooses and books a car from the system

Primary Actors Member

Page 11: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Secondary Actors

Preconditions User is logged in

Main Flow of Events 1. INCLUDE(Lookup car) 2. User chooses a car 3. User chooses a rental to pick the car 4. User chooses date and duration of booking 5. IF car not available in selected rental in selected dates 5.1 IF car available in another rental 5.1.1 IF user requests car to be transported from another rental 5.1.1.1 Car transport request is created in system, pending manager'sapproval 6. A new unconfirmed booking is created in the system EXTENSION POINT(Send email) 5.1.1.2 Email about transport request is sent to the manager

Alternative Flows

Post-conditions New unconfirmed booking exists in the system

Preregister onlineUse Case DescriptionsMain

Use Case ID Preregister online

Brief Description Unregistered customer initiates registration via online form

Primary Actors Unregistered customer

Secondary Actors

Preconditions

Main Flow of Events

Alternative Flows

Post-conditions

System

Page 12: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

ChildrenName Documentation

Preregister online

Book a car

Cancel booking

Register new customer

Approve car transport

Verify customer identity

Maintain system

Lookup car

Login into system

Logout from system

Confirm booking

Lookup booking

View statistics

Register car

Unregister car

Manage users

Send email

Finish online registration

Page 13: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Activity Diagram

Book a Car

List allcars

Choosecar

Chooserental

Choose date

Choose durat ion

Create unconfirm edbooking

Choose newcar

Choose a newdate

Create t ransportrequest

List rentalswith car

available ongiven date

Chooserental

Is car available on selected date in selected rental

User wants to change car

Is car available in different rental

Should t ransport car from different rental?

Change date or car

[yes]

[yes]

[no]

[change date]

[change car]

[no]

[yes] [no]

[yes]

[no]

Vis u a l Pa ra d ig m for UML Sta n d a rd Ed it ion (Ma s a ryk Un ive rs ity)

SummaryName Documentation

List all cars

Choose car

Choose rental

Choose date

Choose duration

Is car available on selected date inselected rental

User wants to change car

Is car available in different rental

Should transport car from differentrental?

Change date or car

Page 14: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Choose a new date

List rentals with car available ongiven date

Choose rental

Create transport request

Create unconfirmed booking

Choose new car

Details

N/AList all carsChoose carN/AChoose rentalChoose dateChoose durationN/AN/AIs car available on selected date in selected

rentalUser wants to change carIs car available in different rentalShould transport car from different rental?Change date or car

Page 15: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Choose a new dateList rentals with car available on given dateChoose rentalCreate transport requestN/ACreate unconfirmed bookingN/AChoose new car

Page 16: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Activity Diagram

RegistrationCustom er

Show regist rat ion form

Input usernam e Input password Input em ail

Create tem poraryaccount

Agent

User com es torental

Create account fromtem porary account

Scan user ID and drivinglicense

Cancelregist rat ion

Confirmaccount

Verify ident ity

[ ident ity NOT OK] [ ident ity OK]

Vis u a l Pa ra d ig m for UML Sta n d a rd Ed it ion (Ma s a ryk Un ive rs ity)

SummaryName Documentation

Swimlane

Customer

Agent

Show registration form

Input email

Input password

Input username

Create temporary account

User comes to rental

Create account from temporaryaccount

Verify identity

Scan user ID and driving license

Confirm account

Cancel registration

Page 17: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Details

SwimlaneActivity PartitionsCustomer

Quality Score Fair

Quality Reason Problem Suggestion

Name does not contain glossary terms Define name as term in glossary

Contained Elements Name Documentation

N/A

N/A

Create temporary account

Input email

Input password

Input username

Show registration form

N/A

Agent

Quality Score Fair

Quality Reason Problem Suggestion

Name does not contain glossary terms Define name as term in glossary

Contained Elements Name Documentation

N/A

Confirm account

N/A

Cancel registration

Scan user ID and drivinglicense

Verify identity

Create account fromtemporary account

User comes to rental

N/AShow registration formN/AInput emailInput password

Page 18: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Input usernameN/ACreate temporary accountUser comes to rentalCreate account from temporary accountVerify identityScan user ID and driving licenseConfirm accountN/ACancel registrationN/A

Page 19: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Class Diagram

Analytical Class Diagram

-id : int = -1-m anufacturer : st ring-type : enum-color : st ring-regist rat ionPlate : st ring-engineCC : int-pricePerDay : int-fuelConsum pt ion : double-m axSpeed : int-num berOfSeats : int-reservedFrom : int-reservedUnt il : int-t runkSize : int-doorCount : int

Vehicle

-city : st ring

Rent al

-id : int = -1-firstNam e : st ring-lastNam e : st ring-em ail : st ring-password : st ring

+ createReservat ion(reservat ion : Reservat ion * ) : v...+ cancelReservat ion(ireservat ionId : int ) : void+ reservat ions() : list< Reservat ion*>

User

-id : int-from : int-unt il : int-price : int

+ cancel() : void+ confirm () : void+ reject () : void+ getPickupRental() : Rental *+ setPickupRental(pickupRental : Rental * ) : void+ getReturnRental() : Rental *+ setReturnRental(returnRental : Rental * ) : void

Reservat ion

Van

Passenger. . .

M ot orbike

-id : int-arrivalDate : int-approved : bool-rejected : bool-reason : st ring

+ approve()+ reject (reason : St ring)

Transport Request

Em ployee

+ registerNewMem ber()+ confirm PendingReservat ions()

Agent

Adm inist ra . . .

-isPrem ium-birthday : int

+ birthday() : int+ setBirthday(birthday : int ) : void

M em ber

+ vehicle(id : St ring) : Vehicle *+ findVehicle(criteria : St ring...+ addVehicle(vehicle : Vehicl...+ rem oveVehicle(id : St ring) ...+ vehicles() : list< Vehicle*>

VehicleRegist ry

+ reservat ion(id : int ) : Reservat ion *+ reservat ions(user : User * ) : list< Reservat ion*>+ reservat ions() : list< Reservat ion*>+ addReservat ion(reservat ion : Reservat ion * ) : void+ rem oveReservat ion(id : St ring) : void+ pendingTransportRequests() : list< Reservat ion*>

Reservat ionRegist ry+ user(id : int ) : User *+ addUser(user : User)+ rem oveUser(id : St ring)+ users() : list< User*>

UserRegist ry

1

0..*

1

0..*

*

1

1

1

1

0..1

1

1 *

1

1 *

1

0..*

*

1

1

1

has

has

blocks

has

belongs to

approve/reject

confirm /rej...

has

< < call> >

< < use...

has

< < use...

has

< < use...

has

return

pickup

Vis u a l Pa ra d ig m for UML Sta n d a rd Ed it ion (Ma s a ryk Un ive rs ity)

SummaryName Documentation

Rental

PassengerCar

TransportRequest

Vehicle

Employee

Van

Motorbike

Agent

User

Reservation

Member

Administrator

VehicleRegistry

UserRegistry

ReservationRegistry

Page 20: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Details

RentalPassengerCarTransportRequestVehicleEmployeeVanMotorbikeAgentUserReservationMemberAdministratorVehicleRegistryUserRegistryReservationRegistry

Page 21: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Entity Relationship Diagram

Entity Relationship DiagramuserId int eger(1 0 )

drivingLicence varchar(255)

personalId varchar(50)

nam e varchar(255)

address varchar(255)

m ail varchar(255)

role varchar(30)

valid t inyint (1)

User

reservat ionId int eger(1 0 )

userId integer(10)

vehicleId integer(10)

from date

unt il date

price integer(10)

confirm ed t inyint (1)

Reservat ion

vehicle Id int eger(1 0 )

typeId integer(10)

regist rat ionPlate varchar(20)

color varchar(255)

pricePerDay integer(10)

reservedFrom date

reservedUnt il date

hom eRentalId integer(10)

category t inyint (2)

doorCount integer(10)

t runkSize integer(10)

Vehicle

reservat ionId integer(10)

sourceRentalId integer(10)

dest inat ionRentalId integer(10)

arrivalDate date

approved t inyint (1)

rejected t inyint (1)

reason varchar(255)

TransportRequest

rent a lId int eger(1 0 )

city varchar(255)

m anagerId integer(10)

Rental

m anufact urerId int eger(1 0 )

nam e varchar(255)

Manufacturer

t ypeId int eger(1 0 )

m anufacturerId integer(10)

nam e varchar(255)

engineCC integer(10)

Type

Vis u a l Pa ra d ig m for UML Sta n d a rd Ed it ion (Ma s a ryk Un ive rs ity)

SummaryName Documentation

User

Reservation

Manufacturer

TransportRequest

Vehicle

Type

Rental

Details

UserReservationManufacturerTransportRequestVehicle

Page 22: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

TypeRental

Page 23: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Communication Diagram

Book a Car

: CarsManager

: Reservat ionManager : Reservat ion

: TransportRequest

1: listAvailableCars()

:Mem ber

2: createReservat ion(carId, from , to, pickupRental)

3: getCar(carId)

4: findCar(carId)

5: < < create> >

6: setBlockedRange(carId, from , to)

7 [vehicle.rental.id != pickupRental.id ] : < < create> >

Vis u a l Pa ra d ig m for UML Sta n d a rd Ed it ion (Ma s a ryk Un ive rs ity)

SummaryName Documentation

: Reservation

<<create>>

: TransportRequest

:Member

listAvailableCars()

: CarsManager

createReservation(carId, from, to,pickupRental)

: ReservationManager

getCar(carId)

findCar(carId)

<<create>>

setBlockedRange(carId, from, to)

Details

: Reservation<<create>> : TransportRequest:MemberlistAvailableCars()

Page 24: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

: CarsManagercreateReservation(carId, from, to,

pickupRental) : ReservationManagergetCar(carId)findCar(carId)<<create>>setBlockedRange(carId, from, to)

Page 25: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Communication Diagram

Confirm Reservation

: Reservat ionsManager

: Reservat ion: Em ailDispatcher

:Agent

1: confirm Reservat ion(reservat ionId)

2: findReservat ion(reservat ionId)

3 [ reservat ion != null ] : confirm ()

4: sendNot ificat ion(userId, Not ificat ionType::Reservat ionConfirm ed)

Vis u a l Pa ra d ig m for UML Sta n d a rd Ed it ion (Ma s a ryk Un ive rs ity)

SummaryName Documentation

: ReservationsManager

confirm()

: Reservation

:Agent

confirmReservation(reservationId)

findReservation(reservationId)

sendNotification(userId,NotificationType::ReservationConfirmed)

: EmailDispatcher

Details

: ReservationsManagerconfirm() : Reservation:AgentconfirmReservation(reservationId)findReservation(reservationId)

Page 26: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

sendNotification(userId,NotificationType::ReservationConfirmed)

: EmailDispatcher

Page 27: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Sequence Diagram

Confirm Car Transport

loop

[ forEach reservat ion in reservat ions]

opt

[canApprove]

[else]

t ransportRequest:

TransportRequest

:Em ailDispatche

r

reservat ion : Reservat ion:Reservat ionRegist r

yManager

4.1: sendNot ificat ion(reservat ion.user.id,...

2.1:...

2:...

3.1: sendNot ificat ion(reservat ion.user.id,...

4:...

3: approve()

1.1:...

1:...

Vis u a l Pa ra d ig m for UML Sta n d a rd Ed it ion (Ma s a ryk Un ive rs ity)

SummaryName Documentation

Manager

: ReservationRegistry

reservation : Reservation

transportRequest :TransportRequest

: EmailDispatcher

Operand5

Operand4

CombinedFragment3

Operand3

CombinedFragment2

Details

Manager : ReservationRegistryreservation : ReservationtransportRequest : TransportRequest

Page 28: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

: EmailDispatcherOperand5Operand4CombinedFragment3Operand3

ChildrenName Documentation

CombinedFragment3

CombinedFragment2

Page 29: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Sequence Diagram

Registration

opt

[else]

[user valid]

user : User

custom er

UserRegist ry

7.3:...

7.2: t rue

7.4: user.id

7.1: isValid()

7: addUser(user)

6:...

5:...

4:...

3:...

2:...

1:

7.5: error

Vis u a l Pa ra d ig m for UML Sta n d a rd Ed it ion (Ma s a ryk Un ive rs ity)

SummaryName Documentation

customer

user : User

UserRegistry

Operand

Operand2

CombinedFragment

Details

customeruser : UserUserRegistryOperand

Page 30: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Operand2CombinedFragment

Page 31: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Sequence Diagram

Statistics

loop

loop

[ for reservat ion in reservat ions]

[ forEach vehicle in vehicles]

: VehicleRegist ry vehicle : Vehicle :Reservat ionRegist r

y

reservat ion : Reservat ion: System

Manager

1.15:...

1.14:...

1.13:...

1.12: to

1.11: getTo()

1.10: from

1.9: getFrom ()

1.6:...

1.5:...

1.4: type

1.3:...

1.2: vehicles

1.8:...

1.1:...

1.7:...

1:...

Vis u a l Pa ra d ig m for UML Sta n d a rd Ed it ion (Ma s a ryk Un ive rs ity)

SummaryName Documentation

Manager

: System

: VehicleRegistry

vehicle : Vehicle

:ReservationRegistry

reservation :Reservation

Page 32: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Operand6

Operand8

CombinedFragment5

CombinedFragment4

Details

Manager : System : VehicleRegistryvehicle : Vehicle : ReservationRegistryreservation : ReservationOperand6Operand8CombinedFragment5CombinedFragment4

Page 33: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

State Machine Diagram

Account

rentCar(price) / totalSpending + = price /defer

ent ry / discount = 0.10exit / discount = 0.0

setNam e(nam e_) / nam e = nam e_ /defersetEm ail(em ail_) / em ail = em ail_ /defersetPassword(password_) / password = password_ /deferwhen em ailIsValid && !em ailInDb / accountValid = t rue /defer

setDriverLicenseId(id) / driverLicenseId = id /defersetPersonalId(id) / personalId = id /deferwhen driverLicenseIdValid && personalIdValid / preregist rat ionValid = t rue /defer

Mem ber

Prem ium Mem ber

Invalid Account

PreregisteredAccountregisterMem ber() [ ...

preregister()...

after(12 m onths) [ totalSpending < 50000] /... upgradeMem bership() [ totalSpending > = 50000] /...

Vis u a l Pa ra d ig m for UML Sta n d a rd Ed it ion (Ma s a ryk Un ive rs ity)

SummaryName Documentation

Invalid Account

PreregisteredAccount

Member

Premium Member

Details

N/AInvalid AccountPreregisteredAccountMemberPremium Member

RegionsName Documentation

discount = 0.10

discount = 0.0

N/A

Page 34: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Class Diagram

Class DiagramReservat ions

-city : st ring-m anager : User*

+ Rental()+ city() : st ring+ setCity(city : st ring) : void+ m anager() : User *+ setManager(m anager : User * ) : void

Rent al

Vehicles

-id : int = -1-m anufacturer : st ring-type : enum-color : st ring-regist rat ionPlate : st ring-engineCC : int-pricePerDay : int-fuelConsum pt ion : double-m axSpeed : int-num berOfSeats : int-reservedFrom : int-reservedUnt il : int-t runkSize : int-doorCount : int-hom eRental : Rental*

+ Vehicle()+ id() : int+ set Id(id : int ) : void+ m anufacturer() : st ring+ setManufacturer(m anufacturer : st ring) : void+ type() : st ring+ setType(type : st ring) : void+ color() : st ring+ setColor(color : st ring) : void+ regist rat ionPlate() : st ring+ setRegist rat ionPlate(regist rat ionPlane : st ring) : void+ engineCC() : int+ setEngineCC(engineCC : int ) : void+ pricePerDay() : int+ setPricePerDay(price : int ) : void+ fuelConsum pt ion() : double+ setFuelConsum pt ion(consum pt ion : double) : void+ m axSpeed() : int+ setMaxSpeed(m axSpeed : int ) : void+ num berOfSeats() : int+ setNum berOfSeatcs(num berOfSeats : int ) : void+ reservedFrom () : int+ setReservedFrom (reservedFrom : int ) : void+ reservedUnt il() : int+ setReservedUnt il(reservedUnt il : int ) : void+ t runkSize() : int+ setTrunkSize(t runkSize : int ) : void+ doorCount () : int+ setDoorCount (doorCount : int ) : void+ hom eRental() : Rental *+ setHom eRental(rental : Rental * ) : void

Vehicle

-id : int-from : int-unt il : int-price : int

+ cancel() : void+ confirm () : void+ reject () : void+ id() : int+ set Id(id : int ) : void+ from () : int+ setFrom (from : int ) : void+ unt il() : int+ setUnt il(unt il : int ) : void+ price() : int+ setPrice(price : int ) : void+ getPickupRental() : Rental *+ setPickupRental(pickupRental : Rental * ) : void+ getReturnRental() : Rental *+ setReturnRental(returnRental : Rental * ) : void+ t ransportRequest () : TransportRequest *+ setTransportRequest (t r : TransportRequest * )

Reservat ion

-instance : Reservat ionRegist ry*

+ instance() : Reservat ionRegist ry *+ reservat ion(id : int ) : Reservat ion *+ reservat ions(user : User * ) : list< Reservat ion*>+ reservat ions() : list< Reservat ion*>+ addReservat ion(reservat ion : Reservat ion * ) : void+ rem oveReservat ion(id : St ring) : void+ pendingTransportRequests() : list< Reservat ion*>-Reservat ionRegist ry()

Reservat ionRegist ry

-id : int-arrivalDate : int-approved : bool-rejected : bool-reason : st ring-reservat ion : Reservat ion*

+ TransportRequest (reservat ion : Reservat ion * )+ reservat ion() : Reservat ion *+ approve()+ reject (reason : St ring)+ id() : int+ set Id(id : int ) : void+ arrivalDate() : int+ setArrivalDate(arrivalDate : int ) : void+ approved() : bool+ setApproved(approved : bool) : void+ rejeced() : bool+ setRejected(rejected : bool) : void+ reason() : st ring+ setReason(reason : st ring)

Transport Request

Users

-instance : UserRegist ry*-users : list< User*>

+ instance() : UserRegist ry *+ user(id : int ) : User *+ addUser(user : User)+ rem oveUser(id : St ring)+ users() : list< User*>+ login(usernam e : st ring, password : st ring) : Us...+ logout (user : User * ) : bool-UserRegist ry()

UserRegist ry

Adm inist rat or

-isPrem ium-personalID-drivingLicenseID-birthday : int

+ Mem ber()+ isPrem ium () : bool+ set IsPrem ium (prem ium : bool)+ drivingLicenseId() : st ring+ setDrivingLicenseId(drivingLicense : st ring) : void+ personalId() : st ring+ setPersonalId(personalId : st ring) : void+ birthday() : int+ setBirthday(birthday : int ) : void

M em ber

-rental : Rental*-isManager : bool

+ Em ployee()+ rental() : Rental *+ isManager() : bool+ set IsManager(isManager : bool)

Em ployee

-id : int = -1-firstNam e : st ring-lastNam e : st ring-em ail : st ring-password : st ring-sessionId : st ring

+ User()+ createReservat ion(reservat ion : Reservat ion * ) : v...+ cancelReservat ion(ireservat ionId : int ) : void+ reservat ions() : list< Reservat ion*>+ id() : int+ set Id(id : int ) : void+ firstNam e() : st ring+ setFirstNam e(firstNam e : st ring) : void+ lastNam e() : st ring+ setLastNam e(lastNam e : st ring) : void+ em ail() : st ring+ setEm ail(em ail : st ring) : void+ password() : st ring+ setPassword(pwdHash : st ring) : void+ sessionId() : st ring+ setSessionId(sessionId : st ring) : void

User

-instance : VehicleRegist ry = 0-vehicles : list< Vehicle*>

+ instance() : VehicleRegist ry *+ vehicle(id : St ring) : Vehicle *+ findVehicle(criteria : St ring) : Vehicle *+ addVehicle(vehicle : Vehicle) : Vehicle *+ rem oveVehicle(id : St ring) : bool+ vehicles() : list< Vehicle*>-VehicleRegist ry()

VehicleRegist ry

1

0..*

1

1

1

1

1

1

*

0..1

1

1

1

0..*

1

0..*

1

0..*< < instant iate> >

< < call> >

< < call> >

< < call> >

returnRental

pickupRental

< < call> >

Vis u a l Pa ra d ig m for UML Sta n d a rd Ed it ion (Ma s a ryk Un ive rs ity)

SummaryName Documentation

Vehicles

Reservations

Users

ReservationRegistry

VehicleRegistry

UserRegistry

Administrator

Member

Reservation

Vehicle

User

Employee

TransportRequest

Rental

Details

Vehicles

Page 35: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

ReservationsUsersReservationRegistryVehicleRegistryUserRegistryAdministratorMemberReservationVehicleUserEmployeeTransportRequestRental

Page 36: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Deployment Diagram

Deployment Diagram

< < device> >Post greSQL Server

< < art ifact> >DB

< < device> >Applicat ionServer

< < com ponent> >Rent alSyst em Server

ApacheServer

< < art ifact> >PHP Front end

User

< < art ifact> >W eb brow ser

< < art ifact> >Client applicat ion

JSON-RPC/SSL

HTTP/SSL

JSON-RPC/SSL

SQL

Vis u a l Pa ra d ig m for UML Sta n d a rd Ed it ion (Ma s a ryk Un ive rs ity)

SummaryName Documentation

User

Web browser

Client application

ApacheServer

PHP Frontend

ApplicationServer

PostgreSQLServer

RentalSystemServer

DB

Page 37: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Details

UserWeb browserClient applicationApacheServerPHP FrontendApplicationServer

Resident ComponentsName Documentation

RentalSystemServer

PostgreSQL ServerRentalSystemServerDB

Page 38: CarRental · 2014. 1. 11. · Agent Manager Send email Lookup booking Confirm booking Logout from system Login into system Lookup car Verify customer identity Non-functional requirements

Package Diagram

Package Diagram

Users

VehiclesReservat ions

< < im port> >< < im port> >

Vis u a l Pa ra d ig m for UML Sta n d a rd Ed it ion (Ma s a ryk Un ive rs ity)

SummaryName Documentation

Users

Reservations

Vehicles

Details

UsersReservationsVehicles