var city;
city = City.fromNameCountryLatLong(
"Accra", "Ghana", 5.6037, -0.1870);
println(city.toString());
println(city.isInNorthernHemisphere());
/** * Returns new City object with passed name, * country, lat and long values */ static fromNameCountryLatLong(name, country, lat, lon) /** Returns true if this location is in the southern hemisphere */ isInSouthernHemisphere() /** Returns nice display string for this City */ toString() /** Returns country city is located in */ getCountry()
var city;
city = Rectangle.fromWidthHeight(10, 5);
println('Area: ' + city.getArea());
println('Perimeter: ' + city.getPerimeter());
/** * Returns new Rectangle with width and height set to passed * method params, left and top are set to 0 */ static fromWidthHeight(w, h) /** Returns area of rectangle */ getArea() /** Returns perimeter of rectangle */ getPerimeter()