-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
60 lines (54 loc) · 1.77 KB
/
main.cpp
File metadata and controls
60 lines (54 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*------------------------------------------------------------------------------
* Author - Aaron Parks
* Instructor - Professor Carol Zander
* Course - CSS 343 (17:35 - 19:50)
* Quarter - Winter 2010
* Assignment - Lab 4: MOVIE Store
* Version - version4
* Date Started - 26, February 2010
* Date Complete - 08, March 2010
* Date Typescript - 10, March 2010
*
* Description -
* Using information we've learned in CSS 342 and in this course -- CSS 343 --
* we create program that will create and popuate collections of objects and
* then perform an indefinite number of transactions upon those objects.
*
* Concepts Utilized -
* -> pointers -> linked lists -> binary trees
* -> memory management -> hash tables -> inheritance
* -> operator overloading -> ofstream manipulation
-----------------------------------------------------------------------------*/
#include "store.h"
#include <fstream>
#include <iostream>
using namespace std;
int main()
{
//read in customer file
ifstream customer_f("data4customers.txt");
if (!customer_f)
{
cout << "Error reading customer file!" << endl;
return 1;
}
//read in movie file
ifstream movie_f("data4movies.txt");
if (!movie_f)
{
cout << "Error reading customer file!" << endl;
return 1;
}
//read in command file
ifstream command_f("data4commands.txt");
if (!command_f)
{
cout << "Error reading command file!" << endl;
return 1;
}
//create and populate CustomerArray and TreeArray (and Trees)
Store newStore(customer_f, movie_f);
newStore.startDay(command_f);
newStore.endDay();
return 0;
}