You are on page 1of 1

Problem Two - Weekend Working

The manager of Insanesbury's has decided to let the shelf stackers work weekends as
a busy period is approaching. For this they get paid double time (hourly rate is
doubled).
Modify the wage calculation program in the last step to allow the users to enter hours
worked for Saturday and Sunday. Where Sunday is now day 7 and Saturday is 6.
Ensure that the hourly rate for working on those days is doubled.
Modify your existing solution to problem one to complete this task. This time we do not
provide a partial solution. We only tell you what additional components, parameters and
variables are needed; you need to work out for your selves where they all go.
If Progranimate is closed open it from the website and load in your solution to exercise
one (supermarketWages1.prg) for modification.
Testing

To complete the solution the following components will be needed:

In order to validate your solution, ensure the following test data works in your program. Only
when all this works can you consider your solution complete.
The comma separated values represent each individual input in the order they should be
entered. The values should not be all entered at the same time.

Test

User Entry Test Data

8, 8, 8, 8, 8, 0, 0

Expected Output

Passed

Pay this week is 180.0

[__]

2
0, 0, 0, 0, 0, 0, 0
Pay this week is 0.0
3
8, 8, 8, 8, 8, 8, 8
Pay this week is 424.0
4 your0,list0,of0,variables
0, 0, 12,is 12
Pay this week is 216.0
Ensure
as follows:

[__]
[__]
[__]

Remember you are modifying your solution to problem one.


You must also rename the program in Progranimate; call it SupermaketWages2. You can do
this by clicking the edit button from the palette and then select the starter or first line of code.
When completed please ensure you save your program as SupermarketWages2.prg
The
following
listprogram
of parameters
to beextends
used within
the components.
Do not
clear the
the next are
problem
the functionality
of your solution to this problem.
You have to decide where to put them. They are in no particular order.

wages = wages +( hoursWorked * (wages*2))


day == 6 Or day == 7

You might also like