[Recommended]Java Eclipse HW

Java Eclipse HW Program 1 A local school system must report average weekly attendance percentages to the state on each Friday afternoon. Your task is…

Java Eclipse HW
Program 1
A local school system must report average weekly attendance percentages to the state on each Friday afternoon. Your task is to write a program that takes multiple school’s attendance numbers for a week and computes the information needed for the report to the state.
Your program should first ask the user how many schools there are in the district. The program should then ask the user to enter each day’s attendance numbers for each school for the week as well as the number of students enrolled in that school. The program should output the average attendance for the week for each school as well as the average percentage of students present that week. You must use nested FOR loops to collect the attendance input from the user. You are NOT allowed to use an array for any purpose in your program.
All console output should have meaningful descriptions. While you can’t yet recover from errors generated by users entering character data for input, make sure you validate numbers entered by the user are within appropriate numeric ranges for correct input to the program. For example, the program wouldn’t do anything if there were 0 schools entered. There are other cases to figure out on your own.
Program 1 sample execution & output (user input shown in bold):
How many schools do you have in your district: 2
Enter data for school 1 How many students are enrolled in school 1: 580 Enter the attendance for day 1: 502 Enter the attendance for day 2: 521 Enter the attendance for day 3: 550
Enter the attendance for day 4: 555 Enter the attendance for day 5: 568
School 1 had an average attendance of 539 students which means there were 92.93% of all students present Enter data for school 2 How many students are enrolled in school 1: 350 Enter the attendance for day 1: 302 Enter the attendance for day 2: 332 Enter the attendance for day 3: 350
Enter the attendance for day 4: 325 Enter the attendance for day 5: 338
School 2 had an average attendance of 329 students which means there were 94% of all students present School 2 had the best attendance this week with 94% attendance.
Program 2
Write a program that asks the user to input an integer, n. Use the value of n to set the size of the triangles to be printed by your program to the console as shown below.
If 6 was entered by the user as n, the first triangle printed by your program would look like this.
@
@@
@@@
@@@@
@@@@@
@@@@@@
Then, the 2nd triangle printed by your program would look like this.:
@
@@
@@@
@@@@
@@@@@
@@@@@@
The triangles should not be produced by 6 println statements, but rather by FOR loops and no more than three println or print statements in each set of loops to produce each triangle. Furthermore, a single println or print statement cannot contain more than one @ symbol in its output. (hint – use a set of nested FOR loops for each triangle to control how many times the print statements execute.) Also, just like in program 1, you may not use an array for any purpose in this program.
You should print a single blank line after the first triangle so there is space between the two triangles in your console output.

The post Java Eclipse HW appeared first on ExpertCustomWritings.
Assignment status: Solved by our experts

>>>Click here to get this paper written at the best price. 100% Custom, 0% plagiarism.<<<

Leave a Reply

Your email address will not be published. Required fields are marked *