Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Methods are groups of statements written together to perform specific tasks. They are reusable and make codes more readable. (a) Write a static

   

1. Methods are groups of statements written together to perform specific tasks. They are reusable and make codes more readable. (a) Write a static method called higher Salary that receives salary1 and salary2 as parameters. This method will compare the two parameter values and return either one of them that is higher than the other. [4 marks] (b) Write a static method called calcBonus which accepts two parameters which are salesID (such as 101) and sales. It then calculates and return the bonus received by the salesman in which the bonus is 12% from the sales. [4 marks]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Architecture Fundamentals And Principles Of Computer Design

Authors: Joseph D. Dumas II

2nd Edition

1032097337, 978-1032097336

More Books

Students also viewed these Programming questions

Question

In a system with light damping (c Answered: 1 week ago

Answered: 1 week ago

Question

11. What is an ANOVA table?

Answered: 1 week ago