Question
The IST department needs to track the average number of advising appointments held per day, over the past 7 days. Each day may or may
The IST department needs to track the average number of advising appointments held per day, over the past 7 days. Each day may or may not have any appointments. Write a small program that will allow the department to enter the number of advising appointments held for each day, determine the average number of appointments, and output the average number of appointments.
You can use the following stub solution that outlines the processes that need to be completed. Copy and paste this solution into your IDE. You should complete steps 2 through 5.
import javax.swing.JOptionPane; public class AdvisingAppointmentTracker { public static void main(String[] args) { // Step 1: Set any constants needed for the program final int NUM_DAYS = 7; final int MIN_NUM_APPOINTMENTS = 0; // Step 2: Create an array that will hold the number of advising appointments per day // Step 3: Enter the number of advising appointments for all of the days // Step 4: Find the average number of appointments // Step 5: Output the average number of appointments } }
Note #1: Your solution must incorporate an array.
Note #2: Keep in mind the above narrative does not say you may assume the user will always enter only numeric values. Therefore your solution should account for this.
Note #3: For input/output, you must use the JOptionPane class.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started