Question
Complete the following program using the following classes and interface Declare and define all functions / variables. ( JAVA ) public abstract class Person{ //
Complete the following program using the following classes and interface Declare and define all functions / variables. ( JAVA )
public abstract class Person{ // create a protected String variable called name // create a constructor with one String parameter called name // create an abstract function called getIdentification that returns a String }
public class Professor extends Person{ // create a private String variable called departement // create a constructor with two string parameters ( name & departement) // override getIdentification function by returning name and the departementof the Professor }
public class Undegrade extends Person implements Students{ // create a protected string variable called major // create a constructor with two parameters to initilize name and major // override getIdentification function by returning name and the focus of Undergrad as one string // override enroll function by returning the string " Enroll Success " }
// create an interface called Student and add a function called enroll that returns a string
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