Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- #ifndef DATA_H
- #define DATA_H
- class IceCreamData {
- private:
- string itemName[10];
- string itemDescription[10];
- string itemChoice;
- public:
- void setItemName(string item[], int i);
- void setDescription(string description[], int i);
- void setItemChoice(string item);
- string* getItemName();
- string* getDescription();
- string getItemChoice();
- };
- class Volume {
- private:
- string typeSize;
- double cost;
- public:
- void setSize(string treatSize);
- void setCost();
- string getSize();
- double getCost();
- };
- class Extras {
- private:
- string type;
- string itemToppings[5];
- public:
- void setType(string treatType);
- void setToppings(string toppings[], int i);
- string getType();
- string* getToppings();
- };
- void IceCreamData::setItemName(string item[], int i) { //set the item name
- for (int i = 0; i < 10; i++) {
- itemName[i] = item[i];
- }
- }
- string* IceCreamData::getItemName() { //get the item name
- return itemName;
- }
- void IceCreamData::setDescription(string description[], int i) { //set the item description
- for (int i = 0; i < 10; i++) {
- itemDescription[i] = description[i];
- }
- }
- string* IceCreamData::getDescription() {
- return itemDescription;
- }
- void IceCreamData::setItemChoice(string item) {
- itemChoice = item;
- }
- string IceCreamData::getItemChoice() {
- return itemChoice;
- }
- void Volume::setSize(string treatSize) {
- typeSize = treatSize;
- }
- void Volume::setCost() {
- }
- string Volume::getSize() {
- return typeSize;
- }
- double Volume::getCost() {
- }
- void Extras::setType(string treatType){
- type = treatType;
- }
- void Extras::setToppings(string toppings[], int i){ //set the toppings
- for(int i=0;i<5;i++){
- itemToppings[i] = toppings[i];
- }
- }
- string Extras::getType() {
- return type;
- }
- string* Extras::getToppings() { //get the toppings
- return itemToppings;
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement