Page 1 of 1

Your job is to implement a system for a video rental store to manage the videos and the customers. Each customer registe

Posted: Mon Jun 06, 2022 6:01 pm
by answerhappygod
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.
(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