Answered step by step
Verified Expert Solution
Question
1 Approved Answer
students are compared to each other by comparing GPAs. implement the compareTo method fit the student class. Consider the following detailed inheritance hierarchy diagram Person
students are compared to each other by comparing GPAs. implement the compareTo method fit the student class.
Consider the following detailed inheritance hierarchy diagram Person private String myFirst Name private String mylastName private String myEmailAddress methods public String getFirstName () public String getlastName () public String getEmailAddress () Student class variables int lastidAssigned (initially set to 20050) instance variables private String myStudentld private double myGpa private double myNumberOfCredits methods void addCourse (int credits, double grade) public String getStudentld () public double getGpa (0) The person constructor has two String parameters: a first name and a last name. the constructor initializes t e-mail address to the first letter of the first name followed by the first five letters of the last name followed @jc.com. If the last name has fewer than five letters, the e-mail address will be the first letter of the first name followed by the entire last name followed by @jc.com. Examples: Name ane Smith John Morris Mary Key Email address Smith@ic.com Morri@ic.com MKey@ic.com Implement the Person constructor
Step 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