No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
5 Posted Topics
public void findHighestNumber(int timesToLoop) { int highNumber = 0; int counter = 0; int userInput = 0; while(counter < timesToLoop) { System.out.print("Enter a whole number: "); userInput = reader.getInput(); counter++; System.out.println(""); } if(userInput > highNumber) { highNumber = userInput; } if(counter == timesToLoop) { System.out.println("Finished looping! Highest is " +highNumber); … | |
Simple Sound Player Goal The goal of this assignment is to implement a simple sound player. The application has been partially implemented, and you need to complete the missing bits. When you open the project, you will see the class structure depicted below. Three of the classes are fully implemented … | |
public String getCurrentDay() { if(day.getValue() == 0) { return "Sunday"; } if(day.getValue() == 1) { return "Monday"; } if(day.getValue() == 2) { return "Tuesday"; } if(day.getValue() == 3) { return "Wednesday"; } if(day.getValue() == 4) { return "Thursday"; } if(day.getValue() == 5) { return "Friday"; } if(day.getValue() == 6) { … | |
public void compareStrings() This method will prompt the user to type two strings and will put them into different String variables. Then it will compare those strings to see if they are the same, i.e. have the same letters in the same order. If the strings are the same, “same” … |
The End.