Question
A Java program that contains the definition of your functions: First Function: Make a function called computeAverageScore that returns a double value, the average score
A Java program that contains the definition of your functions:
First Function: Make a function called computeAverageScore that returns a double value, the average score of a student from 5 exams. If the average score will be outputted, format the value by rounding it to two decimal places.
Second Function: Make a function called computeDiscountedPrice, that requires the following parameters: the original price and the discount percentage. The function will compute the discounted price. Format the value with 2 decimal places.
EXAMPLE OUTPUT:
Original Price: 1000.0 Discount Percentage: 20
the value of the discounted price will be: 800.00
Take note of the ERROR TRAPPINGS Test the 2 methods that you have created in the void main. Use Scanner or user inputs.
Step by Step Solution
3.29 Rating (143 Votes )
There are 3 Steps involved in it
Step: 1
Heres a Java program that defines the required functions along with error trapping and input from th...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