Please solve follwong 3 questions (using java) (every question is different) 1.Create a class called Employee whose objects are records for an employee. This class will be a derived class of the class Person. An employee record has an employee's name (which is a private property and inherited from the class Person), an annual salary represented as a single value of type double & private property, a year the employee started work as a single value of type int and a national insurance number, which is a value of type String & private property of the Employee class. Write another class containing a main method to fully test your class definition.
Please solve follwong 3 questions (using java)
(every question is different)
1.Create a class called Employee whose objects are records for an employee. This class will be a derived class of the class Person. An employee record has an employee's name (which is a private property and inherited from the class Person), an annual salary represented as a single value of type double & private property, a year the employee started work as a single value of type int and a national insurance number, which is a value of type String & private property of the Employee class. Write another class containing a main method to fully test your class definition.
2.Create a class called Bank which contains bank’s name, address, number of branch of that bank. Usually a bank has different scheme like savings account, fixed deposit, DPS. All scheme has different interest rate like 4%, 6%, and 4.5%. Write class for each scheme which inherit bank class & must implement a method which calculate amount including interest rate based on any amount.
3.Create an class named Pet which contains 3 method named getName(), setName() & play(). Create a class named Cat that inherit Pet class & contains a method named eat(). Create another class named Fish that also inherit Pet class & override play() ethod. Write a test application that demonstrates each class’s capabilities.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps