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

Create a program which includes the following: A mainmethod; a method that print

ID: 3615105 • Letter: C

Question

Create a program which includes the following: A mainmethod; a method that prints the
proverb to the user and asks them to choose how they would like itto end; And a method to
finish the proverb based upon the selection by the user. Theproverb is: “Now is the time for all
good men to come to the aid of their ______”. The userwill enter either 1 or 2 as an option to
how they would like this proverb to end. If a 1 is entered,the proverb should finish with the word
“party”. If a 2 is entered, it should end withthe word “country”. The selection of the word
should be done in a method, which receives the choice from the mainmethod and uses it to
select the appropriate output. Name your programLab9_Ex2.java

Explanation / Answer

please rate - thanks import java.util.*; public class untitled { public static void main(String[] args) {Scanner in = new Scanner(System.in); int choice; System.out.print("Now is the time for all good men to come to theaid of their ___"); System.out.println("How do you want to finish this? 1- party 2-country ?"); choice=in.nextInt(); printit(choice); } public static void printit(int choice) {System.out.print("Now is the time for all good men to come to theaid of their "); if(choice==1)     System.out.println("party"); else     System.out.println("country"); } }

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