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:00 pm
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.
(j) Implement these three methods for Video class: (12 marks, 4
marks each)
1. public void rent(customer,Date)
//It rents the item to a customer from a specific date
2. public 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.
3. public int calculateFine(Date)
//If the item is overdue, the fine is calculated for the delay,
otherwise, it returns 0.
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.
(j) Implement these three methods for Video class: (12 marks, 4
marks each)
1. public void rent(customer,Date)
//It rents the item to a customer from a specific date
2. public 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.
3. public int calculateFine(Date)
//If the item is overdue, the fine is calculated for the delay,
otherwise, it returns 0.