Create a folder named Project02.
In the folder Project02, create two separate
files (with .java extensions) that solve the following problems:
Problem 1:
Define a public class named
MethodFunctionTest (recall that the file you type your Java code in should be a
file named MethodFunctionTest.java). Define the main method. The main method
should prompt the user to input an integer.
Put the integer read into the variable "number." Print the number and its cube.
In order to calculate the cube of
an integer, define a method named cube that will receive one parameter (the
value to be cubed). The cube method is to
compute and return the cube of the integer passed into it.
Problem 2:
Define a public class named
MethodProcedureTest (so you need to type your program in a file called
MethodProcedureTest.java). Define the main method which is to call the method
PrintThreeTimes. Upon
return from that method, the main method is to print the string "I'm done." The
PrintThreeTimes method should
print the string "One, two, three" on three separate line.
Electronically submit your folder Project02 (use the submit command as
described in Project01).