2) Tax payments are calculated based on the following conditions: (i) If the quantity supplied for a given furniture type is below 300 per year, then The tax is 15% of sales for office chairs. The tax is 20% of sales for office tables and desks. (ii) If the quantity supplied for any furniture type is at least 300 and does not exceed 750 per year, then the tax is 25% of sales; otherwise, the tax is 30%. You are required to: (a) Conduct problem analysis and design. (b) Write algorithms of: (i) The function to calculate tax. (ii) The function to calculate profit.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 14PE
icon
Related questions
Question
I need the answer as soon as possible
2) Tax payments are calculated based on the following conditions:
(i)
If the quantity supplied for a given furniture type is below 300 per year, then
The tax is 15% of sales for office chairs.
The tax is 20% of sales for office tables and desks.
(ii)
If the quantity supplied for any furniture type is at least 300 and does not
exceed 750 per year, then the tax is 25% of sales; otherwise, the tax is 30%.
You are required to:
(a)
Conduct problem analysis and design.
(b)
Write algorithms of:
(i) The function to calculate tax.
(ii) The function to calculate profit.
(c)
Explain how are you going to format and display your final outputs, as shown in
the sample report for the year 2021?
(d)
Write the Main Program, which calls two functions in part (b). Use C++ Stucture
to store relevant data for each furniture type.
Transcribed Image Text:2) Tax payments are calculated based on the following conditions: (i) If the quantity supplied for a given furniture type is below 300 per year, then The tax is 15% of sales for office chairs. The tax is 20% of sales for office tables and desks. (ii) If the quantity supplied for any furniture type is at least 300 and does not exceed 750 per year, then the tax is 25% of sales; otherwise, the tax is 30%. You are required to: (a) Conduct problem analysis and design. (b) Write algorithms of: (i) The function to calculate tax. (ii) The function to calculate profit. (c) Explain how are you going to format and display your final outputs, as shown in the sample report for the year 2021? (d) Write the Main Program, which calls two functions in part (b). Use C++ Stucture to store relevant data for each furniture type.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Topological Sort
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole