Your job is to implement a system for a video rental store to manage the videos and the customers. Each customer registe
Posted: Fri Apr 29, 2022 6:46 am
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.
(b) Provide comments in the Customer class and briefly
explain each attribute.
(c) Implement constructors, setter and getter methods for
class Customer.
(d) Provide comments for constructors, setter and getter
methods using Javadoc.
(e) Provide a main method for the Customer class and
define two objects and 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.
(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.
(g) Provide comments in the Video class and briefly
explain each attribute.
(h) Implement constructors, getter and setter methods for class
Video.
(i) Provide comments for constructors, setter and getter methods
using Javadoc.
(j) Implement these three methods for Video class:
( public void rent(customer,Date)
//It rents the item to a customer from a specific date
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.
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.
(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.
(b) Provide comments in the Customer class and briefly
explain each attribute.
(c) Implement constructors, setter and getter methods for
class Customer.
(d) Provide comments for constructors, setter and getter
methods using Javadoc.
(e) Provide a main method for the Customer class and
define two objects and 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.
(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.
(g) Provide comments in the Video class and briefly
explain each attribute.
(h) Implement constructors, getter and setter methods for class
Video.
(i) Provide comments for constructors, setter and getter methods
using Javadoc.
(j) Implement these three methods for Video class:
( public void rent(customer,Date)
//It rents the item to a customer from a specific date
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.
public int calculateFine(Date)
//If the item is overdue, the fine is calculated for the delay,
otherwise, it returns 0.