Question

Please answer part I, iii and iv Syarikat Smart Store Hypermarket Sdn. Bhd. wants to create...

Please answer part I, iii and iv

Syarikat Smart Store Hypermarket Sdn. Bhd. wants to create a system that will calculate the weekly pay for its employees, based on the category and rate given in the table below. The employees in the category A1, A2 and M1 are paid standard rate for the first 44 hours, followed by 1.5 the standard rate for overtime pay. There is no overtime pay for M2 and BB categories. The total work hours for each employee cannot exceed 60 hours.

The system should request for the employee’s name, their IC number, the number of hours worked, and their category. The system should display all related information about the employee including the gross pay, overtime pay and the net pay.

Category

Standard Rate: Pay/Hour

A1

RM 5

A2

RM 7

M1

RM 10

M2

RM 15

BB

RM 20

Here is a sample of a program’s interface dialog:

Name: Ismaria binti Ismail

NIC: 800812-12-0872

Category: A1

Total Hours: 46

Syarikat Smart Store Hypermarket Sdn. Bhd.

============================================================

Name: Ismaria binti Ismail

NIC: 800812-12-0872

Category: A1

Total Hours: 46

Gross Pay: RM 220.00

Overtime Pay: RM 5.00

Net Pay: RM 225.00

Continue (Y/N) ? : Y

Name: Shamsul Bahri bin Ahmad

NIC: 800611-01-0719

Category: A2

Total Hours: 62

INPUT NOT VALID!!

Continue (Y/N)? : N

Based on the above programming problem:

  1. Analyse the problem to identify required items to be used in designing algorithm
  2. Write an algorithm in a pseudo code
    1. The algorithm for the scenario is below -

      Set Continue for Employees to 'Y'

      Repeat until Continue is set to 'N'.

      Input the name, NIC number, Category and Number of Hours worked per week.

      while Number of Hours worked is less than or equal to 60 repeat below steps -

      if Category is M2, gross pay is 44 multiplied by rm 15. net pay is equal to gross pay. overtime pay is zero else

      if Category is BB, gross pay is 44 multiplied by rm 20. net pay is equal to gross pay. overtime pay is zero else

      if Category is A1, gross pay is 44 multiplied by rm 5. if number of hours worked is >44, overtime hours will be number of hours worked - 44. overtime pay is overtime hours multiplied by 5*1.5. net pay is gross pay + overtime pay.

      if Category is A2, gross pay is 44 multiplied by rm 7. if number of hours worked is >44, overtime hours will be number of hours worked - 44. overtime pay is overtime hours multiplied by 7*1.5. net pay is gross pay + overtime pay.

      if Category is M1, gross pay is 44 multiplied by rm 10. if number of hours worked is >44, overtime hours will be number of hours worked - 44. overtime pay is overtime hours multiplied by 7*1.5. net pay is gross pay + overtime pay.

      Display Name, NIC Number, Category, Number of Hours Worked, Gross Pay, Overtime Pay and Net Pay.

      Input continue value.

  3. Draw a flowchart based on the pseudo code
  4. Produce a tracing table to show the projected values
0 0
Add a comment Improve this question Transcribed image text
Know the answer?
Add Answer to:
Please answer part I, iii and iv Syarikat Smart Store Hypermarket Sdn. Bhd. wants to create...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT