Unit code/nameDue dateTotal marksAssessment 3 Problem Solving ExerciseICT 104: Fundamentals of Computability Week 12, FridayTime: 5pm 100 marksWeighting: 45% General Instruction for students Each student must submit a zip file which includes one folder for each task. In each folder, the Java code for the task and a document with a set of screenshots must be included to show the program has been successfully tested. Task 1 (50 marks)In this task, you will experiment with three sorting algorithms and compare their performances.a. Design a class named SortingAlgorithms with a main method.b. Implement a static method bubbleSort that takes an array and its size and sorts thearray using bubble sort algorithm. (5 marks)c. Implement a static method selectionSort that takes an array and its size and sortsthe array using selection sort algorithm. (5 marks)d. Implement a static method insertionSort that takes an array and its size and sorts thearray using insertion sort algorithm. (5 marks)e. In the main method, generate random arrays of different sizes, 100, 1000, 5000,10000, etc. (5 marks)f. Call each of the aforementioned sorting algorithms to sort these random arrays. You need to measure the execution time of each and take a note. (10 marks)g. Prepare a table of execution times and write a short report to compare the performance of these three sorting algorithms. (15 marks)Please note, you need to submit the Java code with a Ms Word document (or a PDF file) which includes the screenshots of the program to show each part is complete and tested. The document must also report on the recorded execution times and a discussion on the performance of algorithms.(5 marks)
Task 2 (50 marks)Your job is to implement a system for a video rental store to manage the videos and the customers. Each customer registers and can borrow up to two videos simultaneously for maximum of 5 days. If the video is not returned on time, a fine amount of 1$/day is applied. Launch BlueJ (or Eclipse) and create a new project and name it as Task2 and save it in the Task2 folder in your submission. Then, create the classes you are asked in the following parts of the question.(a) In the project file, create a class for customer (name it Customer). Identify the required attributes for customers and the data type of each attribute. (5 marks) (b) Provide comments in the Customer class and briefly explain each attribute.(1 mark)(4 marks)(d) Provide comments for constructors, setter and getter methods using Javadoc.(1 mark)(e) Provide a main method for the Customer class and define two objects and test yourmethods. You need to include a screenshot of the output of your program in the solution document to show that your methods are working correctly.(5 marks)(f) In the project file, create a class for video (name it Video). Identify the required attributes for videos and the type of each attribute.(c) Implement constructors, setter and getter methods for class Customer.(g) Provide comments in the Video class and briefly explain each attribute.(5 marks)(1 mark)(5 marks)(h) Implement constructors, getter and setter methods for class Video.(i) Provide comments for constructors, setter and getter methods using Javadoc.(1 mark)(j) Implement these three methods for Video class: (12 marks, 4 marks each)public void rent(customer,Date)//It rents the item to a customer from a specific datepublic boolean isOverdue(Date)//If the item is on loan and is not returned on a specific date, the method returns true, otherwise, it returns false. public int calculateFine(Date)//If the item is overdue, the fine is calculated for the delay, otherwise, it returns 0.
(k) Provide a main method for the video class and define several objects of video and customer to test your methods. You need to include a screenshot of the output of your program in the solution document to show that your methods are working correctly.(10 marks)Hint: For this task, you need to use class Date. Java provides the Date class available in java.util package, this class encapsulates the current date and time.The following program simply shows how can you use this class: import java.util.Date;public class DateExample { public static void main(String args[]) { // Instantiate a Date object Date currentDate = new Date(); // Print the current time and date using toString() System.out.println(currentDate.toString()); }} The output of the program will look like this:Tue Mar 08 12:27:56 UTC 2022