This repository was archived by the owner on Jan 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproductionRun.h
More file actions
98 lines (84 loc) · 5.72 KB
/
Copy pathproductionRun.h
File metadata and controls
98 lines (84 loc) · 5.72 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*----------------------------------------------------------------------------+
| Author: Jerome Richards |
| |
| Assignment: Project 10 |
| File: productionRun.h |
| |
| Instructor: Dr. Roger deBry |
| Class: CNS-1350 Section X01 |
| |
| Date Written: April 03, 2005 |
| |
| Description: CProductionRun class definition |
+----------------------------------------------------------------------------*/
#ifndef productionRunH
#define productionRunH
#include <string>
using namespace std;
class CBatch;
class CProductionRun
{
public:
/*----------------------------------------------------------------------------+
| Purpose: Initialize the CProductionRun object |
| |
| Parameters: run - an integer representing the run number |
| id - a string representing the production line |
| life - a double for the number of hours the bulb burned |
| batch - a pointer to the CBatch object the production run |
| is contained |
| |
| Returns: nothing |
| |
| Pre-conditions: batch is a valid pointer to a CBatch object |
| |
| Post-conditions: none |
+----------------------------------------------------------------------------*/
CProductionRun( int run, string id, double life, CBatch* batch );
/*----------------------------------------------------------------------------+
| Purpose: Release any dynamically allocated memory |
| |
| Parameters: none |
| Returns: nothing |
| |
| Pre-conditions: none |
| Post-conditions: none |
+----------------------------------------------------------------------------*/
virtual ~CProductionRun();
/*----------------------------------------------------------------------------+
| Purpose: Return the run number |
| |
| Parameters: none |
| Returns: an int representing the run number |
| |
| Pre-conditions: none |
| Post-conditions: none |
+----------------------------------------------------------------------------*/
int getRun();
/*----------------------------------------------------------------------------+
| Purpose: Return the life of the bulb |
| |
| Parameters: none |
| Returns: a double representing the number of hours the bulb burned |
| |
| Pre-conditions: none |
| Post-conditions: none |
+----------------------------------------------------------------------------*/
double getLife();
/*----------------------------------------------------------------------------+
| Purpose: Return the batch object the production run belongs to |
| |
| Parameters: none |
| Returns: a CBatch pointer |
| |
| Pre-conditions: none |
| Post-conditions: none |
+----------------------------------------------------------------------------*/
CBatch* getBatch();
private:
int itsRun;
string itsID;
double itsLife;
CBatch* itsBatch;
};
#endif