Guest User

Untitled

a guest
Dec 11th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. class Cake:
  2. public:
  3. Cake(string flavor, string frosting) {
  4. cakeType = flavor;
  5. frostingType = frosting;
  6. }
  7. private:
  8. string cakeType;
  9. string frostingType;
  10. };
  11.  
  12. class LayerCake: public Cake {
  13. public:
  14. LayerCake(string flavor, string frosting, int layers, int
  15. quantity) {
  16. numLayers = layers;
  17. cakeQuantity = quantity;
  18. Cake(flavor, frosting);
  19. private:
  20. int numLayers;
  21. int cakeQuantity;
  22. };
Add Comment
Please, Sign In to add comment