KeanPerson #keanld:int #keanEmail:String #firstName:String #lastName: String KeanAlumni -yearOfGraduation: int - employmentStatus: String + KeanPerson() + KeanPerson(keanld: int, keanEmail: String, firstName: String, lastName: String) + getKeanld(): int + getKeanEmail(): String +getFirstName(): String + getLastName(): String + setFirstName(firstName: String): void + setLastName(lastName: String): void +toString(): String +getParkingRate(): double + KeanAlumni() + KeanAlumni(keanld: int, keanEmail: String, firstName: String, lastName: String, yearOfGraduation: int, employmentStatus: String) +getYearOfGraduation(): int + setYearOfGraduation(yearOfGraduation: int): void +toString(): String +getParkingRate(): double In this question, write Java code to Create and Test the superclass: Abstract KeanPerson and a subclass of the KeanPerson: KeanAlumni. Task 1: Implement Abstract Class KeanPerson using UML (10 points) • Four data fields • Two constructors (1 default and 1 constructor with all fields) • Getters and setters for firstName and lastName • Getters for keanEmail and keanld • Override toString(): create your toString to match the example output • Abstract method getParkingRate() Task 2: Implement Public Class KeanAlumni extends KeanPerson (10 points) Note: • KeanAlumni has two new properties: a yearOfGraduation (for example, 2020) and a employmentStatus (for example, full-time employee). • Two constructors (1 default and 1 constructor with all fields) • Also, please implement the abstract method getParkingRate() (for example, return 9.99). • In KeanAlumni's toString method, please not only show the two variables in KeanAlumni, but also use the super keyword to show the superclass's variables. • Getter and setter for yearOfGraduation • Don't need to create a getter and setter for employmentStatus Task 3: Test Class KeanAlumni (5 points) • Create a main method in KeanAlumni • Create one KeanAlumni object with parameters of your choice (create the actual data yourself) in the main method. • Display/print these objects to the Console. Example output: keanId: 10000, keanEmail: jt@kean,edu, firstName: John, lastName: Tim, yearOfGraduation: 2020, employmentStatus: full-time Submit all the source code you created for this assignment, including the parent's code and child's code.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter3: Using Methods, Classes, And Objects
Section: Chapter Questions
Problem 1GZ
icon
Related questions
Question
KeanPerson
#keanld:int
#keanEmail:String
#firstName:String
#lastName: String
KeanAlumni
-yearOfGraduation: int
- employmentStatus: String
+ KeanPerson()
+ KeanPerson(keanld: int, keanEmail:
String, firstName: String, lastName: String)
+ getKeanld(): int
+ getKeanEmail(): String
+getFirstName(): String
+ getLastName(): String
+ setFirstName(firstName: String): void
+ setLastName(lastName: String): void
+toString(): String
+getParkingRate(): double
+ KeanAlumni()
+ KeanAlumni(keanld: int, keanEmail: String,
firstName: String, lastName: String,
yearOfGraduation: int, employmentStatus: String)
+getYearOfGraduation(): int
+ setYearOfGraduation(yearOfGraduation: int): void
+toString(): String
+getParkingRate(): double
In this question, write Java code to Create and Test the superclass: Abstract KeanPerson and a subclass of the KeanPerson: KeanAlumni.
Task 1: Implement Abstract Class KeanPerson using UML (10 points)
• Four data fields
• Two constructors (1 default and 1 constructor with all fields)
• Getters and setters for firstName and lastName
• Getters for keanEmail and keanld
• Override toString(): create your toString to match the example output
• Abstract method getParkingRate()
Transcribed Image Text:KeanPerson #keanld:int #keanEmail:String #firstName:String #lastName: String KeanAlumni -yearOfGraduation: int - employmentStatus: String + KeanPerson() + KeanPerson(keanld: int, keanEmail: String, firstName: String, lastName: String) + getKeanld(): int + getKeanEmail(): String +getFirstName(): String + getLastName(): String + setFirstName(firstName: String): void + setLastName(lastName: String): void +toString(): String +getParkingRate(): double + KeanAlumni() + KeanAlumni(keanld: int, keanEmail: String, firstName: String, lastName: String, yearOfGraduation: int, employmentStatus: String) +getYearOfGraduation(): int + setYearOfGraduation(yearOfGraduation: int): void +toString(): String +getParkingRate(): double In this question, write Java code to Create and Test the superclass: Abstract KeanPerson and a subclass of the KeanPerson: KeanAlumni. Task 1: Implement Abstract Class KeanPerson using UML (10 points) • Four data fields • Two constructors (1 default and 1 constructor with all fields) • Getters and setters for firstName and lastName • Getters for keanEmail and keanld • Override toString(): create your toString to match the example output • Abstract method getParkingRate()
Task 2: Implement Public Class KeanAlumni extends KeanPerson (10 points)
Note:
• KeanAlumni has two new properties: a yearOfGraduation (for example, 2020) and a employmentStatus (for example, full-time employee).
• Two constructors (1 default and 1 constructor with all fields)
• Also, please implement the abstract method getParkingRate() (for example, return 9.99).
• In KeanAlumni's toString method, please not only show the two variables in KeanAlumni, but also use the super keyword to show the superclass's variables.
• Getter and setter for yearOfGraduation
• Don't need to create a getter and setter for employmentStatus
Task 3: Test Class KeanAlumni (5 points)
• Create a main method in KeanAlumni
• Create one KeanAlumni object with parameters of your choice (create the actual data yourself) in the main method.
•
Display/print these objects to the Console.
Example output:
keanId: 10000, keanEmail: jt@kean,edu, firstName: John, lastName: Tim, yearOfGraduation: 2020, employmentStatus: full-time
Submit all the source code you created for this assignment, including the parent's code and child's code.
Transcribed Image Text:Task 2: Implement Public Class KeanAlumni extends KeanPerson (10 points) Note: • KeanAlumni has two new properties: a yearOfGraduation (for example, 2020) and a employmentStatus (for example, full-time employee). • Two constructors (1 default and 1 constructor with all fields) • Also, please implement the abstract method getParkingRate() (for example, return 9.99). • In KeanAlumni's toString method, please not only show the two variables in KeanAlumni, but also use the super keyword to show the superclass's variables. • Getter and setter for yearOfGraduation • Don't need to create a getter and setter for employmentStatus Task 3: Test Class KeanAlumni (5 points) • Create a main method in KeanAlumni • Create one KeanAlumni object with parameters of your choice (create the actual data yourself) in the main method. • Display/print these objects to the Console. Example output: keanId: 10000, keanEmail: jt@kean,edu, firstName: John, lastName: Tim, yearOfGraduation: 2020, employmentStatus: full-time Submit all the source code you created for this assignment, including the parent's code and child's code.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning