package com.company;
public class wątroba {
public String country;
public float fatprocentage;
public boolean sex;
public int weight;
public int hight;
public int age;
//public boolean sex;
/*
countries:
pl- 1
ru- 1.2
us- 0,9
uk- 1,1
fat%:
<10% - 0,5
10%> = x < 20% - 1
>=20% - 1,2
height;
facet i <150cm - 0,5
facet i <170, ale min 150 - 0,7
facet i >=170 - 1
kobieta i <140cm - 0,5
kobieta i <160, ale min 140 - 0,7
kobieta i >=160 - 1
wiek:
do 15 lat 3g/kg
>=15 lat 8g/kg
65< 6g/kg
masa:
jeżeli facet i poniżej 60kg - 0.8
jezeli facet i powyżej 60kg - 1
jeżeli kobieta i poniżej 50 kg - 0.8
jeżeli kobieta i powyżej 50 kg - 1
*/
wątroba() {
country = "pl";
fatprocentage = 20.0F;
weight = 100;
hight = 192;
age = 16;
sex = false;
}
public int countBeerAmount(int alcprocentage, int volume)
{
int result = 0;
float factorsexweight=0;
float factorcountry=0;
float factorsexhaight=0;
//sex and weight
if(false==sex)
{
if(weight<60)
factorsexweight=0.8F;
else
factorsexweight = 1F;
}
else
{
if(weight<50)
factorsexweight=0.7F;
else
factorsexweight = 1F;
}
//countries
if(country.equals("pl"))
{
factorcountry=1F;
}
else if(country.equals("ru"))
{
factorcountry=1.2F;
}
else if (country.equals("us"))
{
factorcountry=0.9F;
}
else if (country.equals("uk")) {
factorcountry = 1.1F;
}
//height
if(false==sex)
{
if (hight<150)
factorsexhaight=0.5F;
else if (hight<170 && hight>150)
factorsexhaight= 0.7F;
else if (hight>=170)
factorsexhaight=1F;
}
return result;
}
}
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}