Program 2
MULTICHOICE VIDEO RENTAL SHOP needs an Object Oriented program that process the following information about ten (10) videos in their stock
• The title, the director, the year produced and a list of main actors for each video. (If there are more than five main actors, include only the five most famous actors)
• The function setVideo that input information into each video object
• The function getVideo that displays information of a particular video on the screen
• A customer (identified by ID) plus his full names and address can borrow at most 2 videos @ R12.50 per day. A penalty of 10% per day is charged if returned late. The borrow period is at most 7 days
• Video titles should not exceed 25 characters in length. If that happens, truncate the length to a most 25 characters
• A video should be checked if is not rented out before borrow transaction is processed. If borrowed out the customer should either be requested for the second choice or be advised when the video is expected back in the shop
• Failure for the shop to receive the video back within 7 days, is considered permanent loss and the customer is liable to a R400.00 compensation fee
• Information about the number of films in stock at any point in time should be readily available
• At the end of business, a report should be generated showing
o Which films are rented out and when are they due
o To which customers they are borrowed to
o Which videos are left in stock
o How much money was collected for the day
Generate your own test data that will test all cases to illustrate the accuracy and consistency of your program
Either custom bag class or STL linked lists would be easiest.
With STL you will have to spend some time making sure things are iterated the way you want them.
Like for output you'll need a outer loop, and then have a loops for each list, counter for the lists, then break the loops after one run. and use the advance iterator function to move the iterator up by the counter. easier than it sounds, but it works.