/* *~*~* Specification file for the Customer class Written By: Iurii Tatishchev Changed by: Iurii Tatishchev IDE: CLion *~**/ #ifndef CUSTOMER_H_ #define CUSTOMER_H_ #include using std::string, std::ostream; class Customer; // Forward Declaration class Customer { private: int year; int mileage; int seq; string name; int priority; int serial; public: Customer() : year(0), mileage(0), seq(0), name("") {}; Customer(int y, int m, int s, string n) : year(y), mileage(m), seq(s), name(std::move(n)) { priority = mileage / 1000 + year - seq; serial = priority * 100 + (100 - seq); }; int getPriority() const { return priority; } int getSerial() const { return serial; } friend ostream &operator<<(ostream &os, const Customer &c) { os << c.year << " " << c.mileage << " (" << c.getSerial() << ") [" << c.name << "]"; return os; } }; #endif