With this program, you will use the Scanner class and System.out object to perform console I/O. In the main method, you will read in two integers, a double, and the user's name, then print out the name plus the sum of the two numbers and the sum multiplied by the double. You can copy the following code into your main() function to start with. Don't forget to include java.util.Scanner at the top of your file!
// Sample java code to practice using Scanner class // Import the Scanner class from the Java library here public class Lab02 { // define a Scanner reference variable here // note that this reference will have class scope public static void main( String[ ] args) { // create the Scanner object here // prompt and output the user's name // note that the user name may contain spaces // call the add( ) helper method here and output its return // value with an appropriate label on the same line // call the product( ) helper method here and output its return // value with an appropriate label on the same line // call the nextChar( ) helper method here and output its return // value with an appropriate label on the same line } // end of main // define and implement add( ) here // add( ) prompts the user for two integers and returns their sum // define and implement product( ) here // product( ) prompts the user for two doubles and returns their product // define and implement nextChar( ) here // nextChar( ) prompts the user for a character and returns it } // end of Lab02 class