Question: C + + 1 0 . 5 B Using the Automobile class you created Chapter 1 0 , Programming Exercise 5 A as a base,
CB Using the Automobile class you created Chapter Programming Exercise A as a base, derive a FinancedAutomobile class that contains all the data of an Automobile, plus the following field:
AmtFinanced The amount financed a double
Override the parent class ToString method to include the child classs additional data.
Create a program named AutomobileDemo that contains an array of four FinancedAutomobile objects. Prompt the user for all the necessary data, and do not allow duplicate ID numbers and do not allow the amount financed to be greater than the price of the automobile.
Sort all the records in ID number order and display them with a total price for all FinancedAutomobiles and a total amount financed. For example, the output should be in the following format:
Summary: FinancedAutomobile Honda Price is $ Amount financed $ FinancedAutomobile Honda Price is $ Amount financed $ FinancedAutomobile Toyota Price is $ Amount financed $ FinancedAutomobile Honda Price is $ Amount financed $ Total for all Automobiles is $ Total financed all Automobiles is $
info 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
