This assignment requires you to write the necessary code to accomplish the following requirements in a single C# graphical user interface application: Your company has accepted a request to write a program for the Injurez Rental Car Company that specializes in renting classic and antique vehicles to the film industry. The program needs to keep track of the vehicles that they rent. Your supervisor has assigned you to write the program.
Create a class named Car that contains the following:
Properties
Normally the year would be a whole number, but some vehicles were actually manufactured in the middle of the year (i.e. 1970.5 Ford Falcon)
Create a subclass of Car named RentalCar that contain the following:
Properties
For the cost per day property, throw an exception if a negative number is passed to the property
Override the ToString method to display the license number of the vehicle.
Create a subclass of RentalCar named RentalCarAgreement that contain the following:
Property
Create a subclass of Exception named NegativeCostPerDayException that contain the following:
Property
Six read only text boxes with appropriate labels
Three buttons labeled as follows
Create a helper form that contains
Do not set the DialogResult to OK unless all required data has been provided and that data is valid.
Write code in the main form so that when the user clicks the Add button, a helper form object is instantiated. Show the helper form and, if it returns successful, get the data from the helper form to create a RentalCar object. Add the object to the list box.
Write code in the main form so that when the user clicks the Edit button, a helper form object is instantiated. Pass the data from the selected object to the helper form before you show the helper form. That way, when it appears the data will appear on the helper form so that the user can edit it. Show the helper form and, if it returns successful, get the data from the helper form and edi
Write code in the main form so that when the user clicks the Delete button, the selected rental car object is removed from the list box.
The program should follow the best programming practices (form centered on the screen, able to minimize but not maximize, form title, accept button, cancel, etc . . .)
Use the camel-case naming convention for all of the variables you create.