subject

There Are Two Programs in this Question who will attempt first i will give brainliest ans reward and big points:- Question no 1:-
Consider a base class named Employee and its derived classes HourlyEmployee and PermanentEmployee while taking into account the following criteria.
ï‚· Employee class has two data fields i. e. a name (of type string) and specific empID (of type integer)
ï‚· Both classes (HourlyEmployee and PermanentEmployee) have an attribute named hourlyIncome
ï‚· Both classes (HourlyEmployee and PermanentEmployee) have three-argument constructor to initialize the hourlyIncome as well as data fields of the base class
ï‚· Class HourlyEmployee has a function named calculate_the_hourly_income to calculate
the income of an employee for the actual number of hours he or she worked. One hour income is Rs. 150
ï‚· Similarly, PermanentEmployee class has function named calculate_the_income to calculate the income of an employee that gets paid the salary for exact 240 hours, no matter how many actual hours he or she worked. Again, one hour salary is Rs. 150.
Implement all class definitions with their respective constructors to initialize all data members and functions to compute the total income of an employee. In the main() function, create an instance of both classes (i. e. HourlyEmployee and PermanentEmployee) and test the working of functions that calculate total income of an employee
Question no 2:-
Consider a class BankAccount that has
ï‚· Two attributes i. e. accountID and balance and
ï‚· A function named balanceInquiry() to get information about the current amount in the account
Derive two classes from the BankAccount class i. e. CurrentAccount and the SavingsAccount. Both classes (CurrentAccount and SavingsAccount) inherit all attributes/behaviors from the BankAccount class. In addition, followings are required to be the part of both classes
ï‚· Appropriate constructors to initialize data fields of base class
ï‚· A function named amountWithdrawn(amount) to withdraw certain amount while taken into account the following conditions
o While withdrawing from current account, the minimum balance should not decrease Rs. 5000
o While withdrawing from savings account, the minimum balance should not decrease Rs. 10,000
ï‚· amountDeposit(amount) to deposit amount in the account
In the main() function, create instances of derived classes (i. e. CurrentAccount and SavingsAccount) and invoke their respective functions to test their working

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:50
Answer the following questions regarding your system by using the commands listed in this chapter. for each question, write the command you used to obtain the answer. a. what are the total number of inodes in the root filesystem? how many are currently utilized? how many are available for use? b. what filesystems are currently mounted on your system? c. what filesystems are available to be mounted on your system? d. what filesystems will be automatically mounted at boot time?
Answers: 1
question
Computers and Technology, 24.06.2019 10:10
Which view in a presentation program displays a split window showing the slide in the upper half and a blank space in the lower half?
Answers: 1
question
Computers and Technology, 24.06.2019 21:30
How do i copy and paste equations and pictures like math graphs, to post on this site to get my questions answered?
Answers: 2
question
Computers and Technology, 24.06.2019 21:30
The hybrid uses 144 to 158 volt batteries.
Answers: 1
You know the right answer?
There Are Two Programs in this Question who will attempt first i will give brainliest ans reward and...
Questions
question
Mathematics, 26.06.2019 07:30
Questions on the website: 13722363