Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Headers.h"
- using namespace EasterBunny;
- const double Gift::baseWeight=10;
- const double ColoredEgg::eggFactor = 9;
- const double ChocolateFigure::chocolateFactor = 10.5;
- const double Candy::candyFactor = 13.2;
- Gift::Gift(int db)
- {
- this->db=db;
- }
- ColoredEgg::ColoredEgg(int db, colourtype colour):Gift(db)
- {
- this->colour=colour;
- }
- ChocolateFigure::ChocolateFigure(int a, double MeltingPoint):Gift(a)
- {
- this->MeltingPoint=MeltingPoint;
- }
- Candy::Candy(int a, qualitytype quality):Gift(a)
- {
- this->quality=quality;
- }
- double ColoredEgg::getWeight()
- {
- return baseWeight*db*eggFactor;
- }
- double ChocolateFigure::getWeight()
- {
- return baseWeight*db*chocolateFactor;
- }
- double Candy::getWeight()
- {
- return baseWeight*db*candyFactor;
- }
- colourtype ColoredEgg::getParameter()
- {
- return colour;
- }
- double ChocolateFigure::getParameter()
- {
- return MeltingPoint;
- }
- qualitytype Candy::getParameter()
- {
- return quality;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement