Write a complete Java program with the following specifications:
• Display a welcoming message such as: “Welcome to Cubing Program!”
• Prompt the user twice to enter two positive whole numbers, indicating starting and finishing values, first one being smaller than the second one
• Calculate the cube of each number from starting value to finishing value and then display an appropriately headered two column table with each row containing the number and its cube
• Display a farewell message such as: “Goodbye, thank you for using our program!”
As an example, if the starting and finishing values were 2 and 4 respectively, the table in the output would look something like the following:
Ensure that the program is appropriately documented throughout and thoroughly tested to demonstrate its correct operation.
You may assume that the user of the program enters the inputs as required so that no input validation or error checking is necessary.
Leave A Comment