Question: Unit 4 Exercise - Pseudocode and Decisions This lab requires you to think about the steps that take place in a program by writing pseudocode.

 Unit 4 Exercise - Pseudocode and Decisions This lab requires you
to think about the steps that take place in a program by

Unit 4 Exercise - Pseudocode and Decisions This lab requires you to think about the steps that take place in a program by writing pseudocode. Read the following program prior to completing the lab. Part 1 A neighborhood restaurant has asked you to write a program to assist the employees with boosting the sales of appetizers. If 208 or more of the gross food sales are appetizers, then each of the wait staff will receive a paid shift. Step 1: This part of the program is solved using two variables. Declare the variables that you will need in the program, using the proper data type and documenting the purpose. Variable Name Purpose Stores the food sales Stores the appetizer sales Step 2: Given the major task involved in this program, what modules might you consider including? Also describe the purpose of the module. Module Name Module input Foodsales() Purpose Allows the user to enter the food sales. Allows the user to enter the appetizer sales. This module will determine if a paid shift should be awarded. Step 3: Complete the pseudocode in notepad by copy/pasting the text below and writing in the missing lines. When writing your modules and making calls, be sure to pass necessary variables as arguments and accept them as reference parameters if they need to be modified in the module. Module main() //Declare local variables Declare Real foodSales //Function calls Call input FoodSales (foodSales) //user inputs food sales _//user inputs appetizer sales //calculates percentage for award End Module //this module takes in the food sales Module input FoodSales (Real Ref foodSales) Display "Enter the food sales for the month." Input foodSales End Module 1/this module takes in the appetizer sales Module Display End Module 1/this module will determine if a paid shift is awarded Module If appetizerSales > 0.20 - foodSales) Then Display "great teamwork, paid shift for the wait staff!!!" End If End Module Part 2 Arter using your program for three months, the restaurant manager has decided that it would be a great idea to include additional perks. I total sales in the restaurant exceed $20,000 in a single month, all employees will get a free lunch coupon to use in the restaurant. I both the paid shift and the free lunch coupon perks are awarded, then all employees will receive an extra $50.00 in their next paycheck. NOTES: at first, this might seem more difficult than it really is. Keep in mind, you have already performed the first comparison, paid shift. We just need to perform two more comparisons. Step 1. Start by copy/pasting your completed PART 1 pseudocode program back into notepad. Your notepad file should resemble the format below: Part 1 your restaurant program Part 2 Cupgraded restaurant program Step 2. In the calculation module, we just need to expand it a bit. The first comparison, paid shift, is already completed. The second comparison, lunch coupon, is almost identical to the first. The third comparison may be performed using the AND operator, If (percent Total...) AND (foodSales...) Display "Great food and appetizer sales! 50 bucks extra for everyone!!! NOTE: at this time, you should have 3 modules for calculating perks Step 3. Once you have completed this exercise, please upload the text file to the unit 4 Pseudocode Dropbox

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!