-
Notifications
You must be signed in to change notification settings - Fork 0
/
Assignment4.txt
65 lines (62 loc) · 1.46 KB
/
Assignment4.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Matthew Dal Santo
ITDEV117
Assignment #4
Excercise #9
class CalculateStittingFee
main()
// Declarations
num subjectNum
num basePrice
num totalPrice
num WEEKEND_UPCHARGE = 0.2
num FEE1 = 100
num FEE2 = 130
num FEE3 = 150
num FEE4 = 165
num FEE5 = 175
num FEE6 = 180
num FEE7 = 185
string lastName
string dayOfWeek
output "Please enter the customer's last name. "
input lastName
output "Please enter the number of subjects posing for a portrait."
output "Use numerical digits only. "
input subjectNum
output "Please enter the day of the week that you will be posing."
output "Use lower case only and do not abbreviate the day name. "
input dayOfWeek
if subjectNum <= 1 then
basePrice = FEE1
else
if subjectNum = 2 then
basePrice = FEE2
else
if subjectNum = 3 then
basePrice = FEE3
else
if subjectNum = 4 then
basePrice = FEE4
else
if subjectNum = 5 then
basePrice = FEE5
else
if subjectNum = 6 then
basePrice = FEE6
else
basePrice = FEE7
endif
endif
endif
endif
endif
endif
if dayOfWeek = "saturday" OR dayOfWeek = "sunday" then
totalPrice = basePrice * WEEKEND_UPCHARGE + basePrice
else
totalPrice = basePrice
endif
output "Customer's last name: ", lastName
output "Number of subjects: ", subjectNum
output "Scheduled day of week: ", dayOfWeek
output "Calculated sitting fee: $", totalPrice