Problem description
Develop a mini DVD manager for a video store and save up to 6 DVDs to manage the discs.
The main features of the manager are:
1. View DVD information.
The menu selects the View function to display the DVD's information.
2. New DVD information
Select the new feature, follow the prompts to enter a new DVD name, add to inventory, if the DVD shelf is full, that is, 6 cards, you will be prompted to increase the failure.
3. Delete DVD information
Execute the Delete command, enter the name of the DVD you want to delete, and do not allow deletion if the DVD is in a loan state. If you do not have the DVD information, you are prompted to "no matching information found";
4. Lend a DVD
If the DVD has been lent, the system prompts "XX has been lent". If the DVD information is not found, the system prompts "no matching information found!" ”。 And one months default to 31 days, if the loan date entered is greater than 31 number, then the system gives the prompt "must enter a number greater than or equal to 1 and less than or equal to 31, please reenter."
5. Return DVD
Calculate rent, 1 days 1 yuan. If the returned DVD is not loaned out, the system prompts "the DVD is not loaned out and the return operation cannot be performed." If the returned DVD does not match the DVD in the list, the system prompts "no matching information found." , if the return time is less than the loan time, or the number is greater than 31, the system prompts that the "return date cannot be less than the loan date, please re-enter, and one months only 31 days, please re-enter." ”
6, when the user executes the Exit command, the end of this program.
Simple DVD Management-java exercises