Question: Can someone please help me with this lab? (code is pasted under) /** * StudentApp.java 11/12/2013 * * Use this application to test the methods
Can someone please help me with this lab? (code is pasted under)


/** * StudentApp.java 11/12/2013 * * Use this application to test the methods * in the Student class * */ public class StudentApp { public static void main(String[] args) { Student stu1 = new Student("Amy Average", 8, "89 92 70 86 92 82 80 96"); System.out.println(stu1); System.out.println("Information for " + stu1.getName()); System.out.println("\tHighest grade: " + stu1.getHighest()); System.out.println("\tLowest grade: " + stu1.getLowest()); System.out.println("\tPassing grades: " + stu1.getNumPassing()); System.out.println("\tAverage: " + stu1.getAverage()); if(stu1.isIncreasing()) System.out.println("\tShows improvement! Adjusted average: " + stu1.getAdjustedAverage()); if(stu1.isDecreasing()) System.out.println("\tTutorials recommended!"); // ------------------------------------------ System.out.println(" "); Student stu2 = new Student("Isaiah Improve", 8, "62 68 72 77 85 88 92 95"); System.out.println(stu2); System.out.println("Information for " + stu2.getName()); System.out.println("\tHighest grade: " + stu2.getHighest()); System.out.println("\tLowest grade: " + stu2.getLowest()); System.out.println("\tPassing grades: " + stu2.getNumPassing()); System.out.println("\tAverage: " + stu2.getAverage()); if(stu2.isIncreasing()) System.out.println("\tShows improvement! Adjusted average: " + stu2.getAdjustedAverage()); if(stu2.isDecreasing()) System.out.println("\tTutorials recommended!"); // ---------------------------------------------- System.out.println(" "); Student stu3 = new Student("Freddy Fail", 8, "86 81 79 71 68 62 50 0"); System.out.println(stu3); System.out.println("Information for " + stu3.getName()); System.out.println("\tHighest grade: " + stu3.getHighest()); System.out.println("\tLowest grade: " + stu3.getLowest()); System.out.println("\tPassing grades: " + stu3.getNumPassing()); System.out.println("\tAverage: " + stu3.getAverage()); if(stu3.isIncreasing()) System.out.println("\tShows improvement! Adjusted average: " + stu3.getAdjustedAverage()); if(stu3.isDecreasing()) System.out.println("\tTutorials recommended! "); } }Student Lab Lab Goal: This lab was designed to teach you how to use an array and learn some of the common array algorithms. Lab Description: Write a Studeut class. The data we will store for a student is their name and array of grades. A UML diagram of the class is shown below. The data type listed after the rethol name is the retum type of the rethod Student String name int [ grades Student (nane:String, size:int, grades: String) getName String getAverage double getHighest) int getLosest) int getNumPassing) : int isIncreasing ) : boolean isDecreasing ) : boolean getAdjustedaverage double toString) : String 1. 2. 3. Create a Java Class file named Student. Add2 instance variables. The constructor requires 3 parameters, the name, the number of grades, and a gradeList that is a String of grades. The code should initialize the name and the size of the array Then using the Scanmer class, fill the atray with grades. Rcmeubet to impott java.util.Scanner 4. The frst five r cthods should return what the rcthod narrc indicates. 5. The method islncreasing returns true if every value is greater than the value before it in 6. The method isDecreasing retums true if every value is less than the value before it in the 7. The method getAdjustedAverage does not include the lowest score in the array when 8. The toString method returns the name followed by a list of the grades tho aray, false otherwise. Use a for loop. If a value is not grcater than the previous valuo, return false. A fier the loop is complete, the array is increasing so return true. array, false otherwise calculating the average. Files Needed Student.java StudentAppjava This fle is in student share. It is to be used to test yout Student class. Comment or uncomment the lines of code as you complet the methods in Student. Student Lab Lab Goal: This lab was designed to teach you how to use an array and learn some of the common array algorithms. Lab Description: Write a Studeut class. The data we will store for a student is their name and array of grades. A UML diagram of the class is shown below. The data type listed after the rethol name is the retum type of the rethod Student String name int [ grades Student (nane:String, size:int, grades: String) getName String getAverage double getHighest) int getLosest) int getNumPassing) : int isIncreasing ) : boolean isDecreasing ) : boolean getAdjustedaverage double toString) : String 1. 2. 3. Create a Java Class file named Student. Add2 instance variables. The constructor requires 3 parameters, the name, the number of grades, and a gradeList that is a String of grades. The code should initialize the name and the size of the array Then using the Scanmer class, fill the atray with grades. Rcmeubet to impott java.util.Scanner 4. The frst five r cthods should return what the rcthod narrc indicates. 5. The method islncreasing returns true if every value is greater than the value before it in 6. The method isDecreasing retums true if every value is less than the value before it in the 7. The method getAdjustedAverage does not include the lowest score in the array when 8. The toString method returns the name followed by a list of the grades tho aray, false otherwise. Use a for loop. If a value is not grcater than the previous valuo, return false. A fier the loop is complete, the array is increasing so return true. array, false otherwise calculating the average. Files Needed Student.java StudentAppjava This fle is in student share. It is to be used to test yout Student class. Comment or uncomment the lines of code as you complet the methods in Student
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
