#include "CoffeeCandy.h"
class CoffeeCandy :public CoffeeProduct {
int noOfCandy, caloriesPerCandy;
public:
using CoffeeProduct::CoffeeProduct;
CoffeeCandy(std::string name, int productID, int noOfCandy, int caloriesPerCandy) :
CoffeeProduct(name, productID), noOfCandy(noOfCandy), caloriesPerCandy(caloriesPerCandy) {};
int getNoOfCandy() {
return noOfCandy;
}
int getCaloriesPerCandy() {
return caloriesPerCandy;
}
void setNoOfCandy(int noOfCandy) {
this->noOfCandy = noOfCandy;
}
void setCaloriesPerCandy(int caloriesPerCandy) {
this->caloriesPerCandy = caloriesPerCandy;
}
std::string toString() {
return CoffeeProduct::toString() +
"\nNumber of candies per package: " + std::to_string(noOfCandy) +
"\nCalories Per candy: " + std::to_string(caloriesPerCandy);
}
};