This project is a simple Purchase and Customer Management System implemented in C++. It allows users to manage customers and their purchases, providing functionalities to add, update, delete, and display customer and purchase information. The system also allows saving and loading data from files.
- Add, update, and delete customer information
- Add and display purchase information
- Display total spend for a customer
- Save and load customer and purchase data from files
- Print all customers and purchases
- Sort customers by account number
The project uses the following standard C++ libraries:
<iostream>for input/output operations<string>for string manipulations<vector>for dynamic array handling<fstream>for file input/output operations<algorithm>for sorting and other algorithm operations<sstream>for string stream manipulations<iomanip>for input/output formatting<limits>for handling input limits
Represents a single purchase with the following attributes:
accountNumber: An integer representing the account numberitem: A string representing the item namedate: A string representing the purchase dateamount: A double representing the purchase amount
Manages a collection of Purchase objects and provides functionalities to:
- Load purchases from a file
- Print all purchases
- Print purchases by account number
- Print total spend for a customer
- Add new purchases
- Save purchases to a file
Represents a customer with the following attributes:
firstName: A string representing the first namelastName: A string representing the last nameaccountNumber: An integer representing the account numberstreetAddress: A string representing the street addresscity: A string representing the citystate: A string representing the statezipCode: A string representing the ZIP codephoneNumber: A string representing the phone number
Manages a collection of Customer objects and provides functionalities to:
- Load customers from a file
- Print all customers
- Print sorted customers
- Print customer account information
- Print total spend for a customer
- Add new customers
- Update and delete customer information
- Save customers to a file
- Compile the code using a C++ compiler:
g++ -o customer_management main.cpp