Based on the requirements and use cases, identify the main objects of the system and analyze how they interact and relate to each other...
Main Objects of the system are:
Vehicle interface, it has 3 implementing classes bike, car, truck
vehicle has information like registration number
then we have a parkingspot interface with 3 implementations like small parking, medium parking, large parking, contains flag like occupied or free using boolean
We have a ticket interface that assigns a parking ticket on entry of vehicle containing timestamp, rate per hour etc
We have a parking class that has total number of floors, total number of parking per floor,
then we have a pricing strategy that takes parkingspot type to calculate pricing
For each class, define the attributes (data) it will hold and the methods (functions) that operate on the attributes. Ensure they align with the object's responsibilities and adhere to the principle of encapsulation. Write your code in the code editor below.
Explain design tradeoffs you considered. Check and explain whether your design adheres to SOLID principles. Explain how your design can handle changes in scale and whether it would be easy to extend with new functionalities. Identify areas for future improvement...