Question: Write the application AutomobileDemo that prompts a user for data for eight Automobile objects. The Automobile class includes the following auto - implemented properties: IdNumber
Write the application AutomobileDemo that prompts a user for data for eight Automobile objects.
The Automobile class includes the following autoimplemented properties:
IdNumber The ID number an int
Make The make a string
Year The year an int
Price The price a double
Include a default, empty constructor and a constructor that accept all of the above properties.
Override the ToString method to return all the details for an Automobile.
During data entry, reprompt the user if any ID number is a duplicate. Sort the objects in ID number order, and display all their data as well as a total of all their prices. For example if the output should be in the following format only two automobiles shown:
Automobile honda Price is $ Automobile Toyota Price is $ Total for all Automobiles is $
In order to prepend the $ to currency values, the program will need to use the CultureInfo.GetCultureInfo method. In order to do this, include the statement using System.Globalization; at the top of your program and format the output statements as follows: WriteLineThis is an example: value.ToStringC CultureInfo.GetCultureInfoenUS;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
