Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##Purchase.h
- #ifndef PURCHASE_H
- #define PURCHASE_H
- #include "Transaction.h"
- #include "Customer.h"
- #include "InvItem.h"
- //foreward declaration
- class Customer;
- //Subclass of Transaction that specifically formats a purchase transaction
- class Purchase : public Transaction { //ERROR: Purchase.h:12: error: expected class-name before ‘{’ token
- //...
- };
- #endif
- ##Trade.h
- #ifndef TRADE_H
- #define TRADE_H
- #include "Transaction.h"
- #include "Customer.h"
- #include "InvItem.h"
- //foreward declaration
- class Customer;
- //Subclass of Transaction that specifically formats a trade transaction
- class Trade : public Transaction {
- //...
- };
- #endif
- ##Transaction.h
- #ifndef TRANSACTION_H
- #define TRANSACTION_H
- #include <iostream>
- #include <string>
- #include <sstream>
- #include "Customer.h"
- #include "InvItem.h"
- using namespace std;
- //forward declaration for transaction
- class Customer;
- // Represents a single transaction. This is an abstract type. In practice, its subclasses
- // will actually be used to differentiate between the different types of transactions (trade
- // and purchase).
- class Transaction {
- //..
- };
- #endif
- ##Customer.h
- #ifndef CUSTOMER_H
- #define CUSTOMER_H
- #include <iostream>
- #include <string>
- #include <vector>
- #include "InvItem.h"
- #include "Transaction.h"
- #include "Trade.h"
- #include "Purchase.h"
- using namespace std;
- //forward declaration for transaction
- class Transaction;
- //Represents a single customer. Responsible for keeping track of
- class Customer {
- //...
- };
Add Comment
Please, Sign In to add comment