Computers and Technology

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

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 01:00, joedawg50
What is added to the < meta > tag to describe the encoding type?
Answers: 1
image
Computers and Technology, 22.06.2019 12:10, Geo777
1. package newton’s method for approximating square roots (case study 3.6) in a function named newton. this function expects the input number as an argument and returns the estimate of its square root. the script should also include a main function that allows the user to compute square roots of inputs until she presses the enter/return key. 2. convert newton’s method for approximating square roots in project 1 to a recursive function named newton. (hint: the estimate of the square root should be passed as a second argument to the function.) 3. elena complains that the recursive newton function in project 2 includes an extra argument for the estimate. the function’s users should not have to provide this value, which is always the same, when they call this function. modify the definition of the function so that it uses a keyword parameter with the appropriate default value for this argument, and call the function without a second argument to demonstrate that it solves this problem. 4. restructure newton’s method (case study 3.6) by decomposing it into three cooperating functions. the newton function can use either the recursive strategy of project 1 or the iterative strategy of case study 3.6. the task of testing for the limit is assigned to a function named limitreached, whereas the task of computing a new approximation is assigned to a function named improveestimate. each function expects the relevant arguments and returns an appropriate value. 5. a list is sorted in ascending order if it is empty or each item except the last one is less than or equal to its successor. define a predicate issorted that expects a list as an argument and returns true if the list is sorted, or returns false otherwise. (hint: for a list of length 2 or greater, loop through the list and compare pairs of items, from left to right, and return false if the first item in a pair is greater.)
Answers: 1
image
Computers and Technology, 22.06.2019 13:30, 21megoplin
In which phase does software coding and testing happen in the spiral model? the spiral model does not have a separate testing phase. both, software coding and testing occurs during the phase.
Answers: 3
image
Computers and Technology, 23.06.2019 16:00, cravens511peeelg
An english teacher would like to divide 8 boys and 10 girls into groups, each with the same combination of boys and girls and nobody left out. what is the greatest number of groups that can be formed?
Answers: 2
Do you know the correct answer?
There Are Two Programs in this Question who will attempt first i will give brainliest ans reward and...

Questions in other subjects:

Konu
Mathematics, 20.05.2021 03:50