1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
nadya68 [22]
4 years ago
10

Create an application named TestSoccerPlayer that instantiates and displays a SoccerPlayer object. The SoccerPlayer class contai

ns the following properties: Name - The player’s name ( a string) JerseyNum - The player's jersey number (an integer) Goals - Number of goals scored (an integer) Assists - Number of assists (an integer)
Computers and Technology
1 answer:
frutty [35]4 years ago
5 0

Answer:

public class TestSoccerPlayer {

   public static void main(String[] args) {

       SoccerPlayer playerOne = new SoccerPlayer("Rinco",9,16,22);

       System.out.println("The player of the season is "+playerOne.getName()+" His Jessey Number is "+playerOne.getJerseyNum()

       +" In the 2019/2020 season he scored and total of "+playerOne.getGoalsScored()+" and "+

               playerOne.getAssists()+" Asists");

   }

}

See the SoccerPlayer class with the feilds and methods (constructor, getter and setters) in the explanation section

Explanation:

public class SoccerPlayer {

   private String name;

   private int jerseyNum;

   private int goalsScored;

   private int assists;

   public SoccerPlayer(String name, int jerseyNum, int goalsScored, int assists) {

       this.name = name;

       this.jerseyNum = jerseyNum;

       this.goalsScored = goalsScored;

       this.assists = assists;

   }

   public String getName() {

       return name;

   }

   public void setName(String name) {

       this.name = name;

   }

   public int getJerseyNum() {

       return jerseyNum;

   }

   public void setJerseyNum(int jerseyNum) {

       this.jerseyNum = jerseyNum;

   }

   public int getGoalsScored() {

       return goalsScored;

   }

   public void setGoalsScored(int goalsScored) {

       this.goalsScored = goalsScored;

   }

   public int getAssists() {

       return assists;

   }

   public void setAssists(int assists) {

       this.assists = assists;

   }

}

You might be interested in
2.13.4 Colorful Caterpillarhel ????
exis [7]

Answer:

sorry don't know :(8685

3 0
3 years ago
A computer screen that is contained in its own case and is not part of the computer system is called a
andre [41]

Answer:

Monitor is the correct answer

7 0
3 years ago
Read 2 more answers
What are 3 websites that talk about density of different gases, density in air, behavior of different gases of earth, convection
Tanzania [10]
I don’t know if this supports all, but try lenntech, duckters, and I will add on later
6 0
3 years ago
What is the solution to the equation ?
ki77a [65]
There’s no solution to the equation
4 0
3 years ago
Read 2 more answers
What are rules that we use on the internet called, and what are some of them?
dusya [7]
Like safety rules like what to do privacy, plagarizim, and  cyberbullying and what not. Just stuff like that.
5 0
3 years ago
Other questions:
  • Zack wants to be a landscape designer.which qualification would be best prepare him for work in this career
    12·2 answers
  • What does it mean when #DIV/0! is displayed and a green triangle is added to the upper-left corner of a cell? A. The formula can
    10·2 answers
  • A video game character prefers to take enemies on from a distance. What skills might such a character have?
    11·2 answers
  • George has to develop a website for his dad’s cycle shop. He wants to focus mainly on the products and wants the website to have
    10·1 answer
  • Why do you need to back up important data?
    5·2 answers
  • URLs are directions that browsers follow in order to find specific web page files. What is the first part of the URL that is the
    14·1 answer
  • Should the federal government have bug bounty programs? Why or why not?
    9·2 answers
  • Directions and Analysis
    15·1 answer
  • 3<br> Select the correct answer.<br> What is the output of the following HTML code?<br>Please
    8·2 answers
  • What type pf physical security devices lets a company locate devices that have been moved to a new location?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!