Need this done pls. Not an example or a look alike. THIS ONE PLS! C++!
/*
* CECS 2223, Computer Programming II Lab
* Spring 2022, Sec. 05
* Date: May 2, 2022
* Topic: Team Project
* File name: VendingMachines.cpp
* This file defines a class named VendingMachines
* Team Members: member #1 name, member #1 ID#, member #2 name, member #2 ID#
*/
// what to include
// private method used to compute the change due, if any
// this method changes the value of the change field. If the value of
// change is 0, the method must indicate that exact money
// is required to purchase an item.
int computeChange();
// private method used to set the value for the snackNameSize field.
// It iterates through the inventory to find the longest snack name,
// then sets the snackNameSize field to the longest value + 3
int computeSnackNameSize();
// The default constructor initializes strings to "", pointers to null,
// change to one dollar, and all other fields to 0
VendingMachines();
// The parameterized constructor initializes location to the parameter value,
// the pointer to null, change to one dollar, and all other fields to 0
VendingMachines(string);
// sets the vending's machine identifier
void setLocation(string);
// adds a Snacks object to inventory
// Should this method include parameters?
// If so, which?
void addSnack();
// sells a snack from inventory
// this method alters the value of the change and
// totalSales fields.
// Should this method include parameters?
// If so, which?
void sellSnack();
// prints the current vending machine inventory
// should print items in a manu style format
// the output from this method is presented to
// the customer as the menu of items available for purchase
// Use the following header format:
// # Item Price
// Example:
// Which snack would you like to purchase?
// 1. Doritos $0.75
// 2. Milky Way $1.00
// 3. 3 Musketeers $1.25
// NOTE: The size of the name field must accomodate any snack name.
// This size is dynamic, and adapts to any name.
// If the count for a specific snack is 0, such snack name
// should not be printed.
void printInventory() const;
// gets the count of different snacks available in the machine.
// For example, if the machine is composed of the items shown
// in the examplefor printInventory, this method would return 3.
int getSnackCount() const;
// gets the total value of sales, in dollars
double getTotalSales() const;
Need this done pls. Not an example or a look alike. THIS ONE PLS! C++! /* * CECS 2223, Computer Programming II Lab * S
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Need this done pls. Not an example or a look alike. THIS ONE PLS! C++! /* * CECS 2223, Computer Programming II Lab * S
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!