
Consider a base class Employee which contain basic information of an employee such as:
Name(string)
Address(string)
Id(int)
Gender(string)
Now create two constructors A default constructor to initialize the data member with default values, A four-argument constructor to initialize data field with user-define values ( must use this key word). Getter and setter function to set and get values of data fields.
Derives two classes to show Hierarchical inheritance.
A department class which extends the base class employee also have some its own information such as:
Department Name(string)
Department Id(int).
Now create two constructors a default constructor to initialize the data member with default values, a parameterized constructor to initialize data field with user-define values. Appropriate getter and setter function to set and get values of data fields. A display method to show all the records of employee along with department information.
Create another child class Loan which extends the base class employee and also have some its own properties such as:
Loan Amount(float)
Loan type(string)
Now create two constructors a default constructor to initialize the data member with default values, a parameterized constructor to initialize data field with user-define values. Appropriate getter and setter function to set and get values of data fields. A display method to show all the records of employee along with loan information.
In main class you have to create an object of employee class to set the values of the data member with user define values (either through constructors or setter functions). An object of department class to set the values of the data member with user define values (either through constructors or setter functions)and call the display method. An object of loan class to set the values of the data member with user define values (either through constructors or setter functions)and call the display method.
Programming language :Java
Note: it should not be Plagerised

Step by stepSolved in 3 steps with 1 images

- Overview Construct a hierarchy of classes representing savings and checking accounts as well as a means to ‘filter’ account objects. Account Classes Your solution will consist of 4 account classes as described below. It is your responsibility to define the exact relationship among those classes and translate that relationship into source code structure. There is a correct structure; the skeleton must be modified to reflect the correct relationships. Account – represents a general account with basic operations such as deposit, withdraw, etc. Savings – represents a savings account that must maintain a minimum balance. Checking – represents a checking account that has no minimum balance (this means a zero balance). CappedChecking – represents a checking account that disallows a balance above a particular maximum value. Linking Accounts A bank or credit typically allows a user the ability to link accounts together. That is, I might wish to link my checking account with my savings…arrow_forwardc++arrow_forwardModel a room class, whose member data is three integers length, width and height. The classcontains two constructors to initialize the room class objects, first is no argumentconstructor, while the second in three arguments constructor. Class also contains threemember functions i.e., getdatat) to get the data from user and store in the memory of callingobject and showdata) to show the room data of calling object, int volume(int I, int w, int h)function should receive the length, width and height values from the objects one by one andreturn the volumes of the three objects respectively.Write a main program to declare the three object rl, 12, and 13 of room class. Two objectwill store the values through three argument constructor and third object will get the datafrom user by calling getdata function. Then all three objects should call the volumefunctions to calculate their volumes and store them in three variables of type integer. Finallythe system compare the three volumes values…arrow_forward
- In UML class diagram given below, which attributes and behaviors of the Animal class would be inherited by the Dog class? Animal int # numberOfLegs: # numberOfTails: int # name: String + walk() + run() + eat() + playFetch() Dog A None of the attributes and behaviors are inherited B numberOfLegs, numberOfTails, walk(), run(), eat() (c) All attributes and behaviors of Animal are inherited playFetch()arrow_forwardProgramming Exercise 10-1arrow_forwardCreate a UML Class Model based on the requirements . Your Class Model is to include: All classes Attributes and Attribute Types Associations Multiplicity Primary and Foreign keys Any Inheritance, Composition or Aggregation. Building Maintenance system. A rental property management company wants to develop a ‘Building Maintenance System.’ This system will be used by the company to manage maintenance requests from tenants in the several rental buildings that it manages in the city. Each building has a maintenance manager. The maintenance manager is responsible for creating accounts in the system for each tenant in their building. A tenant can rent multiple apartments within the same building. Tenants can submit maintenance requests using this system. Each maintenance request will have a request ID, category, and description. The maintenance manager manages a maintenance crew in their building. Maintenance crew members can be members of more than one maintenance team. Maintenance crew…arrow_forward
- Define a default constructor that initializes the data members, string title and integer year, with the default values "Empty" and -1, respectively. Ex: If the input is Magnolia 1989, then the output is: Title: Empty, Year: -1 Title: Magnolia, Year: 1989 Note: The class's print function is called first after the default constructor, then again after the inputs are passed to the setters. 5 class Book { 6 public: 7 8 9 10 11 12 13 14 15 }; 16 Book(); void SetTitle(string bookTitle); void Set Year (int bookYear); void Print (); private: string title; int year; 17 Your code goes here */ 18 19 void Book::SetTitle(string hook Title) { CS Scarint (19 bi Title mscanner 22 23 void Book Set Year(int bookYear) [ 2arrow_forwardHelp with c++. Paste indented codearrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY





