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 10:00
When is an original work considered public domain? a. when posted via social media b. when it is posted on the internet c. when a copyright symbol is not included with the piece of work d. when explicit permission is given by the author / owner
Answers: 1
question
Computers and Technology, 22.06.2019 10:30
Think about a recent customer service experience - either positive or negative. write a brief summary of that experience. now think about those four characteristics we look for in customer service representatives. how did the representative in your example stack up? write down your answer and give specific examples.
Answers: 1
question
Computers and Technology, 23.06.2019 09:20
How to print: number is equal to: 1 and it is odd number number is equal to: 2 and it is even number number is equal to: 3 and it is odd number number is equal to: 4 and it is even number in the console using java using 1 if statement, 1 while loop, 1 else loop also using % to check odds and evens
Answers: 3
question
Computers and Technology, 24.06.2019 10:30
You're programming an infinite loop. what must you include in your code to prevent crashes? in roblox
Answers: 2
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, 10.05.2021 17:30
question
Mathematics, 10.05.2021 17:30
question
Chemistry, 10.05.2021 17:30
question
Mathematics, 10.05.2021 17:30
Questions on the website: 13722363