Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C PROGRAMMING NOT IN C++, ONLY IN C PROGRAMMING You have been asked to write a program for a retail store that will allow them

C PROGRAMMING

NOT IN C++, ONLY IN C PROGRAMMING

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:

Number of years employed (required, numeric, >0)

Total amount of previous purchases before discount (required, numeric, >=0)

Employee status (employee or manager)

Total of todays purchase (required, numeric, >=0)

OUTPUT

There are two distinct areas required for output:

For each employee display the following:

Employee discount percentage

YTD Amount of discount in dollars

Total purchase today before discount

Employee discount this purchase

Total with discount

(All Employee Summary) Calculate the total for all employees for todays date:

Total before discount for the day

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: total purchase today * discount if < $200. If over $200 previously no discount. If less than $200 prior to today, but today takes them over $200 then only allow the amount to get them to $200.

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_2

Step: 3

blur-text-image_3

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

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

u = 5 j , v = 6 i Find the angle between the vectors.

Answered: 1 week ago