/**
* A class representing a football team with a name and a skill level.
*/
public class Team{
//The name of this team
private String name;
//The skill level of this team represented by a single
number
private double skill;
/**
*Constructs a team with the given name and ability
level
*@param startNameThe name the team will start with
*@param startSkill the skill level the new team has
*/
public Team(String startName, double startSkill){
this.name = startName;
this.skill = startSkill;
}
/**
*Returns the name of this Team.
*@return The name of this Team
*/
public String getName(){
return this.name;
}
/**
*Sets the name of this Team.
*@param newName The new name the Team will have
*/
public void setName(String newName){
this.name= newName;
}
/**
*Returns the skill level of this Team.
*@return The skill level of this Team
*/
public double getSkill(){
return this.skill;
}
/**
*Sets the skill level of this Team.
*@param newSkill The new skill level the Team will
have
*/
public void setSkill(double newSkill){
this.skill = newSkill;
}
/**
*Changes the skill level of the team by the specified
amount. The new skill will be change+getSkill().
*@param change The amount to increase or decrease the
skill by
*/
public void changeSkill(double change){
double newSkill;
newSkill = this.skill+change;
this.skill= newSkill;
}
}//end of class