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

  • year
  • make
  • model
  • number of doors

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

  • style
  • cost per day
  • license number

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

  • number of days

Create a subclass of Exception named NegativeCostPerDayException that contain the following:

Property

  • That warns users that "The cost per day can not be less than zero."
  • Create a main form that contains
  • A list box.

Six read only text boxes with appropriate labels

  • Year
  • Model
  • License Number
  • Cost Per Day
  • Style
  • Number of days

Three buttons labeled as follows

  • Add
  • Edit
  • Delete

Create a helper form that contains

  • Controls that allow the user to enter in vehicle year
  • Controls that allow the user to enter in make
  • Controls that allow the user to enter in model
  • Controls that allow the user to enter in number of doors
  • Controls that allow the user to enter in a license number (at least 1 but not more than 7 upper case characters/numbers only)
  • Controls that allow the user to enter in cost per day
  • Controls to select a car style (compact, standard or luxury)
  • Controls for number of days (1 through 7)
  • An OK button
  • A Cancel button

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.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.