Answered step by step
Verified Expert Solution
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started