private string game_name;
private int times_played;
public game(double code, string game_name,int age,int times_played,int stop_takala)
this.game_name = game_name;
this.times_played = times_played;
this.stop_takala = stop_takala;
public double Getcode() { return this.code; }
public string Getgame_name() { return this.game_name; }
public int Getage() { return this.age; }
public int Gettimes_played() { return this.times_played; }
public int Getstop_takala() { return this.stop_takala; }
public void Setcode(double code) {this.code = code;}
public void Setgame_name(string game_name) {this.game_name = game_name;}
public void Setage(int age) {this.age = age;}
public void Settimes_played(int times_played) {this.times_played = times_played;}
public void Setstop_takala(int stop_takala) {this.stop_takala = stop_takala;}
public void game_change()
Console.WriteLine("enter the code of the game");
this.code = double.Parse(Console.ReadLine());
Console.WriteLine("enter the name of the game");
this.game_name = Console.ReadLine();
Console.WriteLine("enter the minimal age for playing the game");
this.age = int.Parse(Console.ReadLine());
public void add_times_played() {this.times_played++;}
public void add_stop_takala() {this.stop_takala++;}
int check = (100*this.stop_takala)/this.times_played;
if(check < 5 ){rank ="***"; return rank;}
if(check >= 5 && check <= 25){ rank ="**";return rank;}
if(check > 25 ){ rank ="*"; return rank;}
public override string ToString()
return " the code of the game is "+this.code+", the name of the game is "+this.game_name+", the minimal age required to play the game is "+this.age+", the amount of times the game was played is "+this.times_played+", amount of times the game was stoped by a takala - "+this.stop_takala ;
public static void Main()
game[] holla = new game[3];
int age = int.Parse(Console.ReadLine());
for (int i = 0; i < holla.Length; i++)
Console.WriteLine("enter the code of the game");
double gamecode=double.Parse(Console.ReadLine());
Console.WriteLine("enter the name of the game");
string gamename =Console.ReadLine();
Console.WriteLine("enter the minimal age for playing the game");
int gameage = int.Parse(Console.ReadLine());
Console.WriteLine("enter amount of times the game was palyed");
int times_game_played = int.Parse(Console.ReadLine());
Console.WriteLine("enter amount of times the game had to stop because of a takala");
int time_stoped_takala = int.Parse(Console.ReadLine());
holla[i] = new game(gamecode, gamename, gameage,times_game_played,time_stoped_takala );
for (int i = 0; i < holla.Length; i++)
if ( holla[i].Getage() <= age && holla[i].Getrank() == "***")
Console.WriteLine(holla[i].Getgame_name()+" is the best for you, with our elaborate algorithm we've found the best game suited for your age ( the code of the game "+holla[i].Getcode()+")");