Question
1. You will write a short java application that uses a loop control structure. use the scanner class to accept a number between 1 and
1. You will write a short java application that uses a loop control structure. use the scanner class to accept a number between 1 and 10 from the user, while the number entered is not between 1 and 10 (inclusive), an error message will be displayed “the number entered was not between 1 and 10!” and the program will loop back to prompt the user for another number. if the number entered is between 1 and 10 (inclusive), the application will display a message “good job! the number you entered is ” and the program will end, do not use a break statement in your program, take a screenshot to verify that your message is displayed successfully, cut and paste the screenshot into a word document and attach this document to your submission.
2. You will write a short java application that will accept five strings from the user, each string will be a word in a sentence, the first word will be a subject, the second word will be a verb, the third word will be an adjective, the fourth word will be an object, and the fifth word will be an adverb, after all five words are entered, display the sentence using the following form: subject - verb - adjective - object – adverb, take a screenshot to verify that your sentence is displayed successfully, cut and paste the screenshot into a word document and attach this document to your submission.
3. Write an application that uses an array to store 10 messages of type string; you can load this data structure with 10 messages of your choosing. for example a message could be “I love java the programming language!” or another message could be “I love java the drink!” you can initialize your array with the messages or have the user enter the messages, the choice is yours. once your array is loaded with 10 messages, use a loop to iterate through your entire list and display each message.
Step by Step Solution
3.36 Rating (159 Votes )
There are 3 Steps involved in it
Step: 1
1 import javautilScanner public class Maxof2 public static void mainString args taking value as command line argument Scanner in new ScannerSystemin S...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started