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

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter2: Elements Of High-quality Programs
Section: Chapter Questions
Problem 1GZ
icon
Related questions
Question

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

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT