A retail company assigns a $5000 store bonus if monthly sales are more than $100,000; otherwise a $500 store bonus is awarded. Additionally, they are doing away with the previous day off program and now using a percent of sales increase to determine if employees get individual bonuses. If sales increased by at least 4% then all employees get a $50 bonus. If they do not, then individual bonuses are 0. The first module in the program is getSales(). Since this is still required, leave this module as is. This module should be written as follows: //MODULE 1 //this module takes in the required user input Module getSales(Real Ref monthlySales) Display “Enter the total sales for the month.” Input monthlySales End Module Step 3: The second module in the program was isBonus(). Since there are two types of bonuses now, rename this module and the module call to storeBonus(). Write an if then else statement within this module that will set the bonus amount to either 5000 or 500. Also, pass the variable storeAmount to the module as a reference. Complete the missing lines. (Reference: Dual Alternative Decision Structures, page 125). //MODULE 2 //this module will determine what the bonus levels are Module ___________(Real monthlySales, Real Ref ___________) If monthlySales >=100000 Then Set ______________ = 5000 __________ Set ______________ = 500 End If End Module
A retail company assigns a $5000 store bonus if monthly sales are more than $100,000; otherwise a $500 store bonus is awarded. Additionally, they are doing away with the previous day off program and now using a percent of sales increase to determine if employees get individual bonuses. If sales increased by at least 4% then all employees get a $50 bonus. If they do not, then individual bonuses are 0.
The first module in the program is getSales(). Since this is still required, leave this module as is. This module should be written as follows:
//MODULE 1
//this module takes in the required user input
Module getSales(Real Ref monthlySales)
Display “Enter the total sales for the month.”
Input monthlySales
End Module
Step 3: The second module in the program was isBonus(). Since there are two types of bonuses now, rename this module and the module call to storeBonus(). Write an if then else statement within this module that will set the bonus amount to either 5000 or 500. Also, pass the variable storeAmount to the module as a reference. Complete the missing lines. (Reference: Dual Alternative Decision Structures, page 125).
//MODULE 2
//this module will determine what the bonus levels are
Module ___________(Real monthlySales, Real Ref ___________)
If monthlySales >=100000 Then
Set ______________ = 5000
__________
Set ______________ = 500
End If
End Module
Trending now
This is a popular solution!
Step by step
Solved in 2 steps