Question: Description: n this activity, you will create a class called Scores that will hold an array of numerical values and provide methods that allow users

 Description: n this activity, you will create a class called Scores
that will hold an array of numerical values and provide methods that
allow users to interact with the Scores class. Directions: Don 't forget
to add your Javadoc comments for your classes, constructor,and methods in this
activity. Part 1: Scores - instance variable, constructor and method stubs Create

Description: n this activity, you will create a class called Scores that will hold an array of numerical values and provide methods that allow users to interact with the Scores class. Directions: Don 't forget to add your Javadoc comments for your classes, constructor,and methods in this activity. Part 1: Scores - instance variable, constructor and method stubs Create a class called Scores. Add an instance variable with the name numbers to your class that is an array of int values: o private intl] numbers; Add a constructor that has a parameter declared as an array of int values. o public Scores (int[l numbersIn) t * Add method stubs for the following methods. The first one is given; do the rest on your own o findEvens: no parameter, returns an array of int (all of the even-valued scores) public int[] findEvens() { return nu1 ndeAn aray is an objeet so mull An array is an object, so null is a placeholder return. o findodds: no parameter, returns an array of ints (all of the odd-valued scores) o calculateAverage: no parameters; returns a double (the average of all scores) o tostring: no parameters; returns a String containing all scores o tostringInReverse: no parameters; returns a String containing all scores in reverse order Compile Scores and run the following in interactions. Do not continue until your program compiles and the following code runs without error in interactions. Scores s new Scores (null); intI] evenss.findEvens (; intl] odds s.findodds) h double avg s.calculateAverage()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!