2 תשובות
שואל השאלה:
namespace childm
{
class childm
{
public string name;
public int birthyear = 0;
public childm(string n, int b)
{
this.name = n;
this.birthyear = b;
}
public void setname(string n)
{
this.name = n;
}
public void setbirthyear(int b)
{
this.birthyear = b;
}
public int getname()
{
throw new notimplementedexception();
}
public int getbirthyear()
{
return this.birthyear;
}
public override string tostring()
{
return name + ", " + birthyear;
}
public bool sameage(bool a)
{
bool a = false;
[1]if (birthyear[0] == birthyear);
{
a = true;
}
else
{
a = false;
}
return a;
}
public int sixteen(int s)
{
int s = 0;
s = this.birthyear + 16;
return s;
}
}
}
אנונימית
שואל השאלה:
namespace childm
{
class childm
{
public string name;
public int birthyear = 0;
public childm(string n, int b)
{
this.name = n;
this.birthyear = b;
}
public void setname(string n)
{
this.name = n;
}
public void setbirthyear(int b)
{
this.birthyear = b;
}
public int getname()
{
throw new notimplementedexception();
}
public int getbirthyear()
{
return this.birthyear;
}
public override string tostring()
{
return name + ", " + birthyear;
}
public bool sameage(bool a)
{
bool a = false;
if (birthyear == birthyear);
{
a = true;
}
else
{
a = false;
}
return a;
}
public int sixteen(int s)
{
int s = 0;
s = this.birthyear + 16;
return s;
}
}
}
אנונימית