Missing Second Part Word File C Code Following Include Include Using Namespace Std Enum S Q37206761

1) Regular Track (80 points) Write a C+ OOP program that simulates a vending machine. The program should define at least two

Create one word file (accounts for 20 points of the project credit). It should have following items. (10 points) At least 300

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 << ”

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.