Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create Java Program that solves this question 1. Create 2 interfaces: BankInterface and PetInterface. BankInterface contains only 1 abstract method: accountType() which does not return

Create Java Program that solves this question

image

1. Create 2 interfaces: BankInterface and PetInterface. BankInterface contains only 1 abstract method: accountType() which does not return anything and takes 1 string argument: accType. PetInterface contains only 1 abstract method: petType() which does not return anything and takes 1 String argument petType. 2. Create an abstract class named Student. This class contains 2 instance variables, 1 constructor, and 2 abstract methods. a. Instance variables: stId and stName (Use appropriate data type for each.) b. A 2-argument constructor that will be called eventually from its subclass to load 2 instance variables of this level during the creation of an object of its subclass. 2 abstract methods: getStId and getStName. Each of these methods, when sub classed into concrete ones, should return the respective values of the instance variables stId and stName. d. At this level you should do something to get the object state at this level. This means you need to override the toString() method.

Step by Step Solution

3.37 Rating (166 Votes )

There are 3 Steps involved in it

Step: 1

Interface BankInterface interface BankInterface void accountTypeString accType Interface PetInterfac... 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_2

Step: 3

blur-text-image_3

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

Smith and Roberson Business Law

Authors: Richard A. Mann, Barry S. Roberts

15th Edition

1285141903, 1285141903, 9781285141909, 978-0538473637

More Books

Students also viewed these Programming questions

Question

Present main arguments for and against the computer metaphor.

Answered: 1 week ago