The organizing committee for the HCC Celebrates Columbia's 50th Birthday, Inc. would like a report of the
Question:
The organizing committee for the HCC Celebrates Columbia's 50th Birthday, Inc. would like a report of the attendance for each of the seven days of the celebration. You have been asked to write a program that produces a report of the attendance for each day, the total attendance for the entire celebration, the average attendance for the entire celebration, the largest attendance and the day on which it occurred, and the least attendance along with the day on which it occurred.
Requirements:
The program will do the following:
1. Prompt the user to enter the attendance for each day. 2. Store each day's attendance in an array. 3. Print the attendance for each day. 4. Calculate the average attendance for the seven days. 5. Print the average attendance. Show one decimal place. 6. Find the day with the largest attendance. 7. Print the largest attendance and the day on which it occurred. 8. Find the day with the least attendance. 9. Print the least attendance and the day on which it occurred.
Example Program Execution
Please enter the attendance for:
Day 1: 1507
Day 2: 1999
Day 3: 958
Day 4: 2001
Day 5: 1506
Day 6: 1800
Day 7: 1847
Columbia 50th Birthday Celebration
Attendance Report
Day 1: 1507
Day 2: 1999
Day 3: 958
Day 4: 2001
Day 5: 1506
Day 6: 1800
Day 7: 1847
Total Attendance: 11618
Average Attendance: 1659.7
Greatest Attendance: 2001 on Day 4
Least Attendance: 958 on Day 3
In addition to a main method, you program will have the following additional methods:
• CalculateTotal: Input is the attandance array. Returns the total attendance.
• CalculateAverage: Input is the attandance array. Returns the average attendance.
• Find Largest: Input is the attandance array. Returns the largest attendance.
• FindLeast: Input is the attandance array. Returns the least attendance.
• PrintAttendance: Input is the attandance array. Prints the attendance for each day.
• You may put all of the methods in a single class file.
Additional Requirements
• You must use an array for this program (not an ArrayList).
• A Javadoc comment must appear at the top of the source code containing: Your name, course number and section (001, 002, ... for daytime, 050, 051, ... for evening), and a brief description of what the program does.
• An end-of-line comment must appear after each closing brace describing the block being closed.
• Proper indentation must be used.
• The zip file containing the source file and two screenshots: one of your code in NetBeans and the other of your program running in NetBeans. The zip file must named in the following format. You should replace the text in bold-italics with your information: CMSY166-section_LabS_yourLastName_yourFirstName.
• This file should be uploaded through CANVAS. I will not accept email attachments.
Accounting Information Systems The Crossroads of Accounting & IT
ISBN: 978-0132991322
2nd Edition
Authors: Donna Kay, Ali Ovlia