Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write an application InputApplication. (An application has a main method.) Create a Scanner object and do the following.. Ask the user to enter a word
Write an application InputApplication. (An application has a main method.)
Create a Scanner object and do the following..
- Ask the user to enter a word using this exact prompt: System.out.print("Enter a word: ");
- Use Scanner's next method to get the word
- Print the last letter of the word
- Ask the user to enter a double using this exact prompt: System.out.print("Enter a double: ");
- Use Scanner's nextDouble method to get the double
- Now ask the user to enter a integer using this prompt: System.out.print("Enter an integer: ");
- Use Scanner's nextInt method to get the integer
- Calculate the product of the double and the integer (Product means multiply)
- Print the product on a new line.
- Print the integer portion of the product on a new line.(Think cast)
Only create one Scanner.
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