Question: Java Assignment (Classes and objects)Define a class named Student with private fields name and grade. Implement: a) a constructor, b) a setter method for each
Java Assignment
(Classes and objects)Define a class named Student with private fields name and grade. Implement: a) a constructor, b) a setter method for each field, c) a getter method for each field, and d) a print method that prints the name and the grade.
In a separate class StudentGrades. Write a main method that declares three Student objects: Ann (grade=A), Bob (grade=B), and Clare (Grade=C). Use their print method to print out their names and grades.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
