// File: prg10_5.cpp // the program simulates inventory maintenance for a // video store. the program stores the title of a film // and the number of copies the store owns in a video // object. the video class has functions that access // and update the number of copies, compare objects // by title, and output a title and the number of copies. // the function setupInventory() inputs film titles // from the file "films.dat" and creates the stree // object inventory of video data. after listing the // films in the inventory, in an interactive loop // the clerk inputs whether the customer wishes // to rent a film, return a film, or whether business // is over for the day. when a customer rents a film, // the program updates the inventory by reducing the // number of copies of the film by 1, and adds the film // to the stree object rentals that maintains a database // of rented films. when a customer returns a film, the // program removes 1 copy of the film from the rentals // object and increases the number of copies in inventory // by 1. at the end of the business day, the program outputs // the list of rented films and the films remaining in // the inventory #include #include #include #include // for pair class #include "d_stree.h" // stree class #include "d_video.h" // video class #include "d_util.h" // for writeSTree() using namespace std; // initialize inventoryList from file "films.dat" void setupInventory(stree