What its missing is the second part(Word file). My C++ code isthe following:
#include <iostream>
#include <map>
using namespace std;
enum stypes
{
GRAPES =1,
STRABERRY=2,
SPRITE= 3,
MANGO = 4,
BLACKBERRY =5
};
class VendingMachine
{
private:
int coinAmount;
map <int, int>sodaTypes;
map <int, int >itemsCount;
public:
VendingMachine();
void setCoinAmount(intamount);
double getCoinAmount();
map <int,int>getSodaTypes();
map <int,int>eachMaxItemsCount();
void showItems();
void displayErrorMessage(string);
~VendingMachine();
};
VendingMachine :: VendingMachine()
{
sodaTypes[1]=5;
sodaTypes[2]=6;
sodaTypes[3]=7;
sodaTypes[4]=6;
sodaTypes[5]=10;
itemsCount[1]=20;
itemsCount[2]=20;
itemsCount[3]=20;
itemsCount[4]=20;
itemsCount[5]=20;
coinAmount=0.0;
}
map <int,int>VendingMachine :: eachMaxItemsCount()
{
return itemsCount;
}
map <int,int>VendingMachine:: getSodaTypes()
{
return sodaTypes;
}
void VendingMachine :: showItems()
{
cout << ”