Created
January 12, 2021 15:39
-
-
Save adenhaus/5f149498ea5e5e6b7348681cb4d012f5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DuplicationRemoved { | |
String buildingType; | |
int HOUSE_NUM = 5; | |
int SHORT_NUM = 10; | |
int TALL_NUM = 20; | |
int V_TALL_NUM = 40; | |
public static void classifyBuilding(int floors) { | |
if (floors < HOUSE_NUM) { | |
buildingType = "house"; | |
} else if (floors < SHORT_NUM) { | |
buildingType = "short"; | |
} else if (floors < TALL_NUM) { | |
buildingType = "tall"; | |
} else if (floors < V_TALL_NUM) { | |
buildingType = "very tall"; | |
} else { | |
buildingType = "skyscraper"; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment