Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions