using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KonKopiujący
{
class Mp3
{
public bool stan;
public bool battery;
public int songs;
public int memory;
public int elektrycity;
public Mp3()
{
stan = false;
battery = true;
songs = 666;
memory = 1024;
elektrycity = 0;
}
public int WSongs
{
get
{
return songs;
}
set
{
songs = value;
}
}
public int WMemory
{
get
{
return memory;
}
set
{
memory = value;
}
}
public void Start()
{
if (stan)
{
stan = false;
elektrycity = 0;
}
else
{
stan = true;
elektrycity = 20;
}
}
public void Check()
{
if (stan && battery)
{
Console.WriteLine("Urzadzenie jest wlaczone!");
}
else
{
Console.WriteLine("Urzadzenie jest wylaczone!");
}
if (battery)
{
Console.WriteLine("Baterie sa wlozone!");
}
else
{
Console.WriteLine("Brak bateri!");
}
Console.WriteLine("W pamieci jest: " + songs);
Console.WriteLine("Pamiec wynosi: " + memory);
}
public int WElektrycity
{
set
{
elektrycity = value;
}
}
public void Dokup()
{
Console.WriteLine("Ile losowych piosenek chcesz dokupić?");
int x = 0;
x = int.Parse(Console.ReadLine());
Console.WriteLine("Dokupiono " + x + " nowych piosenek! Miłego słuchania!");
songs = songs + x;
}
public Mp3(Mp3 x)
{
this.stan = x.stan;
this.battery = x.battery;
this.songs = x.songs;
this.memory = x.memory;
}
private void Boost()
{
memory += 2048;
}
public static Mp3 operator +(Mp3 lx, Mp3 rx)
{
Mp3 C = new Mp3();
C.songs = lx.songs + rx.songs;
C.memory = lx.memory + rx.memory;
return C;
}
public static bool operator <(Mp3 lx, Mp3 rx)
{
return (lx.elektrycity < rx.elektrycity);
}
public static bool operator >(Mp3 lx, Mp3 rx)
{
return (lx.elektrycity > rx.elektrycity);
}
}
}
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}