Question: Part 1: Code a public instance method called bonusData () that receives salespersonID, name, quarter, totalSales, and bonusRate as a percent in decimal form

Part 1: Code a public instance method called bonusData () that receives

Part 1: Code a public instance method called bonusData () that receives salespersonID, name, quarter, totalSales, and bonusRate as a percent in decimal form (in that order) and return a formatted String with the received data plus a calculated quarterly bonus when it is called. Use an object instance that is already declared called bonus to call the method by sending it the following arguments: "012585", "Amber Jenkins", 3, 125000, 0.015. The method call itself is an argument in a printf(). NOTE: Representation of floating point values are to be rounded to the nearest hundredth, and if the value is money then the proper symbol is to be included. 1 //Code method header. String.format("%nSales Person ID: + "%nName: + "%nQuarter: + "%n Total Sales: + "%nBonus Rate: + "%nQuarterly Bonus: " " //Enter the format specifiers after each label. //Represents rounded money. %%" %n", //Represents rounded money. //List the arguments for each format specifier of which 2 are calculations. }//END Method System.out.printf("%%s", ); //Method call argument. Part 2: Recode bonusData() as an overloaded instance method that only receives the necessary arguments to calculate a bonus amount and return that amount to the calling program. //Code method header. { //returns the calculation of the bonus amount. }//END method

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!