Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need it Urgently, Please Help LQUESTION 2: PROBLEM SOLVING [10 marks) Mode Auto Dealer is a used car business owned by Mr. Ali. He employs

Need it Urgently, Please Helpimage text in transcribed

LQUESTION 2: PROBLEM SOLVING [10 marks) Mode Auto Dealer is a used car business owned by Mr. Ali. He employs you to develop a program that will calculate the sales discount to be applied to a vehicle, based on its year of manufacture and type. The discount is extracted from a two-dimensional table as in Table 1 below: Table 1 Discount Percentage Year of manufacture Small Medium Luxury 1 2012 2013 2014 0.05 0.03 0.01 2 0.06 0.04 0.02 3 0.07 0.05 0.03 The year of manufacture of the vehicle is divided into three categories (2012, 2013 and 2014), and the type of car is divided into three categories (small, medium and luxury). No discount is given for a vehicle older than 2012. Your program is to read the vehicle data, which contains the customer number and name, the make of car, year of manufacture, car type code (1, 2, or 3) and the sales price. Use the year of manufacture and the car type code as guidelines to retrieve the discount percentage table, then apply the discount percentage to the sales price to determine the discounted price of the vehicle. Print all the details including discounted price. Notes: You can develop a complete C++ program that use function or not using function to solve this

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

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

More Books

Students also viewed these Databases questions