Chat with us, powered by LiveChat In this assignment, you are going to modify the grocery shopping program that you wrote for Assignment 2. You are going to ad - Essayabode

In this assignment, you are going to modify the grocery shopping program that you wrote for Assignment 2. You are going to ad

 this assignment, you are going to modify the grocery shopping program that you wrote for Assignment 2. You are going to add functions to create a more manageable program. You will also improve user interactivity using loops and input validations. Make sure you do not miss any steps given in the instruction. 

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.32112.339 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Grocery_Shoping_MazenKasher", "Grocery_Shoping_MazenKasherGrocery_Shoping_MazenKasher.vcxproj", "{E16C1B89-9930-4B9D-B3DB-270B75EB2C9B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {E16C1B89-9930-4B9D-B3DB-270B75EB2C9B}.Debug|x64.ActiveCfg = Debug|x64 {E16C1B89-9930-4B9D-B3DB-270B75EB2C9B}.Debug|x64.Build.0 = Debug|x64 {E16C1B89-9930-4B9D-B3DB-270B75EB2C9B}.Debug|x86.ActiveCfg = Debug|Win32 {E16C1B89-9930-4B9D-B3DB-270B75EB2C9B}.Debug|x86.Build.0 = Debug|Win32 {E16C1B89-9930-4B9D-B3DB-270B75EB2C9B}.Release|x64.ActiveCfg = Release|x64 {E16C1B89-9930-4B9D-B3DB-270B75EB2C9B}.Release|x64.Build.0 = Release|x64 {E16C1B89-9930-4B9D-B3DB-270B75EB2C9B}.Release|x86.ActiveCfg = Release|Win32 {E16C1B89-9930-4B9D-B3DB-270B75EB2C9B}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {6324DEC7-C930-470C-93C5-91E441CF495C} EndGlobalSection EndGlobal

,

Assignment #3 – Grocery Shopping v2:

In this assignment you are going to modify “Assignment #2 – Grocery Shopping” program. The new version of the program will perform the same task with the same items and prices as the older version. (I have noticed that shipping rates doesn’t make sense business wise since you pay more shipping when you purchase more. Though, I will keep it as it is.)

Follow the Steps Below

1. You must have done Assignment #2. I will try to complete grading and giving feedback as soon as possible, so you can check and fix what you are missing for the assignment. You can still ask your questions before my feedback.

2. Save the project as A3_Grocery_v2_yourname.

3. Use functions to divide your program into manageable pieces. Define three functions: displayMenu, tipCalculator, and shippingCalculator.

a. Write function prototypes at the top and define the functions after the main function.

4. displayMenu function:

a. Move the code that displays the menu in the program into the function.

b. Whenever you need to display the menu, call the function.

5. tipCalculator function:

a. Move the code that asks users if they want to add a tip and calculate the subtotal accordingly, into the function.

b. Call the function in an appropriate place in the main menu. Pass the value of subtotal to the function when calling. Return the value of new subtotal from the function.

c. Write appropriate return type and parameter list for the function. Optional: You may ask the user how much money they would like to tip.

6. shippingCalculator function:

a. Move the code that calculates the total including a shipping rate based on the subtotal, into the function.

b. Call the function in an appropriate place in the main menu. Pass the value of subtotal to the function when calling. Return the value of shipping added total from the function.

c. Write appropriate return type and parameter list for the function.

7. Define constants as global constants.

8. Keep variable definitions local.

9. At the beginning of the program display the menu, then ask the user if they want to give an order.

10. If the answer is no, exit the program with the exit() function.

11. Use while loop when the answer is yes in order to ask user if they want to give another order. Then, you can go through the process again and receive a new order. The subtotal will be accumulator of the while loop that keeps adding the cost of the new orders. The program should let user to give another order until they enter “no”.

12. Use do-while loop to check if the user’s item choice is valid. Display menu and ask user to make a valid choice until their choice is valid. If their choice is invalid, display a warning message. Once the choice is valid, you can terminate the loop and continue with the switch statement. (do-while loop will be used inside the while loop.)

13. Text  Description automatically generated Text  Description automatically generatedUse the following output screen images as a guide.

A picture containing text  Description automatically generated

14. Use comment lines to describe block of code statements in the program.

You must submit both files (zipped project folder and .cpp extension) of the program.

Rubric

· Complete and working program with correct calculations and no errors. (5 points)

· Code readability with indentations, spaces when necessary (4 points)

· Comment lines for description (4 points)

· Local variable definitions in the appropriate function. (5 points)

· Global constants definition (5 points)

· Function prototypes (9 points)

· Proper function calls (9 points)

· Functions header and body (27 points)

· While loop. (10 points)

· Do-while loop. (10 points)

· If statements to give user a message when the loop conditions are false. (5 points)

· User interaction with displaying proper messages. (3 points)

· Exit function (4 points)

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?