1. Create a Superclass University Employee: a. With three attributes to store: 1) baseSalary 2) department...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Create a Superclass University Employee: a. With three attributes to store: 1) baseSalary 2) department 3) yearsWorking b. toString() method which returns a String that indicates the baseSalary, department and the number of years the employee has been working in the university. c. Abstract method computeSalary(). d. Abstract method information(). 2. Extend a Professor class from the University Employee class: a. With one attribute: numOfCourses delivered by the professor. b. Override toString() method of the University Employee class, and return the number of courses delivered by that professor. c. Override computeSalary(): [base Salary+ (yearsWorking * 2000)] + numOfCourses * 1000 d. Override information(): method to print that "I am a professor in .... department and I have been working for... years. I teach ... courses. My base salary is $... and my final salary is $..." 3. Extend a Staff class from the University Employee class: a. With two attribute: bonus and typeOfContract (i.e. full time or part time). b. Override toString() method of the University Employee class, and return the bonus earned by the staff member and type of contract. c. Override computeSalary(): [base Salary + (years Working * 1500)] + bonus d. Override information(): method to print that "I am a staff member in ... department and I have been working for... years and I have worked on a ... contract. My base salary is $... and my final salary is $.... I have earned $.... as bonus." 4. Create a Driver class that: a. Create an array of four university employees, Create two professors and store it in the array, Create two staff members and store it in the array. b. Iterate over the array and print the intro message of the university employees by calling the information() methods. c. Iterate over the array and print the total salaries of all the professors and the total salaries of all the staff members. You may use input: Professor prof1=new Professor(120000,"Computer Science", 12, 4); Staff staff1=new Staff(90000, "Education", 7, 6000, "full time"); 1. Create a Superclass University Employee: a. With three attributes to store: 1) baseSalary 2) department 3) yearsWorking b. toString() method which returns a String that indicates the baseSalary, department and the number of years the employee has been working in the university. c. Abstract method computeSalary(). d. Abstract method information(). 2. Extend a Professor class from the University Employee class: a. With one attribute: numOfCourses delivered by the professor. b. Override toString() method of the University Employee class, and return the number of courses delivered by that professor. c. Override computeSalary(): [base Salary+ (yearsWorking * 2000)] + numOfCourses * 1000 d. Override information(): method to print that "I am a professor in .... department and I have been working for... years. I teach ... courses. My base salary is $... and my final salary is $..." 3. Extend a Staff class from the University Employee class: a. With two attribute: bonus and typeOfContract (i.e. full time or part time). b. Override toString() method of the University Employee class, and return the bonus earned by the staff member and type of contract. c. Override computeSalary(): [base Salary + (years Working * 1500)] + bonus d. Override information(): method to print that "I am a staff member in ... department and I have been working for... years and I have worked on a ... contract. My base salary is $... and my final salary is $.... I have earned $.... as bonus." 4. Create a Driver class that: a. Create an array of four university employees, Create two professors and store it in the array, Create two staff members and store it in the array. b. Iterate over the array and print the intro message of the university employees by calling the information() methods. c. Iterate over the array and print the total salaries of all the professors and the total salaries of all the staff members. You may use input: Professor prof1=new Professor(120000,"Computer Science", 12, 4); Staff staff1=new Staff(90000, "Education", 7, 6000, "full time");
Expert Answer:
Posted Date:
Students also viewed these programming questions
-
You want to be able to withdraw $ 4 0 , 0 0 0 from your account each year for 2 5 years after you retire. You expect to retire in 2 0 years. If your account earns 6 % interest, how much will you need...
-
The more we learn about how fashion is created, the more we face a moral dilemma that pits our individual freedom of expression and purchasing power against both the environment and the dignity and...
-
TranscribedText: Accompanying material for the ebook Introduction to Financial Accounting in the 21% Century - Gaber & Porporato, 5" Edition McGrawHill Term Project: Part II Bookkeeping for a small...
-
MW Canada developed a 90-hour technical training program that was delivered over two months. Because it enabled the loom mechanics to act more independently with less downtime if the total cost was...
-
One would think that playing in the Olympics and then the NBA regular season and postseason would tire any player out. Do the scoring averages of these nine 2008 Olympians who also played in the...
-
An external review should be relevant to the particular internal auditing department being evaluated. To that end, the first step in such a review is to compare the department's charter with the...
-
How is the addition to allowance for uncollectible accounts calculated using the percentage of accounts receivable method?
-
Wallowa Company is considering a long-term investment project called ZIP. ZIP will require an investment of $120,000. It will have a useful life of 4 years and no salvage value . Annual cash inflows...
-
Are ordeing costs and carying couts cconomic ording quantily of mathial
-
The height at time t (in seconds) of a mass, oscillating at the end of a spring, is s(t) = 300 + 32 sin(r) cm. Find the velocity and acceleration at = s. (Use symbolic notation and fractions where...
-
Companies of all sizes need to develop a corporate strategy. You can imagine how complex such strategies get when the organization is a media and sport conglomerate like AEG. AEGis a subsidiary of...
-
Implement a class Rectangle which represents a rectangle shape as described below: A. The Rectangle class has one private class constant DEFAULT_VALUE that should be initialized to 0.0 . B. The...
-
Implement queue using dynamic memory allocation, such that the implementation should follow the following constraints. a. The user should use memory allocation from the heap using new operator. In...
-
How does the auditors professional duty of confidence affect disclosures to third parties?
-
When can auditors disclose unlawful acts to the police?
-
2. (a) Let p be a real number such that p>-1 and p0. Prove by induction that (1+p)" > 1+mp for every integer # 22. (15 marks) (b) Using your results in (a) above, show that the sequence an = (1+)"...
-
The unadjusted trial balance of Secretarial Services is as follows: SECRETARIAL SERVICES Unadjusted Trial Balance as at 31 December 2017 Account Debit Credit Cash at bank Office supplies Prepaid...
-
Katy's Gallery sells quality art work, with prices for individual pieces ranging from \(\$ 300\) to \(\$ 25,000\). Sales are infrequent, typically only three to five pieces per week. The following...
-
The Irvine Company, which has been in business for three years, makes all of its sales on account and does not offer cash discounts. The firm's credit sales, collections from customers, and...
-
Pomona Inc. began business on January 1. LO2, 4 Certain transactions for the year follow: June 8 Received a \(\$ 30,000,60\) day, six percent note on account from R. Elliot. Aug. 7 Received payment...
Study smarter with the SolutionInn App