<file_sep>//
//  Calculator.swift
//  ClassDemo
//
//  Created by <NAME> on 17/04/21.
//

import Foundation

let calculator = Calculations(num1: 10, num2: 10)
//calculator.division()
//calculator.multiplication()
//calculator.subtraction()
let r = calculator.addition()

<file_sep>

let newEnemy = Enemy()

var one = newEnemy.attackStrength
var two = newEnemy.health
var three = newEnemy.move()
var five = newEnemy.attack()

let dragon = Dragon()
var tr = dragon.attack()



let calculator = Calculations(num1: 5, num2: 7)
print(calculator.division())
print(calculator.multiplication())
print(calculator.subtraction())
print(calculator.addition())


let calculator1 = calculator //here we just made a copy of calculator
print(calculator1.addition())
print(calculator1.value(value: "values"))

let calculator3 = Calculations(num1: 6, num2: 0)
print(calculator3.value(value: "values"))

<file_sep>
class Enemy {
    
    var health = 100
    var attackStrength = 10
    
    func move(){
        print("Move frswswmwrd")
        
    }
    func attack(){
        print("Attack lvel is \(attackStrength)")
    }
    
}
<file_sep>//
//  Calculations.swift
//  ClassDemo
//
//  Created by <NAME> on 17/04/21.
//

import Foundation
class Calculations {
    var num1 : Int
    var num2 : Int
    
    init(num1 : Int, num2 : Int) {
        self.num1 = num1
        self.num2 = num2
    }
    
    func addition() -> Int{
      return num1 + num2
        
    }
    func subtraction() -> Int{
        return num1 - num2
    }
    func multiplication() -> Int{
        return num1 * num2
    }
    func division() -> Int{
        return num1 / num2
    }
    
    func value (value : String) -> String{
        
        return ("\(value) are  \(num1) and \(num2)")
        
    }
    
    
}
<file_sep>//
//  Dragon.swift
//  ClassDemo
//
//  Created by <NAME> on 17/04/21.
//

import Foundation

class Dragon : Enemy {
    
    
    override func move() {
        super.move()
    }
    
    override func attack() {
        super.attack()
        print("attack dragons \(attackStrength)")
    }
    
    
    
}
