Advertisement
Guest User

MPlease Header Kulang

a guest
Jun 25th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. #pragma once
  2. #include <iostream>
  3. #include<fstream>
  4. #include <string>
  5. #include<deque>
  6. #include <cstdlib>
  7. using namespace std;
  8.  
  9. struct Movie
  10. {
  11. int vidID, copies;
  12. string title, genre, production, filename;
  13. };
  14.  
  15. class MovieList
  16. {
  17. protected:
  18. struct MovieNode
  19. {
  20. Movie movies;
  21. struct MovieNode *next;
  22. };
  23. MovieNode *mnodehead;
  24.  
  25. public:
  26. MovieList();
  27. ~MovieList();
  28. void ReturnMovie(int vidID);
  29. void RentMovie(int vidID);
  30. void InsertNewMovie(Movie movie);
  31. void ShowMovieDetails(int vidID);
  32. void PrintMovieList();
  33. void MovieInfile(ifstream &infile, Movie loader[]);
  34. int MovieLineCount(ifstream &infile);
  35. int MovieIDGenerator();
  36. bool Availability(int vidID);
  37. void CheckAvailability(int vidID);
  38. };
  39.  
  40. struct Customer
  41. {
  42. int custID;
  43. string name, address;
  44. };
  45.  
  46. class CustomerList
  47. {
  48. protected:
  49. struct CustomerNode
  50. {
  51. Customer customers;
  52. struct CustomerNode *next;
  53. };
  54. CustomerNode *cnodehead;
  55. public:
  56. CustomerList();
  57. ~CustomerList();
  58. void CustomerInfile(ifstream &infile, Customer loader[]);
  59. int CustomerLineCount(ifstream &infile);
  60. int CustomerIDGenerator();
  61. void addCustomer(struct Customer);
  62. void showCustomer(int ID);
  63. void printCustomerList();
  64. };
  65.  
  66. struct CustomerRent
  67. {
  68. Customer customerRenting;
  69. deque <int> vidID;
  70. };
  71.  
  72. class CustomerRentedList : public CustomerList, public MovieList
  73. {
  74. private:
  75. /*struct CustomerRentedNode
  76. {
  77. CustomerRent Renter;
  78. struct CustomerRentedNode *next;
  79. };
  80. CustomerRentedNode *crnodehead;*/
  81. deque<CustomerRent>Renter;
  82. public:
  83. CustomerRentedList();
  84. ~CustomerRentedList();
  85. void RentAVideo(int custID, deque<int> vidcodes);
  86. //void RentAVideo(int custID, int vidID);
  87. //void Insert(Movie movietoberented, Customer customerwhoisrenting);
  88. //void Insert(int custID, Movie MovieToBeRented);
  89. void ShowMovieTitle(int vidID);
  90. void ReturnVideo();
  91. void PrintAllRented(int custID);
  92. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement