IV. Software Required

1. Visual Studio

2. Blackboard.

V. Assignment

1. Players:

  • You: A freelance engineer who just developed an efficient fuel cell vehicle
  • The Simpsons: stunt drivers who can be cheaply paid in donuts.

2. Plot:

  • To take advantage of the rising cost of producing fuel cells you as a supplier of a new breed of efficient vehicles teamed up with our favorite stunt drivers from the Simpsons to test different vehicles being used by the Halo families (Elites / Humans / Brutes / Covenant / Jackals ) involved in the Halo conflict.
  • You need to determine which vehicle uses the most fuel so that you can make your sales pitch to the species/family using that vehicle.
  • You are to write a simple program that asks the Simpsons for input after they test drive the vehicles then processes their input and output a result summary describing the efficiency of the vehicles tested.

3. Create Windows Form:

  • Create a windows form similar to the one in this handout. The form will keep track of all the tests performed by each driver
  • To test your program enter the test data in the form
    • a. Enter the data for the test (test number and test date)
    • b. Enter the Inventor Info (Your First Name, Last Name)
    • c. Enter the Driver Info (Pick a driver from the list, this should automatically load the driver information in the other boxes, and picture)
    • d. Enter the vehicle test information (Pick a vehicle from the Combobox, Enter the start and end mileage, End the start and end fuel cell reading )
  • The Process button processes the data in the form and the result from the tests is displayed in the RESULTS area
  • The Clear button clears the whole form and restores it back to its original state
  • The All Tests button displays a summary of all the tests in a separate window.

4. Program Logic:

  • Use start Mileage and End Mileage to calculate miles travelled
  • Use the Start Fuel and End Fuel to calculate fuel cells consumed
  • Use the cost of $22.00 per fuel cell for your calculations to determine the cost of the trip (Fuel Cells Consumed * Cost Per Fuel Cell)
  • The MPFC is calculated by using the following formula (Number of Miles Travelled / Fuel Cells Consumed)
  • The Clear button clears the whole form and restores it back to its original state
  • The All Tests button displays a summary of all the tests in a separate window.
  • Compute the Cost of Fuel for the Trip
  • Compute the MPFC rating of the car. Use the table below
    • MPFC is less than 200 then the rating is Guzzler
    • MPFC is Between 200 and 300 then the rating is Economical
    • MPFC is More than 300 MPFC then the rating is Amazing!!
    • Hint: use an if statement and test the condition

5. Test Data

  • 1 test per each driver, Test Numbers: 1, 2, 3 , 4
  • Each driver will test drive all 4 cars
  • Date use current date
  • Fuel Cell Cost: $22.00 per cell
  • Driver Info see image.
  • Data Info For Bart Simpson use the following test data. For each one of the other drivers increment the end mileage values by 10%, 20%, 30% see image.

1. Validation

  • Text entries should not be blank
  • Numeric entries should be positive integers without decimal points
  • Date entries should be dates
  • Formatting of output should be correct (currency format when necessary)
  • All validation has to be done when the user clicks on the Process Button
  • If errors are found display a message with all the errors listed in a messagebox

Sample Main Form: see image.

Sample Summary Form: see image.

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.