Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write appropriate method headings for the following methods: Calculate and retur

ID: 3766953 • Letter: W

Question

Write appropriate method headings for the following methods: Calculate and return the sum of two decimal numbers. Compute and return the average speed of a car, given the distance traveled (as in int) and traveling time (in hours and minutes of type int). Given the radius of a circle, output the area of the circle. Given a student's name and three test scores (of type int), output the student's name and average test score. Given a number, return true if the number is a prime; otherwise, return false. Given the cost of an item and the sales tax (as a decimal number), return the total sale price. Given a decimal number, output the square root if the number is nonnegative; otherwise, output an appropriate error message.

Explanation / Answer

As you asked only the headings of the methods, here are the headings for you:

e. Given a number, return true if the number is prime; otherwise, return false.

boolean isPrime(int number)

f. Given the cost of an item and the sales tax (as a decimal number), return the total sale price.

double totalSalePrice(double costPrice, int salesTax)

g. Given a decimal number, output the square root if the number is non-negative; otherwise, output an appropriate error message.

void squareRoot(int number)

Ofcourse, there are real trivial functions. If you need any further clarification, or you need the implementation for this code, just get back to me.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote