subject

Write a program named Exercise1.java, then implement the following methods: public static int[] gradeStats(String gradebook) throws Exception (don't worry about the exception, you are not required to handle exception).
This method reads all grades in the gradebook and returns highest, lowest and average grade as an int array. The first element represents the highest grade, the 2nd is for lowest, and 3rd one is for average.
public static int multiplesOf7(int N, int M), this method counts and returns how many multiples of 7 are between [N, M], assume N<=M
For example, calling multiplesOf7(10, 23) should return 2, because there are two numbers 14 and 21 are multiples of 7 in the range [10, 23].
public static boolean isValidTriangle(int a, int b, int c), this method determines if the three numbers, a, b, c can form a triangle (a, b,c are 3-side not angles), if yes, returns true, otherwise, returns false.
public static int binaryToInt(String binaryString), it takes a word String representing a biniary number (0s and 1s) as parameter and converts it to its decimal representation. For example, calling binaryToInt("0110") should return 6. You can assume that the binaryString is guaranted to contain only 0s and 1s.
public static int[] countWordsInEachLine(String fileName) throws Exception, the first line in the file contains the number of lines of the file, it then reads and counts the number of words in each of the rest lines in the file, and returns those numbers as an int array. The first element in the returned array represents the number of words in the first line, the second element for the second line, and so on.
For example, if the data file: data. txt, contains the following information:
2
line one
line two
calling countWordsInEachLine("data. txt") should return {2, 2}
Note: You may use main method to test your implementations of these methods. However, you MUST run Grader. class to grade your response.
gb1.txt
95 100
90 90 89 90
data. txt
5
Edit contents here
line 2 with some information
line 4
line 5 5 5 5 5 5 5
gb2.txt
5
78 90 89
87
gradebook. txt
10
100
90 89
45 91 98

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:00
If you have a lien on your vehicle, you cannot apply for a duplicate copy of your vehicle’s certificate of title. true or false
Answers: 1
question
Computers and Technology, 22.06.2019 03:30
Identify at least three types of characteristics that you were asked about as you the computer identify a fruit.
Answers: 3
question
Computers and Technology, 22.06.2019 10:40
"it security policy enforcement and monitoring" respond to the following: describe how monitoring worker activities can increase the security within organizations. describe the rationale that managers should use to determine the degree of monitoring that the organization should conduct. explain the extent to which you believe an organization has the right to monitor user actions and traffic. determine the actions organizations can take to mitigate the potential issues associated with monitoring user actions and traffic.
Answers: 3
question
Computers and Technology, 22.06.2019 18:40
Mariah was working on a multimedia presentation that included both video and audio files. the file was huge, and she wanted to send it to her coworker in another office. she needed to reduce the size of the file so that it could be transmitted faster. the utility she used to do this was
Answers: 2
You know the right answer?
Write a program named Exercise1.java, then implement the following methods: public static int[] gra...
Questions
question
Mathematics, 04.12.2019 02:31
question
Mathematics, 04.12.2019 02:31
question
Mathematics, 04.12.2019 02:31
Questions on the website: 13722360