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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!