
I need help completing the java program segment at the locations of
// #### your code here ...
to acquire the input from the user using a Scanner. Assuming there is no user input error and both methods, find_day() and out_weekday(), already exist and work correctly.
So the following program is supposed to ask the user for the month as a string and the day of the month as an integer.
import java.util.Scanner;
public class OutDays
{
public static void main(String[] args)
{
// #### your code here for ...
int year day, weekday;
String month;
String outday = "";
System.out.printf("Enter the month%n");
// #### your code here ...
System.out.printf("Enter the day%n");
// #### your code here ...
weekday = find_day(month, day);
outday = out_weekday(weekday);
System.out.printf("The day is: %s%n", outday);
}
}

Step by stepSolved in 2 steps

- I needed some help with this java homework assignement. We use eclipse. CIS365 Hw1: Count LetterWrite a Java program (CountLetter.java). Input a sentence from keyboard. Print out how many letters "a", "e", "o" and the percentage of each letter in the whole sentence. Please enter a sentence, ended by period '.': (5 points)Sentence.... (10 points)There are 20 letters (10 points)a: 1, 5% (20 points)e: 0, 0% (20 points)o: 4, 20% (20 points)arrow_forwardWrite Java code to read strings of lower-case letters from the keyboard and count the number of vowels in each word. (vowels are a,e,i,o and u). When all strings have been read in, print the string that has the largest number of vowels (duplicates included) and how many vowels were in the string. When more than one string has the greatest number of vowels, print the first string found with that number. For example, with input of she groceries yourselves here radio, the correct answer would be: groceries – 4 vowels.arrow_forwardthis needs to be corrected The file provided in the code editor to the right contains syntax and/or logic errors. In each case, determine and fix the problem, remove all syntax and coding errors. java import java.util.Scanner; public class DebugThree3 { public static void main(String args[]) { String name; name = getName() displayGreeting(namme); } public static String getName(void) { String name; Scanner input = new Scanner(System.in); System.in.print("Enter name "); name = input.nexlLine(); return namer; } public static displayGreeting(String name) { System.outprintln("Hello, " + name + "!"); } }arrow_forward
- The following program is supposed to ask the user for the month as a string and the day of the month as an integer. You need to complete the java program segment at the locations of #### your code here to acquire the input from the user using a Scanner. Assume there is no user input error and both methods, find day() and out weekday(), already exist and work correctly. import java.util.scanner; public class OutDays public static void main(String[] args) V/ #### your code here for .. int year day, weekday; String month; String outday = """; System.out.printf("Enter the monthin") ; f/ #### your code here ... System.out.printf("Enter the day n"); // #### your code here ... weekday = find day (month, day): outday = out weekday(weekday) ; System.out.printf(The day is: $s%n", outday): LGarrow_forwardUse Java language and the last digit of ID is a 7arrow_forwardI am trying to write a java code to see if the number entered by the user is a factor of the random number generated from the import java.util.Random. When I run it it keeps saying the number entered by the user is not a factor of the random number. Another thing is the output is suppose to look like this... The value <number entered by user> is a / not a factor of <random number> how would I fix what i have to look like that?arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





