-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommandDisplay.cpp
More file actions
42 lines (34 loc) · 1.46 KB
/
CommandDisplay.cpp
File metadata and controls
42 lines (34 loc) · 1.46 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
// Blake Berry
// 03/08/2022
// Homework 4
// This file is an implimentation for the CommandDisplay class. The
// CommandDisplay class inherits from the command interface. The CommandDisplay
// class is responsible for the end - to - end execution of displaying the
// stores item inventory
//-----------------------------------------------------------------------------
#include "CommandDisplay.h"
//-------------------------- constructor -----------------------------------
// creates a CommandDisplay with a given string Indicator
// Postconditions: A CommandDisplay is created
CommandDisplay::CommandDisplay(std::string type) :
Command(type)
{
}
//-------------------------- destructor -----------------------------------
// Frees any dynamic memory associated with the Command object
// Postconditions: The command is freed of any dynamic memory
CommandDisplay::~CommandDisplay()
{
}
//-------------------------- Execute -----------------------------------
// Facilitates the display of the stores entire inventory.
// Postconditions: The entire stores inventory is displayed with the
// the coins printed first, the comics second and the
// sports cards last each in sorted order
void CommandDisplay::execute(TransactionManager*& tManager,
ItemsManager*& iManager,
CustomerManager*& cManager,
std::string& command) const
{
iManager->showInventory();
}