Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem Statement (Python) You have been asked to write a program for a retail store that will allow them to calculate discounts for their employees

Problem Statement (Python)

You have been asked to write a program for a retail store that will allow them to calculate discounts for their employees when they buy items. Discounts are based on number of years worked as well as if the employee is a manager or hourly employee. They are also allowed no discount once they have received $200 in discounts for the year.

Note: Once you complete the discount for the employee, a question should be asked as to if there is another employee. If there is, collect the input and process the data for the next employee as such. Do this until the user answers NO for Another Employee. Once all employees have been processed, display the All Employee Summary and end the program.

INPUT

The application must be able to collect the following required information for each employee:

  1. Number of years employed (required, numeric, >0)
  2. Total amount of previous purchases before discount (required, numeric, >=0)
  3. Employee status (employee or manager)
  4. Total of todays purchase (required, numeric, >=0)

OUTPUT

There are two distinct areas required for output:

  1. For each employee display the following:
    1. Employee discount percentage
    2. YTD Amount of discount in dollars
    3. Total purchase today before discount
    4. Employee discount this purchase
    5. Total with discount
  2. (All Employee Summary) Calculate the total for all employees for todays date:
    1. Total before discount for the day
    2. Total after discounts applied

PROCESS

Employee discount standard

Years of Employment

Management

Hourly

1-3 Years

20%

10%

4-6 Years

24%

14%

7-10 Years

30%

20%

11-15 Years

35%

25%

More than 15 Years

40%

30%

YTD discount in dollars = total purchase before today * discount

Employee discount this purchase:

The discount for the purchased is based on the YTD discounts already realized. Meaning, an employee or manager only receives $200 in discount for the year.

Therefore:

  • If an employee has already accumulated $200 in discounts prior to the current purchasethen no discount for this purchase.
  • If the (Total of the YTD Discount + Current Discount) < 200..then the current purchase receives the whole discount.
  • If the (Total of the YTD Discount + Current Discount) > 200..then the current purchase receives the only a partial discount up to the 200 dollar YTD max.

Total with discount: Total * discount allowed

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

More Books

Students also viewed these Databases questions