//: Playground - noun: a place where people can play

import UIKit

class Button {
    
}

var btn = Button()

//

class Rectangle {
    var width : Double = 0.0
    var height : Double = 0.0
    
    init(width : Double, height : Double) {
        self.width = width
        self.height = height
    }
    
    func area() -> Double {
        return (self.width * self.height)
    }
    
    
}

var rect1 = Rectangle(width: 4, height: 8)

print("widht : \(rect1.width) , height : \(rect1.height)")

// 

//func calcRectangleArea(rectangle : Rectangle) -> Double {
//    return (rectangle.width * rectangle.height)
//}
//
//print("rect1 - area : \(calcRectangleArea(rectangle: rect1))")
//var rect2 = Rectangle(width: 9, height: 6)
//print("rect2 - area : \(calcRectangleArea(rectangle: rect2))")

print("rect1.area() : \(rect1.area())")

var rect2 = Rectangle(width: 9, height: 6)
print("rect2.area() : \(rect2.area())")





