Мне нужно написать метод, который возвращает true о o - квотербек, а имя, фамилия, попытки, завершения, ярды, перехваты и приземления o равны соответствующим свойствам этого квотербека.вот что я получил, и я застрял с этим методом равных.Может кто-нибудь начать меня с этого, я новичок в этом
публичный класс квотербек {
private int attempts;
private int completions;
private String firstName;
private int interceptions;
private String lastName;
private int touchdowns;
private int yards;
//************************************************************
public Quarterback()
{
new Quarterback();
}
//****************************************************************
public Quarterback(String firstName, String lastName, int completions, int attempts, int yards, int interceptions, int touchdowns)
{
this.firstName = firstName;
this.lastName = lastName;
this.completions = completions;
this.attempts = attempts;
this.yards = yards;
this.interceptions = interceptions;
this.touchdowns = touchdowns;
}
//*****************************************************************
public Quarterback copy()
{
Quarterback o = new Quarterback();
o.firstName = this.firstName;
o.lastName = this.lastName;
o.completions = this.completions;
o.attempts = this.attempts;
o.yards = this.yards;
o.interceptions = this.interceptions;
o.touchdowns = this.touchdowns;
return o;
}
//******************************************************************
public boolean equals(Object o)
{
}
//*********************************************************************
public int getAttempts()
{
return this.attempts;
}
//*******************************************************************************
public int getCompletions()
{
return this.completions;
}
//*******************************************************************************
public String getFirstName()
{
return this.firstName;
}
//*******************************************************************************
public int getInterceptions()
{
return this.interceptions;
}
//****************************************************************************
public String getLastName()
{
return this.lastName;
}
//****************************************************************************
public void getRating()
{
}
//****************************************************************************
public int getTouchdowns()
{
return this.touchdowns;
}
//*****************************************************************************
public int getYards()
{
return this.yards;
}
//*******************************************************************************
public void setAttempts(int attempts)
{
this.attempts = attempts;
}
//*******************************************************************************
public void setCompletions(int completions)
{
this.completions = completions;
}
//*******************************************************************************
public void setFirstName(String firstName)
{
this.firstName = firstName;
}
//*******************************************************************************
public void setInterceptions(int interceptions)
{
this.interceptions = interceptions;
}
//*****************************************************************************
public void setLastName(String lastName)
{
this.lastName = lastName;
//*****************************************************************************
public void setTouchdowns(int touchdowns)
{
this.touchdowns = touchdowns;
}
//*****************************************************************************
public void setYards(int yards)
{
this.yards = yards;
}
//*****************************************************************************
public String toString()
{
}
}