﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2.Bridge
{
    public class Tv : Device
    {
        int volume = 50;
        Boolean enabled = false;
        public Tv()
        {
        }
        public void decreaseVolume()
        {
            if (enabled && volume > 0)
                volume--;
        }

        public void disable()
        {
            enabled = false;
        }

        public void enable()
        {
            enabled = true;
        }

        public int getVolume()
        {
            return volume;
        }

        public void increseVolume()
        {
            if ( enabled && volume < 100)
            volume++;
        }

        public Boolean isEnabled()
        {
            return enabled; 
        }
    }
}
