-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNumber_Command.h
More file actions
43 lines (35 loc) · 837 Bytes
/
Copy pathNumber_Command.h
File metadata and controls
43 lines (35 loc) · 837 Bytes
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
// -*- C++ -*-
//==============================================================================
/**
* @file Number_Command.h
*
* Honor Pledge:
*
* I pledge that I have neither given nor received any help
* on this assignment.
*/
//==============================================================================
#ifndef _NUMBER_COMMAND_H_
#define _NUMBER_COMMAND_H_
#include "Stack.h"
#include "Expr_Command.h"
/**
* @class Number_Command
*
*
*/
class Number_Command: public Expr_Command
{
public:
// constructor
Number_Command (Stack <int> & s, int n);
/**
* method that defines how to execute the number command to just push the number onto the stack
*/
virtual void execute (void);
private:
// receiver
Stack <int> & s_;
int n_;
};
#endif // !defined _NUMBER_COMMAND_H_