mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2024-11-28 18:59:47 +01:00
rent calculation
This commit is contained in:
parent
44673fd57e
commit
fafa53ffb7
@ -13,10 +13,21 @@ public class BuildingProperty extends PropertyField {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int calcRent() {
|
protected int calcRent() {
|
||||||
if(!hotel) {
|
if (hotel) {
|
||||||
return rent*houses;
|
return (int) Math.round(rent*4.95*2.93*2.67*1.35*1.26);
|
||||||
} else {
|
}
|
||||||
return rent*6;
|
switch (houses) {
|
||||||
|
case 1:
|
||||||
|
return (int) Math.round(rent*4.95);
|
||||||
|
case 2:
|
||||||
|
return (int) Math.round(rent*4.95*2.93);
|
||||||
|
case 3:
|
||||||
|
return (int) Math.round(rent*4.95*2.93*2.67);
|
||||||
|
case 4:
|
||||||
|
return (int) Math.round(rent*4.95*2.93*2.67*1.35);
|
||||||
|
|
||||||
|
default:
|
||||||
|
return rent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user