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]
3 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]3 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
What keyword can we use within a form to pass it as an argument to a JavaScript snippet? A. form B. onSubmit C. send D. this
astraxan [27]

C. send is your answer

3 0
2 years ago
Read 2 more answers
Jennifer has written a business report. What should be her last step before she submits the story for publication?
Montano1993 [528]
Revising and editing because it makes the report look sharp and business like.
5 0
3 years ago
Read 2 more answers
What is the difference between Windows 7 and Windows 10?
Novay_Z [31]
If you have windows 7 and then change to windows 10, you will see a lot of differences like Microsoft account integration, a new start menu, new apps and a windows store, Cortana and a task view bar, you get edge in windows 10, and most important desktop and security improvements
 Hope this helps!
6 0
3 years ago
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
bazaltina [42]
The answer to the question is B.
4 0
3 years ago
Read 2 more answers
What is composition
Dmitry [639]
The term composition in simple words is “putting together”. It is a thing composed of various elements.
4 0
3 years ago
Other questions:
  • Look at the slide. How could the slide best be improved? By reducing the number of visual aids by increasing the font size by da
    8·2 answers
  • Remembering on which continent 5 different countries are located
    15·1 answer
  • Stuff that's displayed on a web page (Has to be 7 characters) (third letter is N, and fifth letter is E) little urgent
    14·1 answer
  • An incurred cost that cannot be recovered, which is irrelevant for all decisions about the future, is included in the projected
    14·1 answer
  • DJ Davon is making a playlist for an internet radio show; he is trying to decide what 1212 songs to play and in what order they
    12·1 answer
  • Claire writes a letter to her grandmother, in which she describes an amusement park she visited last week. She adds pictures of
    13·1 answer
  • 17. Ano ang tawag sa pahina ng Excel?
    12·1 answer
  • Design the following webpage using suitable html code .
    11·2 answers
  • The best presentations try to include as much text as possible on each slide true or false ​
    13·1 answer
  • You arrive at school on Friday for a field trip ! What a lucky day!You need to figure out what room you are in before leaving. Y
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!