Question
// i need help with this program below. i have to organize the top scores that are listen within the program, the scores are in
// i need help with this program below. i have to organize the top scores that are listen within the program, the scores are in the line that reads int [] grades = {78, 88, 97, 75, 82, 63, 91}; it has to be written in java programming and the software that im using is dr java
public class Scores { private int [] scores; Scores(int [] grades) { scores = new int[grades.length]; for (int i = 0; i < grades.length; i++) { scores[i] = grades[i]; } } public int getTopScore() { // Your code here } } public class TopScore { public static void main(String [] args) { int [] grades = {78, 88, 97, 75, 82, 63, 91}; Scores sc = new Scores(grades); int top = sc.getTopScore(); System.out.println("Top score is " + top); } }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started