XYZ Company gives year-end bonus to its employees based on their number of year service and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
XYZ Company gives year-end bonus to its employees based on their number of year service and their salary. using the following: Years of Service 1 2 to 5 6 to 10 50% of salary 11 and above 75% of salary Follow the UML design below and the sample output to test the program if it is working properly. -name: String -NumYears: int -Salary: double -Bonus: double bonus +getName: String +getNumYears0: int +getSalary0: double +getBonus(): double +toString(): String Bonus 10% of salary 20% of salary +SetEmployee (name: String, NumYears; int, Salary: double): void +SetBonus(NumYears: int, Salary: double): void Also write a test program (TestBonus) to exercise the class. Sample Output: Name: Juan Dela Cruz Number of years: 1 Salary: 1000 Name: Juan Dela Cruz Number of years: 2 Salary: 1000 Name: Juan Dela Cruz Number of years: 5 Salary: 1000 Hi! Juan Dela Cruz Hi! Juan Dela Cruz Your Bonus is: 200 Hi! Juan Dela Cruz Your Bonus is: 200 Your Bonus is: 100 This is 10% of your salary This is 20% of your salary This is 50% of your salary Name: Juan Dela Cruz Number of years: 13 Salary: 1000 Hi! Juan Dela Cruz Your Bonus is: 750 This is 75% of your salary XYZ Company gives year-end bonus to its employees based on their number of year service and their salary. using the following: Years of Service 1 2 to 5 6 to 10 50% of salary 11 and above 75% of salary Follow the UML design below and the sample output to test the program if it is working properly. -name: String -NumYears: int -Salary: double -Bonus: double bonus +getName: String +getNumYears0: int +getSalary0: double +getBonus(): double +toString(): String Bonus 10% of salary 20% of salary +SetEmployee (name: String, NumYears; int, Salary: double): void +SetBonus(NumYears: int, Salary: double): void Also write a test program (TestBonus) to exercise the class. Sample Output: Name: Juan Dela Cruz Number of years: 1 Salary: 1000 Name: Juan Dela Cruz Number of years: 2 Salary: 1000 Name: Juan Dela Cruz Number of years: 5 Salary: 1000 Hi! Juan Dela Cruz Hi! Juan Dela Cruz Your Bonus is: 200 Hi! Juan Dela Cruz Your Bonus is: 200 Your Bonus is: 100 This is 10% of your salary This is 20% of your salary This is 50% of your salary Name: Juan Dela Cruz Number of years: 13 Salary: 1000 Hi! Juan Dela Cruz Your Bonus is: 750 This is 75% of your salary
Expert Answer:
Answer rating: 100% (QA)
Based on the provided UML design here is the Java implementation for the Bonus class and a TestBonus ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
On January 1, 2024, Adventure World issues $40.4 million of 9% bonds, due in 20 years, with interest payable semiannually on June 30 and December 31 each year. The proceeds will be used to build a...
-
A random sample of data was collected on residential sales in a large city. The following table shows the sales price Y (in $ 1,000s), area X1 (in hundreds of square feet), number of bedrooms X2,...
-
Theresa Pratt works in the business office at Mills College, a technical college in Council Bluffs, Iowa. She has created a workbook to store and analyze registration and employee data. The workbook...
-
Count Dracula, the most famous vampire, rumored to have killed at least 200,000 people, was based on a real person who lived in eastern Europe about 600 years ago. He was indeed a "monster," although...
-
It takes a flea 1.0 103 s to reach a peak speed of 0.74 m/s. (a) If the mass of the flea is 0.45 106 kg, what is the average power required? (b) Insect muscle has a maximum output of 60 W/kg. If...
-
Question 20 12 pts You are planning an excavation activity using a hydraulic excavator with a bucket capacity of 3 CY and a maximum digging depth of 25 feet. The material for this excavation is a...
-
Why are non-voting shares disliked by the investing institutions?
-
Scheduled payments of $1400 due today and $1600 due with interest at 11.5% compounded annually in five years are to be replaced by two equal payments. The first replacement payment is due in 18...
-
To Design a multi-cultural forum with the theme "diversity creates dimension in the world". on western Sahara. speaking on pressing issues in Organizational culture from the perspectives of their...
-
Fourth-Sixth-Twelfth Bank currently pays an annuall dividend of $1.40 per share. After extensive analysis, you forecast that the Bank's stock will continue to pay the $1.40 dividend for four years....
-
The nominal money demand curve will shift to the right if the price level decreases the nominal interest rate decreases consumption decreases real income increases the nominal interest rate increases...
-
How would a company know that its product or service was preferred in the marketplace? What could a competitor do to erode this favorable position?
-
It is claimed that problem definition and decision-making are intertwined. Explain.
-
Clarify the difference between risk and regret.
-
Why are most engineers likely to have experience with deterministic risk and not probabilistic risk?
-
Managers must be problem-solvers but are not always decision-makers. Do you agree? Disagree? Provide an example that clarifies your position.
-
Required : Refer to Tesla, Inc.'s 2019 Form 10K and specifically item 8, Financial Statements and Supplementary Data, which is included in the financial information section of course documents...
-
Horse serum containing specific antibody to snake venom has been a successful approach to treating snakebite in humans. How do you think this anti-venom could be generated? What are some advantages...
-
Brian and Kim have a 12-year-old child, Stan. For 2012, Brian and Kim have taxable income of $52,000, and Stan has nonqualifying dividend income of $4,500 and investment expenses of $250. No election...
-
Mike sells his home to Jane on April 2, 2012. Jane pays the property taxes covering the full calendar year in October, which amount to $2,500. How much may Mike and Jane each deduct for property...
-
Clifford Johnson has a limited partnership investment and a rental condominium. Clifford actively manages the rental condominium. During 2012, his share of the loss from the limited partnership was...
-
Selected information follow for Bush Company: Required a. Calculate the following ratios for 2019. The 2018 results are given for comparative purposes. b. Comment on the changes between the two...
-
Sales of automotive products for Ford Motor Company and General Motors Corporation for a five-year period are: Net sales for Pfizer Inc. and Abbott Laboratories for the same five years follow:...
-
Consider the following financial statements for Nixon Company. During the year, management obtained additional bond financing to enlarge its production facilities. The plant addition produced a new...
Study smarter with the SolutionInn App