Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need help creating a java program that will allow perform the needed task. A retail company assigns a $5000 store bonus if monthly sales

i need help creating a java program that will allow perform the needed task.

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.

//Declare local variables Declare Real monthlySales Declare Real storeAmount Declare Real empAmount Declare Real salesIncreas

//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

//MODULE 2

//this module will determine what the bonus levels are

Module storeBonus(Real monthlySales, Real Ref storeAmount)

If monthlySales >=100000 Then

Set storeAmount = 5000

Else

Set storeAmount = 500

End If

End Module

//MODULE 3

//this module takes in percent of increase in decimal

//format such as .02 for 2 percent.

Module getIncrease(Real Ref salesIncrease)

Display Enter sales increase in decimal format.

Input salesIncrease

End Module

//MODULE 4

//this module will determine what the bonus levels are

Module empBonus (Real salesIncrease, Real Ref empAmount)

If salesIncrease >= .04 Then

Set empBonus = 50

Else

Set empBonus = 0

End If

End Module

//MODULE 5

//this module will display store and employee bonus info.

Module printBonus(Real storeBonus, Real empBonus)

Display The store bonus is $, storeBonus

Display The employee bonus is $, empBonus

End Module

Module main ()

//Declare local variables

Declare Real monthlySales

Declare Real storeAmount

Declare Real empAmount

Declare Real salesIncrease

//Function calls

Call getSales(monthlySales)

Call getIncrease(salesIncrease)

Call storeBonus(monthlySales, storeAmount)

Call empBonus(salesIncrease, empAmount)

Call printBonus(storeBonus, empBonus)

End Module

Then making adjustments into modules that are specified

Store bonuses: If store sales are $80,000 or more, store bonus is $3000 If store sales are $90,000 or more, store bonus is $4000 If store sales are $100,000 or more, store bonus is $5000 If store sales are $110,000 or more, store bonus is $6000

Employee bonuses: If percent of increase is 3% or more, employee bonus is $40 If percent of increase is 4% or more, employee bonus is $50 If percent of increase is 5% or more, employee bonus is $75

//MODULE 2

//this module will determine what the bonus levels are

Module storeBonus (Real monthlySales, Real Ref storeAmount)

If monthlySales >= 110000 Then

Set storeAmount = 6000

Else If monthlySales >= 100000 Then

Set storeAmount = 5000

Else if monthlySales >= 90000 Then

Set storeAmount = 4000

Else if monthlySales >= 80000 Then

Set storeAmount = 3000

Else

Set storeAmount = 0

End If

End Module

//MODULE 4

//this module will determine what the bonus levels are

Module empBonus (Real salesIncrease, Real Ref empAmount)

If salesIncrease >= .05 Then

Set empAmount = 75

Else If salesIncrease >= .04 Then

Set empAmount = 50

Else if salesIncrease >= .03 Then

Set empAmount = 40

Else

Set empAmount = 0

End If

End Module

//MODULE 5

//this module will display store and employee bonus info.

Module printBonus(Real storeAmount, Real empAmount)

Display The store bonus is $, storeAmount

Display The employee bonus is $, empAmount

If storeAmount == 6000 AND empAmount == 75 Then

Display Congrats! You have reached the highest bonus amounts possible!

End If

End Module

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

Students also viewed these Databases questions