Question
JAVA Write a method named getCategory, that receives numeric value (double) and returns a String, Over, if the value is over 100.0, Average, if the
JAVA
Write a method named getCategory, that receives numeric value (double) and returns a String, "Over", if the value is over 100.0, "Average", if the value is less than or equal to 100.0 and greater than 25.0, "Below" if the value is 25.0 or less. Write a main method that inputs a number, calls getCategory with the number, and prints the returned String. Signature of the method is public static String getCategory(double value)
Run the program. Input 101.0 Run it again, use 25.0. Capture the console output. Run it again, use 14.5. Capture the console output from each run.
Put the program code and console output at the end of your text file
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