Guest User

Untitled

a guest
Jul 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. ##Purchase.h
  2. #ifndef PURCHASE_H
  3. #define PURCHASE_H
  4. #include "Transaction.h"
  5. #include "Customer.h"
  6. #include "InvItem.h"
  7.  
  8. //foreward declaration
  9. class Customer;
  10.  
  11. //Subclass of Transaction that specifically formats a purchase transaction
  12. class Purchase : public Transaction { //ERROR: Purchase.h:12: error: expected class-name before ‘{’ token
  13. //...
  14. };
  15. #endif
  16.  
  17. ##Trade.h
  18. #ifndef TRADE_H
  19. #define TRADE_H
  20. #include "Transaction.h"
  21. #include "Customer.h"
  22. #include "InvItem.h"
  23.  
  24. //foreward declaration
  25. class Customer;
  26.  
  27. //Subclass of Transaction that specifically formats a trade transaction
  28. class Trade : public Transaction {
  29. //...
  30. };
  31. #endif
  32.  
  33. ##Transaction.h
  34. #ifndef TRANSACTION_H
  35. #define TRANSACTION_H
  36. #include <iostream>
  37. #include <string>
  38. #include <sstream>
  39. #include "Customer.h"
  40. #include "InvItem.h"
  41.  
  42. using namespace std;
  43.  
  44. //forward declaration for transaction
  45. class Customer;
  46.  
  47. // Represents a single transaction. This is an abstract type. In practice, its subclasses
  48. // will actually be used to differentiate between the different types of transactions (trade
  49. // and purchase).
  50. class Transaction {
  51. //..
  52. };
  53. #endif
  54.  
  55. ##Customer.h
  56. #ifndef CUSTOMER_H
  57. #define CUSTOMER_H
  58. #include <iostream>
  59. #include <string>
  60. #include <vector>
  61. #include "InvItem.h"
  62. #include "Transaction.h"
  63. #include "Trade.h"
  64. #include "Purchase.h"
  65.  
  66. using namespace std;
  67.  
  68. //forward declaration for transaction
  69. class Transaction;
  70.  
  71. //Represents a single customer. Responsible for keeping track of
  72. class Customer {
  73. //...
  74. };
Add Comment
Please, Sign In to add comment