Design a parking lot using object-oriented principles
- The parking lot can hold motorcycles, cars and vans
- The parking lot has small spots, medium spots and large spots
- A motorcycle can park in any spot
- A car can park in a medium spot or a large spot
- A van can park only in a large spot
- Only one motorcycle cah fit in a small spot
- Two motorcycles can fit in one medium spot
- Four motorcycles can fit in one large spot
- Only one car can fit in a medium spot
- Two cars can fit in a large spot
- Only one van can fit in a large spot
- Ability to add vehicles by type. Once added it should deduct accordingly from total slots
- Ability to tell us how many spots are remaining by vehicle type or by all types
- Ability to tell us if the lot is full
- You can add any classes or methods you would like to display your solution
- Your solution should be in TypeScript
- Display best practices using object oriented programming
- Submit your code by a Github repository
/pl-> Return parking lot as JSON./park ->Park a vehicle. Body: standard body (shown ahead)/available-> Chech for available spots for given vehicle. Body: standard body (shown ahead)/isFull-> Park a vehicle.
Standard body:
{
"vehicle": "car"
}Vehicle can be "motorcycle", "car" or "van"