Question
I'm totally clueless on how to do this C++ program: You have been commissioned by the Quick-Shop supermarket chain to write a program that will
I'm totally clueless on how to do this C++ program:
You have been commissioned by the Quick-Shop supermarket chain to write a program that will determine the retail price of at most 100 given items. Your program should ask the user to specify the number of items (between 1 and 100).
Their pricing policy is that any item that is expecteed to sell in one week or less is marked up to 5 percent, and any item that is expected to stay on the shelf for more than one week is marked up 10 percent over the wholesale price. Be sure to notice that the low markup of 5 percent is used for up to 7 days and that at 8 days the markup changes to 10 percent.
Requirements:
1) Use a constant which represents the initial size of array (which is 100) and name it as INITIAL_SIZE. The literal number 100 must not occur anywhere else in the program - whereever the size 100 is needed, it must be obtained through the INITIAL_SIZE constant.
2) Use a variable which represents the actual size of the array and name it as actual_size.
3) The 5 percent and 10 percent marked ups should be used as constants.
4) You will need three different arrays, one holding the wholesale prive of items (name it as cost), one holding the expected number of days until the item is sold for different items (name it as turnover) and the last one is responsible to hold the retail prive of the items (name it as price).
The program must contain the following functions:
1) Function welcome which writes the description of the program on screen.
2) Function get_input is responsible to ask the user to specify for how many items (up to 100) this program should calculate the retail price. It is also responsible to get the input for the wholesale price of the items and the expected number of days until the item is sold.
3) Function retail_price is responsible to calculate the retail price of the items based on the company policy.
4) Function print_output is responsible to print the wholesale price of item, the expected number of days until the item is sold, and the retail price for all items in a nice and readable format.
5) These four functions will be called inside the main function.
A sample run should look like below:
This program determines the retail price for items at Quick-Shop supermarket store. First specify for how many items you would like to calculate the retail price? 1
You selected one item
Please enter the wholesale cost of item: 1.21
Enter the expected number of days until sold: 5
Wholesale cost = 1.21 $
Expected time until sold = 5 days
Retail Price = 1.27 $
Step 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