Practical 6: Vehicle Tollgate Management System
Mark: 100
Section 1: Base Vehicle Class
Create an abstract Vehicle class with the following properties:
• VehicleNumber (string): Holds the unique vehicle registration number.
• VehicleType (string): Holds the type of the vehicle (e.g., car, truck, bus).
• OwnerName (string): Holds the name of the vehicle owner.
Section 2: Car Class
Create a Car class that inherits from the Vehicle class. It should have these additional
properties:
• NumberOfPassengers (int): Holds the number of passengers in the car.
• TollFee (decimal): Holds the toll fee for the car.
Create a form that allows the user to enter values for the properties, save them, and display the
saved data.
Section 3: Truck Class
Create a Truck class that inherits from the Vehicle class. It should have these additional
properties:
• LoadCapacity (double): Holds the load capacity of the truck in tons.
• TollFee (decimal): Holds the toll fee for the truck.
Create a form to input, save, and display the details of a truck.
Section 4: Bus Class
Create a Bus class that inherits from Vehicle. It should include the following additional
properties:
• NumberOfSeats (int): Holds the total number of seats in the bus.
• TollFee (decimal): Holds the toll fee for the bus.
Create a form to input, save, and display the details of a bus.
Section 5: User Interface
Create the following form as part of the User Interface and implement the necessary navigation
to allow a user to move from one form to another and back.
• A main form that allows a user to select the kind of vehicle a user wants to create.
• Create separate forms to create and display each vehicle
Use the tree diagram below as a guide for your interface navigation design. Please note that
there is no UI required for abstract classes.
Main
Form
Truck
Car Form Bus Form
Form
Additional Instructions
• All solutions should be in one project.
• All classes must be in separate .cs files saved in the same class library named
VehiclesLibrary.
• Create a form that allows navigation between the different forms of the application.
• Submit a PDF with screenshots showing the application in action.
• Submit a zipped file with the entire Visual Studio project.
• The practical is marked in the lab.
Marking Rubric: 100 Marks
Criteria Weight Description
Vehicle and Derived 30 Correct implementation of all required classes with
Classes Implementation marks appropriate inheritance, properties, and methods.
Form Functionality for Car 10 Form allows input, saving, and displaying of Car
marks data.
Form Functionality for 10 Form allows input, saving, and displaying of Truck
Truck marks data.
Form Functionality for Bus 10 Form allows input, saving, and displaying of Bus
marks data.
Form Functionality for 10 Form allows input, saving, and displaying of
Main Form marks TollGateOperator data.
Navigation Between 10 User can navigate between forms without issues.
Forms marks
Code Structure and 10 Code is well-structured with appropriate use of
Organization marks object-oriented programming principles
(inheritance, abstraction).
User Interface Design 10 The forms are well-designed, user-friendly, and
marks intuitive.
Bonus: Advanced Features 10 Extra marks for implementing additional
marks functionality, such as validation or reports.