Java Code Worksheet

User Generated

Abboznfgre961

Programming

Description

I have attached the full question, you just have to complete step 2, 3, 4, and 5. Should be short and easy!

Unformatted Attachment Preview

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. Your code must compile using the jGrasp IDE. Upload your completed .java file. Make sure you upload the .java file and not the .class file
Purchase answer to see full attachment
Explanation & Answer:
2 pages
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

I edited step 1 to comply with note #2 on the assignment. If you don't like it, I can change it back.

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
fi...


Anonymous
Very useful material for studying!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags