Question
Asked by:
$15.00 methods in java
- From Computer-Science: Programming-Methods , Computer-Science: General-CS
- Closed, but you can still post tutorials
- Due on Feb. 15, 2009
- Asked on Feb 14, 2009 at 10:52:56PM
Q:This is in Java. Cannot use any Math classes
Should have a driver for each method
Write a public static method named wholePart that takes a double as its argument and returns a double that is just the whole part of the number (that which is on the left side of the decimal point).
Write a public static method named validScore that takes a double as its argument and returns the argument only if it is between 0 and 100 inclusive. If the argument does not meet that specification, a console window print statement should state that an error condition exists and ask for a valid number, which should be then returned if valid. import java.util.Scanner;is already present in your program in the right place.
Write a public static method named chunk30 that takes a double and returns an integer that represents the number of chunks of 30 in that number. A chunk of 30 is 30, or any part thereof. For example, given the following arguments, the returned value would be:
60 returns 2, 15 returns 1, 91.2 returns 4, 0.17 returns 1, etc.



