Instructions: Code a method called multiplyNumbers() that receives two integers through its parameter list and returns the
Question:
Instructions: Code a method called multiplyNumbers() that receives two integers through its parameter list and returns the product of those two integers. In the main()
- Through a single prompt, ask the user for two integers.
- Call multiplyNumbers() by sending it the two integers.
- Store the value multiplyNumbers() returns in a variable called product.
- Print as follows:
integer1 * integer2 = product
where the actual value for the integers and the product is printed. Example: 3 * 4 = 12 where 3 is integer1, 4 is integer2, and 12 is the product. - Save the code in a program called VRM2.
Line advance at the beginning of a prompt. Line advance at the beginning and end of a message. Triple-line advance (2 "%n") at the beginning of final output and single-line advance at end. Your spacing is to follow the Java Style Guide: double-space after punctuation if prompt or followed by more text/code, else no spaces; single-space after commas.
//Import statement.
//Class header.
//Begin class scope.
//Declare input field to capture keyboard entries.
//main() header.
//Begin method scope.
//Declare and initialize integer1 variable.
//Declare and initialize integer2 variable.
//Declare and initialize product variable.
//Prompt "Enter your first and second integers separated by a space: "
//Capture integer1.
//Capture integer2.
//Call multiplyNumbers().
//Print final output.
//Exit statement.
//End method scope.
//multiplyNumbers header. Use integer1 and integer2 as the parameter variables.
//Begin method scope.
//Return the product from the calculation of the two parameter variables.
//End method scope.
//End class scope.
what to type in exactly in each section
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill