Advertisement
Guest User

Untitled

a guest
Nov 29th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.95 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. #ifndef DATA_H
  7. #define DATA_H
  8.  
  9. class IceCreamData {
  10. private:
  11.     string itemName[10];
  12.     string itemDescription[10];
  13.     string itemChoice;
  14.  
  15. public:
  16.     void setItemName(string item[], int i);
  17.     void setDescription(string description[], int i);
  18.     void setItemChoice(string item);
  19.     string* getItemName();
  20.     string* getDescription();
  21.     string getItemChoice();
  22. };
  23.  
  24. class Volume {
  25. private:
  26.     string typeSize;
  27.     double cost;
  28.  
  29. public:
  30.     void setSize(string treatSize);
  31.     void setCost();
  32.     string getSize();
  33.     double getCost();
  34. };
  35.  
  36. class Extras {
  37. private:
  38.     string type;
  39.     string itemToppings[5];
  40.  
  41. public:
  42.     void setType(string treatType);
  43.     void setToppings(string toppings[], int i);
  44.     string getType();
  45.     string* getToppings();
  46. };
  47.  
  48. void IceCreamData::setItemName(string item[], int i) { //set the item name
  49.     for (int i = 0; i < 10; i++) {
  50.         itemName[i] = item[i];
  51.     }
  52. }
  53.  
  54. string* IceCreamData::getItemName() { //get the item name
  55.     return itemName;
  56. }
  57.  
  58. void IceCreamData::setDescription(string description[], int i) { //set the item description
  59.     for (int i = 0; i < 10; i++) {
  60.         itemDescription[i] = description[i];
  61.     }
  62. }
  63.  
  64. string* IceCreamData::getDescription() {
  65.     return itemDescription;
  66. }
  67.  
  68. void IceCreamData::setItemChoice(string item) {
  69.     itemChoice = item;
  70. }
  71.  
  72. string IceCreamData::getItemChoice() {
  73.     return itemChoice;
  74. }
  75.  
  76. void Volume::setSize(string treatSize) {
  77.     typeSize = treatSize;
  78. }
  79.  
  80. void Volume::setCost() {
  81.  
  82. }
  83.  
  84. string Volume::getSize() {
  85.     return typeSize;
  86. }
  87.  
  88. double Volume::getCost() {
  89.  
  90.  
  91. }
  92.  
  93. void Extras::setType(string treatType){
  94.     type = treatType;
  95. }
  96.  
  97. void Extras::setToppings(string toppings[], int i){ //set the toppings
  98.     for(int i=0;i<5;i++){
  99.         itemToppings[i] = toppings[i];
  100.     }
  101. }
  102.  
  103. string Extras::getType() {
  104.     return type;
  105. }
  106.  
  107. string* Extras::getToppings() { //get the toppings
  108.     return itemToppings;
  109. }
  110.  
  111.  
  112.  
  113. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement