Consider the following detailed inheritance hierarchy diagram:
(ATTACHED IN IMAGE)
The person constructor has two string parameters, a first name, and the last name. The constructor initializes the e-mail address to the first letter of the first name followed by the first five letters of the last name followed by @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 late name followed by @jc.com
A) Implement the person constructor:
B) Override Object's toString method for the Person class. The toString method should return the present state of the object. Assume that the constructor writer for the previous part of this problem works as intended.
C) Write both the Person and Student class headers so that the Student is a subclass of Person.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here