Website Summary Files Commits Branches @commit @diff @stats
path: root / Big4AndInheritance / Drinks / AlcoholDrink.cpp
blob: db3619c9eb48b2d20f8c40b588b8809d1147d8da (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "AlcoholDrink.h"



AlcoholDrink::AlcoholDrink(const char* mark, int ml, int percentAlcohol) : Drink(mark,ml)
{
	setAlcohol(percentAlcohol);
}
void AlcoholDrink::setAlcohol(int alcohol)
{
	if (alcohol < 4 || alcohol>98)
		alcohol = 20;
	percentAlcohol = alcohol;
}
int AlcoholDrink::getAlcohol() const
{
	return percentAlcohol;
}