HELP ON THIS ONE C++ RIGHT ANSWERS ONLY /* * CECS 2223, Computer Programming II Lab * Spring 2022, Sec. 05 * Date: May

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

HELP ON THIS ONE C++ RIGHT ANSWERS ONLY /* * CECS 2223, Computer Programming II Lab * Spring 2022, Sec. 05 * Date: May

Post by answerhappygod »

HELP ON THIS ONE C++ RIGHT ANSWERS ONLY

/*
* CECS 2223, Computer Programming II Lab
* Spring 2022, Sec. 05
* Date: May 2, 2022
* Topic: Team Project
* File name: VendingMachines.h
* This file declares a class named VendingMachines
* Team Members: member #1 name, member #1 ID#, member #2 name, member #2 ID#
*/

// what to include

class VendingMachines{
private:
string location; // where the vending machine is located, AKA the machine's name
int snackCount; // the number of different snacks in the machine
double moneyIn; // money deposited by customer
double change; // the amount of money available for change
double totalSales; // the amount of money from item sales
Snacks** inventory; // the snacks available for sale
int computeChange(); // computes the change due, if any
int snackNameSize; // The size of the longest snack name + 3 spaces
int computeSnackNameSize(); // computes the longest snack name
public:
VendingMachines(); // the default constructor
VendingMachines(string); // parameterized constructor
void setLocation(string);
void addSnack();
void sellSnack();
void printInventory() const;
int getSnackCount() const;
double getTotalSales() const;
}
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply