summaryrefslogtreecommitdiff
path: root/sales_data.hpp
blob: 31929af1d8639d4bb9303c9654a9ccb94b824f13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef SALES_DATA_H
#define SALES_DATA_H
#include <string>
struct SalesData {
	std::string isbn() const { return BookNo; }
	SalesData &combine(const SalesData);
	double avg_price() const;
	std::string BookNo;
	unsigned int UnitsSold = 0;
	double Revenue = 0.0;
};

SalesData add(const SalesData&, const SalesData&);
std::ostream &print(std::ostream&, const SalesData&);
std::istream &read(std::istream&, SalesData&);
#endif