Question: return Create a public method that will return the area of a triangle. The parameters for base and height should allow for decimal values. In

 return Create a public method that will return the area of

return Create a public method that will return the area of a triangle. The parameters for base and height should allow for decimal values. In the body, first multiply the base times height, then divide by 2 (or multiply by .5). Return the answer. For example, if the base is 3 and the height is 10 = (3.10)/2 = 15. Answer: public double Create a public method that will return the area of a circle. Allow for decimal values to be passed in and returned. For the value of pi, use a literal value of 3.14. The body will square the radius value (passed in as a parameter) and then multiply by 3. 14. Return the answer. For example, if the radius is 6 = (6*6)*3.14 = 113.04. Answer: 3) Create a public method that will return the cubed value of a number. The parameter should only accept integer values. Multiply the parameter 3 times to return the cubed value. For example, if the number is 4 = 4 * 4 * 4 = 64. Answer: 4) Create a public method that will return the amount of sales tax on an order. To calculate the sales tax we need to know the amount of the order, and the sales tax percentage. Accept both of these parameters as decimal values. We will then multiply the amount by the percentage to determine the sales tax amount. For example, if the order anount is 16.75, and the tax percentage is 0.88 = 16.75 0.88 = 1.34 of sales tax on this order. Answer: MacBook Air

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 Databases Questions!