Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 a

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatio Temporal Database Management International Workshop Stdbm 99 Edinburgh Scotland September 10 11 1999 Proceedings Lncs 1678

Authors: Michael H. Bohlen ,Christian S. Jensen ,Michel O. Scholl

1999th Edition

3540664017, 978-3540664017

More Books

Students also viewed these Databases questions

Question

\f

Answered: 1 week ago