-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
28 lines (21 loc) · 900 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package main
import (
"VechicleRentalService/service"
"time"
)
func main() {
rentalService := &service.VehicleRental{}
rentalService.SetBookingStrategy("LowestRentalPriceStrategy")
rentalService.AddBranch("Vasanth Vihar")
rentalService.AddBranch("Cyber City")
rentalService.AllocatePrice("Vasanth Vihar", "Sedan", 100)
rentalService.AllocatePrice("Vasanth Vihar", "Hatchback", 80)
rentalService.AllocatePrice("Cyber City", "Sedan", 200)
rentalService.AllocatePrice("Cyber City", "Hatchback", 50)
rentalService.AddVehicle("DL 01 MR 9310", "Sedan", "Vasanth Vihar")
rentalService.AddVehicle("DL 01 MR 9311", "Sedan", "Cyber City")
rentalService.AddVehicle("DL 01 MR 9312", "Hatchback", "Cyber City")
rentalService.BookVehicle("Sedan", time.Now(), time.Now())
rentalService.BookVehicle("Sedan", time.Now(), time.Now())
rentalService.BookVehicle("Sedan", time.Now(), time.Now())
}