Answered step by step
Verified Expert Solution
Question
1 Approved Answer
?I only need the IPO Chart done, please thanks. 1) Consider the following computer programming problem In one o the Bar er sample programs, we
?I only need the IPO Chart done, please thanks.
1) Consider the following computer programming problem In one o the Bar er sample programs, we did?car pnce calculator w hich used e se s tements to take a number of options and oompute otel price ere we nl do something in a similar ver but w th 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) which corresponds to an option package All the 2 letter codes will be in an array (string), along with the corresponding cost of the package in a parallel array (doubles), and there is also ancther array with the name of the package (string). Here is the data for the 3 parallel amays: SP NP HE UC 1500.00 3250.00 4575.00 7500.00 5220.00 Intermediate level Luxury User specified Your program first has to determine if the 2-letter code input by the user is valid. You are required to use a loop to check the input against each item in the optionPackageCodeAray. Degin with the first item then "walk down through the array. If the code does NOT exist on the list, display an error message and stop. If the code is valid, do some calculation and displaying. First, add the base price to the package cost from the array and get a subtotal. Then calculate 15% of the subtotal tor taxes and toes and add that to the subtotal tor a final pnceDisplay the firal price and the full name ot the package from the last array, then stop. You MUST define and use parallel arrays or you will get 0 points for this assignment You MUST use a loop and search to find if the code that was input matches an option package oode in the array or you will get 0 points for this assignrment. UJse doubles for ALL costs Include dollar signs with your prompts and outputs and 2 decimal places for cents Keep the input prompts simple do not show all the possible choices when prompting the user, for example Remember, if a wrong code is entered the program will catch and report that Do not use functions, just have one main () tor the whole program. You will find thal there are examples in your book and in this course thal cen be of help wilh this task Test your code. As an example, if we enter 34000 as the base price, and a code of HE, we should see price and "Don't forget to #includeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started