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 02:00
What is the largest decimal number that can be represented by a binary number with 4 place values? (remember, each place in a binary number has a value of a power of 2, starting in the ones place with 20.)
Answers: 3
question
Computers and Technology, 23.06.2019 02:30
Three out of five seniors remain undecided about a college major at the end of their senior year.
Answers: 3
question
Computers and Technology, 23.06.2019 13:30
Font size, font style, and are all aspects of character formatting.
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
Plz ( which is an example of a good url?
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, 02.08.2019 20:30
question
Mathematics, 02.08.2019 20:30
question
History, 02.08.2019 20:30
question
Mathematics, 02.08.2019 20:30
Questions on the website: 13722362