-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStack_Expr_Command_Factory.cpp
More file actions
45 lines (38 loc) · 1.26 KB
/
Stack_Expr_Command_Factory.cpp
File metadata and controls
45 lines (38 loc) · 1.26 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
// Honor Pledge: ashstrin
//
// I pledge that I have neither given nor received any help
// on this assignment.
Stack_Expr_Command_Factory::~Stack_Expr_Command_Factory(){
}
Stack_Expr_Command_Factory::Stack_Expr_Command_Factory(){
}
Stack_Expr_Command_Factory::Stack_Expr_Command_Factory(Stack<int> & s){
}
Add_Command * Stack_Expr_Command_Factory::create_add_command(void){
Add_Command * add = new Add_Command();
return add;
}
Subtract_Command * Stack_Expr_Command_Factory::create_subtract_command(void){
Subtract_Command * sub = new Subtract_Command();
return sub;
}
Mult_Command * Stack_Expr_Command_Factory::create_mult_command(void){
Mult_Command * mult = new Mult_Command();
return mult;
}
Div_Command * Stack_Expr_Command_Factory::create_div_command(void){
Div_Command * div = new Div_Command();
return div;
}
Number_Command * Stack_Expr_Command_Factory::create_number_command(int operand){
Number_Command * num = new Number_Command(operand);
return num;
}
Left_Parenth_Command * Stack_Expr_Command_Factory::create_left_par_command(){
Left_Parenth_Command * par = new Left_Parenth_Command();
return par;
}
Right_Parenth_Command * Stack_Expr_Command_Factory::create_right_par_command(){
Right_Parenth_Command * par = new Right_Parenth_Command();
return par;
}