Question: with java Student class : class Student{ private String first; private String last; private double grade; private static int studentNumber=0; Student(){ studentNumber++; } Student(String f,
Question 6.1: Consider the Student class with its private instance variables (Lab 5) and the following methods: 14. The constructor 1 that do nothing. 15. The getGrade method that returns the grade of one student. 16. The static showStudent method that uses a student object as parameter and displays the information of this object. a. Add the read method that reads from the keyboard the information of one student. The grade should be between 40 and 100 . 17. In the TestStudent class with main method, a. Create 3 objects S1, S2 and S3. b. Read the information of each student. c. Show the average of the grades. Question 6.2: 1. Now create a static read method in TestStudent class that creates a student object, reads the information of this object and returns it. What you should add in the Student class to write the read method? 2. How to call this method in main to read the information of the three students. 3. Show the information of each student using showStudent method. Question 6.3: 1. Now in main method, consider an array STUD of 3 students instead of S1, S2 and S3. 2. Call the read method of the TestStudent class to fill the Array of Students. 3. Modify the showStudent method to show the students with grades greater or equal to 60
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
