A digital video recorder (DVR) is a device capable of recording TV programs as requested by the user.
The user can schedule several programs ahead of time to be recorded.
A basic DVR will only let you record one channel at a time, but advanced DVRs have two or more tuners,
which allows you to record several channels simultaneously.
In this part, we will design and implement a module to keep track of the scheduled programs.
The API of this module must contain a minimum of the following methods:
- a method to schedule a program to be recorded, including the name of the program, the start and stop time, and the channel
- a method to specify how many tuners the DVR has (the number of channels the DVR is able to record at the same time)
- a method to query the scheduling conflicts
(i.e. where more than the specified capacity of channels are scheduled to be recorded at the same time)
Your code should include one or more simple tests to show how it is intended to be used.
Please include the following test case, as well as any other test cases you
deem necessary:
On Tuesday 2011-05-17:
Program "A" records from 9:00 PM to 9:30 PM (on channel 3)
Program "B" records from 9:10 PM to 11:30 PM (on channel 2)
Program "C" records from 10:50 PM to 11:50 PM (on channel 1)
For this part, you are allowed to use any common external library, such as JUnit, Joda-Time, Apache Commons etc.