Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <iostream>
- #include<fstream>
- #include <string>
- #include<deque>
- #include <cstdlib>
- using namespace std;
- struct Movie
- {
- int vidID, copies;
- string title, genre, production, filename;
- };
- class MovieList
- {
- protected:
- struct MovieNode
- {
- Movie movies;
- struct MovieNode *next;
- };
- MovieNode *mnodehead;
- public:
- MovieList();
- ~MovieList();
- void ReturnMovie(int vidID);
- void RentMovie(int vidID);
- void InsertNewMovie(Movie movie);
- void ShowMovieDetails(int vidID);
- void PrintMovieList();
- void MovieInfile(ifstream &infile, Movie loader[]);
- int MovieLineCount(ifstream &infile);
- int MovieIDGenerator();
- bool Availability(int vidID);
- void CheckAvailability(int vidID);
- };
- struct Customer
- {
- int custID;
- string name, address;
- };
- class CustomerList
- {
- protected:
- struct CustomerNode
- {
- Customer customers;
- struct CustomerNode *next;
- };
- CustomerNode *cnodehead;
- public:
- CustomerList();
- ~CustomerList();
- void CustomerInfile(ifstream &infile, Customer loader[]);
- int CustomerLineCount(ifstream &infile);
- int CustomerIDGenerator();
- void addCustomer(struct Customer);
- void showCustomer(int ID);
- void printCustomerList();
- };
- struct CustomerRent
- {
- Customer customerRenting;
- deque <int> vidID;
- };
- class CustomerRentedList : public CustomerList, public MovieList
- {
- private:
- /*struct CustomerRentedNode
- {
- CustomerRent Renter;
- struct CustomerRentedNode *next;
- };
- CustomerRentedNode *crnodehead;*/
- deque<CustomerRent>Renter;
- public:
- CustomerRentedList();
- ~CustomerRentedList();
- void RentAVideo(int custID, deque<int> vidcodes);
- //void RentAVideo(int custID, int vidID);
- //void Insert(Movie movietoberented, Customer customerwhoisrenting);
- //void Insert(int custID, Movie MovieToBeRented);
- void ShowMovieTitle(int vidID);
- void ReturnVideo();
- void PrintAllRented(int custID);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement