Website Summary Files Commits Branches @commit @diff @stats
path: root / Big4AndInheritance / AlcoholDrink.cpp
blob: a876a0b6dfd288c26356aa59770e8ed22f973d52 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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 alcohol;
}