Question: Please use simple codes from Chapter 3 and 4 of Building Java. Don't add much complexity. Need the program in Java JGrasp Write a method

Please use simple codes from Chapter 3 and 4 of Building Java.

Don't add much complexity.

Need the program in Java JGrasp

Write a method that prompts for a whole number. If the number is 67 or greater, print PASSING; otherwise, print NOT PASSING.

Write a method that prompts for a String. If the String is "green" (any casing), print GO, if the String is "yellow", print SLOW, otherwise, print STOP.

Write a method that takes a whole number as a parameter. If the number is even, print EVEN, otherwise, print ODD.

Write a method that takes a whole number as a parameter. If the number is evenly divisible by 5, return "MULTIPLE OF 5", otherwise, return "NOT A MULTIPLE OF 5".

Write a method that prompts for a whole number. If the number is less than 10, print ONE DIGIT; if the number is greater than or equal to 10 and less than 100, print TWO DIGITS; if the number is greater than or equal to 100 and less than 1000, print THREE DIGITS; otherwise print MANY DIGITS.

Write a method that prompts for a jersey number (whole number). If that number is 12, 71, or 80, print "That number is retired from the Seattle Seahawks!", otherwise do nothing.

Write a method that takes the name of a state as a parameter. If the state is Washington, Oregon, or Idaho, print This state is in the PNW, otherwise print You should move to the PNW; its great here!

Write a method that prompts for a one of the following: SHORT, TALL, GRANDE, VENTI. Return the number of ounces that drink includes (8, 12, 16, 20 respectively).

Starting code with test cases

public class PracticeInputAndIf { public static void main(String[] args) { // problem1(console); // problem2(console); // problem3(200); // problem3(19221); // String multi5 = problem4(25); // System.out.println(multi5); // multi5 = problem4(22); // System.out.println(multi5); // problem5(console); // problem6(console); // problem7("washington"); // problem7("Texas"); // int oz = problem8(console); // System.out.println("contains " + oz + " ounces."); } }

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!