8
answers
2
watching
410
views
dekasilver2Lv1
12 Oct 2023
For Beginning Java,
"
Write a program that ask the user to enter a list of positive scores until the user enters a negative score to terminate the input. You need to store these scores in an array. You can assume the maximum number of scores the user may enter is 70. However, you need to keep track of the actual number of scores entered. Write 2 methods:
1. calculateAverage(): this method takes the list of scores and return the average score.
2. countPerfectScores(): this method takes the list of scores and return the number of perfect scores (100).
The main program reads the input and calls these methods and print the results.
Please make sure you write a comment line to document what your method does."
For Beginning Java,
"
Write a program that ask the user to enter a list of positive scores until the user enters a negative score to terminate the input. You need to store these scores in an array. You can assume the maximum number of scores the user may enter is 70. However, you need to keep track of the actual number of scores entered. Write 2 methods:
1. calculateAverage(): this method takes the list of scores and return the average score.
2. countPerfectScores(): this method takes the list of scores and return the number of perfect scores (100).
The main program reads the input and calls these methods and print the results.
Please make sure you write a comment line to document what your method does."
capedbaldyLv10
26 Nov 2023
Already have an account? Log in
hoanglethanh554Lv10
19 Nov 2023
Already have an account? Log in
5 Nov 2023
Already have an account? Log in
Read by 1 person
Read by 1 person
12 Oct 2023
Already have an account? Log in
Read by 1 person
12 Oct 2023
Already have an account? Log in
Read by 2 people