diff --git a/app/src/main/java/com/gdgcatania/kotlinbootcamp/City.kt b/app/src/main/java/com/gdgcatania/kotlinbootcamp/City.kt new file mode 100644 index 0000000..8214a07 --- /dev/null +++ b/app/src/main/java/com/gdgcatania/kotlinbootcamp/City.kt @@ -0,0 +1,11 @@ +package com.gdgcatania.kotlinbootcamp + +/** + * Created by AntoninoMarco on 19/11/2017. + */ + +class City constructor(id : Long = 0, val name : String, val coordinate: Coordinate) + +class Coordinate constructor(val longitude : Float, val latitude : Float) { + fun isNorthEmisphere(latitude : Float) = latitude >= 0 +} \ No newline at end of file diff --git a/app/src/main/java/com/gdgcatania/kotlinbootcamp/Weather.kt b/app/src/main/java/com/gdgcatania/kotlinbootcamp/Weather.kt new file mode 100644 index 0000000..188513f --- /dev/null +++ b/app/src/main/java/com/gdgcatania/kotlinbootcamp/Weather.kt @@ -0,0 +1,19 @@ +package com.gdgcatania.kotlinbootcamp + +/** + * Created by AntoninoMarco on 19/11/2017. + */ + +class Weather constructor(id : Int, main : String, description : String, icon : String) + +class Main constructor(temp : Float, pressure : Integer, temp_min : Float, temp_max : Float, sea_level : Integer, grnd_level : Integer) + +class Wind constructor(speed : Float, deg : Float) + +class Clouds constructor(all : Integer) + +class Rain constructor(lastThreeHours : Integer) + +class Snow constructor(lastThreeHours : Integer) + +class Sys constructor(type : Integer, id : Integer, message : Integer, country : String, sunrire : Long, sunset :Long) \ No newline at end of file