Answered step by step
Verified Expert Solution
Question
1 Approved Answer
this is to be done in Java 1. Make a class and call it Class a. Again, make sure to add .data to the end
this is to be done in Java
1. Make a class and call it Class a. Again, make sure to add .data to the end of the package if it is not there 2. Make three instance variables: a String to represent the name, an int to represent the grade received, and a Teacher to represent the teacher of the class a. These should all be private 3. Make five static final int variables to represent the grades A, B, C, D, and F assigned the values 4, 3,2,1, and 0, respectively 4. Make a default and overloaded constructor a. The default should initialize all variables to reasonable default values i. For Teacher, a reasonable default would be to create a default Teacher object b. The overloaded constructor should accept parameter for all the instance variables 5. Make getters only for name, grade, and teacher For grade, make two getters: getGradeCode () and getGradeLetter () i. getGradeCode () should return the int value of the grade ii. getGradeLetter() should return a String representation of the grade 1. Use an if/else/if chain and the constants made is step 3 to determine which String to return aStep 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