Question
*This java program will request three inputs: an adjective, a noun, and a past-tense verb. Prompt for and read inputs and store them in three
*This java program will request three inputs: an adjective, a noun, and a past-tense verb. Prompt for and read inputs and store them in three different String variables. Then, youll output the following sentence with the three inputs inserted. ie. The adjective noun verb over the lazy brown dog.
Heres what the output should look like:
Please enter an adjective:
What is given to me
import java.util.Scanner; public class MadLib { public static void main(String[] args) { String adjective, noun, verb; Scanner input = new Scanner(System.in);
// Prompt for and read in 3 inputs System.out.println("Please enter an adjective:"); /* Output the sentence with the inputs inserted */ } }
smart Please enter a noun: teacher Please enter a verb ending in -ed: sneezed The smart teacher sneezed over the lazy brown dog.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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