float BMI::calculateBMI(){ int h = 0 ,m = 0; float bmi ; h = getHight(); m = getMass()*100*100; bmi = float(m)/float(h)/float(h); return bmi; }
Radiolist::Radiolist(int height, int width, vector<string> options) :Panel(height, width) { setLocation(0,0); hold = NULL; for (int i = 0; i < options.size(); i++) { lines.push_back(CheckBoxLine(5, options[i])); listen.push_back(CheckListener(*this)); } for (int i = 0; i < lines.size(); i++) { if (i < lines.size() - 1)lines[i].setNEXT(lines[i + 1]); if (i != 0)lines[i].setPREV(lines[i - 1]); } for (int i = 0; i < lines.size(); i++) { lines[i].AddListener(listen[i]); Panel::AddControler(lines[i], 0, ((getHight() / lines.size()) * i)+1); } }