Question: Create a class called Student with three PRIVATE instance variables, A String name, a String letterGrade and an int numGrade. The Student class will also
Create a class called Student with three PRIVATE instance variables, A String name, a String letterGrade and an int numGrade. The Student class will also have 6 instance methods which will allows us to get and set the values of the instance variable (Setters and Getters) and one instance method called studentinto, displaying the students information The names of the methods will simply be the names of the instance variables with set or get as a prefox, le setName, getName, setletterGrace, getletterGrade NumGrade, getNumGrade The ods should return the corresponding instance variable you are trying to return, so getName should simply return the instance variable name and ts urn type should be the same type of the instance variable Set methods return nothing, take one parameter (the datatype should be the same type as the instance variable you are modifyingl and simply set the value of the parameter as the the value ot the corresponding instance variable. LE setNamel Sandra"] should set the instance variable name to "Sandra" NOTE: The only setter that takes In no parameters is the setLetterGrade, this method will set the letter grade based on the number grade set and get methods tor letterGrade should be PRIVATE All others should be publc In the setter for setletterGrade, you will set the letter grade based on the value of the numGrade, if numGrade is between 100-8B set letterGrade to A, 88-76 B,76-64 C 64-52 D, below 52F The studentinto method should simply return a string with the students name, numGrade, and letterGrade. If the student is named Marsha and her number grade is 92, the method should return studentsinfo method, NOT the Instance variables Student Marsha, Number Grade 92, Letter Grade: A" NOTE: You MUST use the get methods of each Instance variable for the ctor tor the Student class that takes in two parameter, A string for the name of the student and an int for the numGrade of the student After you method create 3 students, Place them in a Student array then in a for loop, print out every students info
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
