Menu

Need Help Writing Progrm C Using Arrays Write Program Inputs Base Price Car Program Input Q43898250

I need help writing a progrm in C++ using arrays.

You are to write a program which inputs the base price of a car.Then, the program will input in a 2-letter code (a string) whichcorresponds to an option package. All the 2 letter codes will be inan array (string), along with the corresponding cost of the packagein a parallel array (doubles), and there is also another array withthe name of the package (string).

Your program first has to determine if the 2-letter code inputby the user is valid. You are required to use a loop to check theinput against each item in the optionPackageCodeArray. Begin withthe first item then “walk” down through the array. If the code doesNOT exist on the list, display an error message and stop. If thecode is valid, do some calculation and displaying. First, add thebase price to the package cost from the array and get a subtotal.Then, calculate 15% of the subtotal for taxes and fees and add thatto the subtotal for a final price. Display the final price and thefull name of the package from the last array, then stop.

Here is the data for the 3 parallel arrays:

OptionPackageCodeArrayPackageCostArrayPackageNameArrayBB1500.00BaseSP3250.00SportNP4575.00Intermediate levelHE7500.00LuxuryUC5220.00

User specified

Expert Answer


Answer to I need help writing a progrm in C++ using arrays. You are to write a program which inputs the base price of a car. Then,…

OR