60 736
Assignments Done
97,9%
Successfully Done
In April 2018

Answer to Question #8974 in Java | JSP | JSF for simple java program

Question #8974
Create a Parent class called Players (e.g., an Interface class). The Players class should have setter and getter methods for the following attributes: name, surname, age, score,allScores and averageScore.
Expert's answer
public class Players {

private String name;
private String surname;
private int age;
private double score;
private double allScores;
private double averageScore;

/**
* @return the name
*/
public String getName() {
return name;
}

/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}

/**
* @return the surname
*/
public String getSurname() {
return surname;
}

/**
* @param surname the surname to set
*/
public void setSurname(String surname) {
this.surname = surname;
}

/**
* @return the age
*/
public int getAge() {
return age;
}

/**
* @param age the age to set
*/
public void setAge(int age) {
this.age = age;
}

/**
* @return the score
*/
public double getScore() {
return score;
}

/**
* @param score the score to set
*/
public void setScore(double score) {
this.score = score;
}

/**
* @return the allScores
*/
public double getAllScores() {
return allScores;
}

/**
* @param allScores the allScores to set
*/
public void setAllScores(double allScores) {
this.allScores = allScores;
}

/**
* @return the averageScore
*/
public double getAverageScore() {
return averageScore;
}

/**
* @param averageScore the averageScore to set
*/
public void setAverageScore(double averageScore) {
this.averageScore = averageScore;
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions