using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KonKopiujący
{
class Komputer
{
public bool stan;
public string colour;
public double processor;
public int graphic;
public static double wynik;
public int elektrycity;
public Komputer()
{
stan = false;
processor = 3.16;
graphic = 2048;
colour = "red";
wynik = 0;
elektrycity = 0;
}
public string WColour
{
get
{
return colour;
}
set
{
colour = value;
}
}
public double WProcessor { get; set; }
public int WGraphic
{
get
{
return graphic;
}
set
{
graphic = value;
}
}
public int WElektrycity
{
set
{
elektrycity = value;
}
}
public void Check()
{
if (stan)
{
Console.WriteLine("Komputer jest wlaczony!");
}
else
{
Console.WriteLine("Komputer jest wylaczony!");
}
if (processor == 3.16 && graphic == 2048)
{
Console.WriteLine("Procesor i grafika w trybie oszczędności energii ");
}
else
{
Console.WriteLine("Procesor i grafika w trybie wyższej wydajności");
}
}
public void Start()
{
if (stan)
{
stan = false;
elektrycity = 0;
}
else
{
stan = true;
elektrycity = 100;
}
}
public void Tryb()
{
if (stan)
{
if (processor == 3.16 && graphic == 2048)
{
processor = 3.16;
graphic = 4096;
}
else
{
processor = 3.16;
graphic = 2048;
}
}
else
{
Console.WriteLine("Komputer jest wylaczony!");
}
}
private void Boost(Komputer x)
{
x.processor += 3.55;
x.graphic += 6144;
}
public static double RAM(double x)
{
double wynik = x / 1024;
return wynik;
}
public Komputer(Komputer x)
{
this.stan = x.stan;
this.processor = x.processor;
this.graphic = x.graphic;
this.colour = x.colour;
}
public static Komputer operator +(Komputer lx, Komputer rx)
{
Komputer C = new Komputer();
C.processor = lx.processor + rx.processor;
C.graphic = lx.graphic + rx.graphic;
return C;
}
public static bool operator <(Komputer lx, Komputer rx)
{
return (lx.elektrycity < rx.elektrycity);
}
public static bool operator >(Komputer lx, Komputer 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"}