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, 22.06.2019 01:30
Imagine that you have a friend who is starting a small business and is interested in using social media to spread the word. he is not certain that it is a good move, and has come to you for . would you advise him to use social media to advertise his business? why or why not? support you answer with information from the text.
Answers: 1
question
Computers and Technology, 23.06.2019 02:50
Define a class named movie. include private fields for the title,year, and name of the director. include three public functions withprototypes void movie: : settitle(cstring); , voidmovie: : setyear(int); , void movie: : setdirector(string); . includeanother function that displays all the information about a movie.write a main() function that declares a movie object namedmyfavoritemovie. set and display the object's fields.this is what i have but know its wrong since it will notcompile: #include#includeusing namespace std; //class declarationclass movie{private: string movietitle ; string movieyear; string directorname; public: void settitle(string title); void setyear(string year); void setdirector(string director); void displayinfo(); }; //class implementationvoid movie: : settitle(string title){ movietitle = title; cout< < "what is the title of themovie? "< > temp; myfavoritemovie.settitle(temp); cout< < "enter movie year"< > temp; myfavoritemovie.setyear(temp); cout< < "enter director'sname"< > temp; myfavoritemovie.setdirector(temp); //display all the data myfavoritemovie.displayinfo(); system("pause"); return 0; this code is not entirely mine someone on cramster edited my firstcode but then i try manipulating the new code and i still get acompile error message : \documents\visual studio 2008\projects\movie\movie\movie.cpp(46) : error c2679: binary '< < ' : no operator found which takes aright-hand operand of type 'std: : string' (or there is no acceptableconversion)c: \program files (x86)\microsoft visual studio9.0\vc\include\ostream(653): could be'std: : basic_ostream< _elem,_traits> & std: : operator< < > (std: : basic_ostream< _elem,_traits> & ,const char *)w
Answers: 1
question
Computers and Technology, 23.06.2019 03:00
State 7 common key's for every keyboard
Answers: 1
question
Computers and Technology, 23.06.2019 16:30
Which of the following is not an enhancement to the standard wiki to make it more attractive for corporations? encryptionwork spacespermission toolspredictive text
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.02.2021 01:00
question
Mathematics, 04.02.2021 01:00
question
Mathematics, 04.02.2021 01:00
question
Mathematics, 04.02.2021 01:00
question
Computers and Technology, 04.02.2021 01:00
question
Mathematics, 04.02.2021 01:00
question
Mathematics, 04.02.2021 01:00
Questions on the website: 13722363