Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please add systempause and return 0 at the end thankyou. Problem Write a program to keep records and perform statistical analysis for a car sales

please add systempause and return 0 at the end thankyou. image text in transcribed
image text in transcribed
Problem Write a program to keep records and perform statistical analysis for a car sales agency. The information of each car contains the type of the vehicle, engine size, mileage, year, and price. Note that you cannot use while loops in the program. Program should accept information about 4 cars. We consider the program with two-dimensional array database", where each row is an individual car, while columns represent parameters of a vehicle. 1) Function O_Car_Discount_4 that takes mileage, year and price as an argument and returns adjusted price of a car after applying discounts as per the below table. (25 points) 2010 7% 100,000km >2010 and 2015 5% 12% >2015 3% 10% 20% 2) Function O_Print_Car_4that accepts a row of a database" array. Function must call o_Car_Discount_4 to calculate discounted price of a car. Function must print vehicle engine size, mileage, price and discounted price as per sample output. Function must convert vehicle type to user-friendly format per table below (25 points): Vehicle Type Displayed Text 10 Hatchback 20 Sedan 30 SUV Minivan 3) O_Lot_info_4 that takes database array and prints out (25 points) The lowest mileage car. The cheapest car The oldest car 40 4) Main function should perform the following tasks (25 points) Read the type of vehicle, engine se, mileage, year, and price from the user and stores itin database array, Prints list of cars from "database with year and price as per sample output. Ask the user which car he/she wants to see and call O Print_Car_4 with respective row. If user inputs 999, exit the program. Calls O_Lot_info.4 as shown in the sample output Shows student information as per sample output Page 2 of 3 Sample output: *** TOATLA CAR SALES AGENCY DATABASE *** ELCOME TO SYSTEM Please enter body type, engine size, mileage, year, and price of the car 01 >> 10 2.4 1000 2005 Please enter body type, engine size, mileage, year, the car #2 >> 20 3.0 2009 2020 000 Please enter body type, engine site, aleage, year, >> 18 4.5 5600 2011 4000 Wrong vehicle type, please try again! Please enter body type, engine size, sileage, year, and price the car 3 >> 30 4.5 5 2011 4000 Please enter body type, engine size, mileage, year, and price of the car >> 20 4.8 320000 2001 2000 cccccc General Information about cars on a lot: >>>>>> >>The lowest mileage on lot: 1000 >>The cheapest car on a lot: 1000 KD >>The oldest car on lot is year 2003 cccccc List of cars available on a lot: >>>>>> ID 1 2 3 4 Year 2005 2020 2011 Price 3000 KD 3000 KD 4000 KD 1600 D >>>>> Please enter 10 of car to view (or 999 to edt): 1 Car info: 2005 Hatchback Engine size 2.4L Mileage: 180000 KM Original Price: 3D. Discounted price 2000 Please enter 10 of car to view ( 999 to ext): 5 wrong iput! Please try paint Please enter of car to view (e to exit): Car Info: 2011 S Engine si 4.54 Mileage Seece Original Price: 400D Discounted price: 300D Pleuse, entert of an to view for to edit) 999 Student nama Abdullah Abdilla, 1012345, Section 1 Page 3 of 3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

How To Make A Database In Historical Studies

Authors: Tiago Luis Gil

1st Edition

3030782409, 978-3030782405

More Books

Students also viewed these Databases questions

Question

18. If you have power, then people will dislike and fear you.

Answered: 1 week ago