HELP C++ RIGHT ANSWERS ONLY!!
/*
* CECS 2223, Computer Programming II Lab
* Spring 2022, Sec. 05
* Date: May 2, 2022
* Topic: Team Project
* File name: Snack.cpp
* This file defines a class named Snack
* Team Members: member #1 name, member #1 ID#, member #2 name, member #2 ID#
*/
// what to include
// The default constructor initializes the string to ""
// and all other fields to 0
Snack();
// This parameterized constructor get the snack's name as
// parameter, intializes the nameSize field accordingly, and
// initializes all other fields to 0
Snack(string);
// This constructor has three parameters: the snack's name,
// its count, and its price. It initializes the nameSize field
// according to the name's size.
Snack(string,int,double);
// The destructor for the Snack class releases memory
// for the object and prints the phrase
// "The snack [snack] has been removed from inventory"
~Snack();
// sets the snack's name and the nameSize fields
void setName(string);
// sets the quantity of snack items
void setCount(int);
// sets the price for the snack
void setPrice(double);
// get the name of the snack
string getName() const;
// get the size of the name field
string getNameSize() const;
// get the count of the snack
int getCount() const;
// get the price for the snack
double getPrice() const;
HELP C++ RIGHT ANSWERS ONLY!! /* * CECS 2223, Computer Programming II Lab * Spring 2022, Sec. 05 * Date: May 2, 2022 *
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
HELP C++ RIGHT ANSWERS ONLY!! /* * CECS 2223, Computer Programming II Lab * Spring 2022, Sec. 05 * Date: May 2, 2022 *
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!