Basic Algorithms in Java Assignment
Task 1, Value: 5 marks
Write a complete Java program with the following functionality:
Welcome to Numbers Program!
Thank you for using our program!
As an example, if the first and last values entered by the user were 1 and 3 respectively, the table in the output would look something like the following:
Number Square Cube
1 1 1
2 4 8
3 9 27
Total: 6 14 36
You may assume that the user of the program enters the inputs as required (inputs are integers and the first one is smaller than the last one) so that no input validation or error checking is necessary.
Ensure that the program is appropriately documented throughout and thoroughly tested to demonstrate its correct operation.
Task 2, Value: 5 marks
Basic Algorithms in Java Assignment
Write a complete Java program designed to calculate the total charge corresponding to purchase of books at a fictional Annual Melbourne Book Festival. The price of each book is based on its category as described below:
The program will continue asking the user to enter the number of books they purchased from each category, calculating bills until the user enters n in response to a final prompt asking if another calculation is required.
An example run of the program might look like the following (user inputs are shown in bold): Basic Algorithms in Java Assignment