Sample Outcomes for A09
Return to assignment description
This shows what output you should see
when you run the RevenueTester program
after you have completed the MonthlyRevenue class.
MonthlyRevenue Names:
April, Janary, February, march
...press enter...
MonthlyRevenue Names:
April, January, February, March
...press enter...
Revenue for some random days:
Jan 20th: 807.86
No defined revenue amount for day#26
Jan 26th: NaN
Feb 16th: 3100.73
No defined revenue amount for day#30
Feb 30th: NaN
No defined revenue amount for day#10
March 10th: NaN
ERROR: Invalid day number -10
March -10th: NaN
ERROR: Invalid day number 32
March 32th: NaN
April 2nd: 0.0
No defined revenue amount for day#31
April 31st: NaN
...press enter...
ERROR: Invalid day number 32
ERROR: Invalid day number -2
...press enter...
The monthly average revenue:
January: $1657.76
February: $1335.88
March: $1633.45
April: $1471.59
...press enter...
Finding the day with the highest revenue in each month:
January 4
February 24
March 2
April 15
...press enter...
Displaying info:
=================================================
Month: January
Average revenue: $1657.7606666666672
The highest revenue was at day#4
Revenue amount per day:
1: $1406.2
2: $0.0
3: $1309.41
4: $3004.62
5: $2306.41
6: $1009.18
7: $2398.59
8: $0.0
9: $2009.74
10: $2089.51
11: $1709.2
12: $508.99
13: $1931.6
14: $2811.87
15: $2056.95
16: $2409.76
17: $1745.13
18: $2301.23
19: $709.27
20: $807.86
21: $2005.92
22: $1087.61
23: $2450.3
24: $1207.35
26: $1302.66
27: $1076.12
28: $0.0
29: $2467.1
30: $3001.3
31: $2608.94
=================================================
Month: February
Average revenue: $1335.8803571428573
The highest revenue was at day#24
Revenue amount per day:
1: $0.0
2: $0.0
3: $2009.81
4: $1203.87
5: $2009.95
6: $1206.99
7: $1860.54
8: $0.0
9: $2156.03
10: $1607.57
11: $1005.76
12: $1208.0
13: $2501.63
14: $1902.29
15: $3004.21
16: $3100.73
17: $805.78
18: $1004.13
19: $1902.54
20: $3301.33
21: $0.0
22: $1607.99
23: $0.0
24: $4005.5
25: $0.0
26: $0.0
27: $0.0
28: $0.0
=================================================
Month: March
Average revenue: $1633.449
The highest revenue was at day#2
Revenue amount per day:
1: $0.0
2: $3704.33
3: $2005.81
4: $1902.67
5: $1508.98
6: $1077.73
8: $1004.87
9: $1504.51
10: $1920.34
11: $1324.04
12: $2004.99
13: $2340.83
14: $1560.44
15: $1088.68
16: $2009.43
17: $1702.21
18: $909.63
19: $2054.29
20: $1605.0
21: $1440.2
=================================================
Month: April
Average revenue: $1471.5853333333332
The highest revenue was at day#15
Revenue amount per day:
1: $2000.75
2: $0.0
3: $1100.25
4: $500.5
5: $0.0
6: $0.0
7: $2235.98
8: $3000.56
9: $1187.54
10: $0.0
11: $1067.0
12: $2805.04
13: $1099.99
14: $2022.65
15: $3056.76
16: $1903.24
17: $1287.91
18: $2104.74
19: $1931.71
20: $1002.41
21: $1003.0
22: $2030.69
23: $2011.2
24: $1406.23
25: $980.0
26: $0.0
27: $3006.0
28: $2800.0
29: $0.0
30: $2603.41
Return to
assignment description