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
Please use thread to complete the following program: one process opens a file data.txt, then creates a thread my_thread. The job
Firlakuza [10]

Answer:

Here is the code:-

//include the required header files

#include<stdio.h>

#include<pthread.h>

// method protocol definition

void *count_lines(void *arg);

int main()

{

    // Create a thread handler

    pthread_t my_thread;

    // Create a file handler

    FILE *fh;

    // declare the variable

    int *linecnt;

    // open the data file

    fh=fopen("data.txt","r");

// Create a thread using pthread_create; pass fh to my_thread;

    pthread_create(&my_thread, NULL, count_lines, (void*)fh);

    //Use pthread_join to terminate the thread my_thread

    pthread_join( my_thread, (void**)&linecnt );

    // print the number of lines

printf("\nNumber of lines in the given file: %d \n\n", linecnt);

    return (0);

}

// Method to count the number of lines

void *count_lines(void *arg)

{

    // variable declaration and initialization

    int linecnt=-1;

    char TTline[1600];

    //code to count the number of lines

    while(!feof(arg))

    {

         fgets(TTline,1600,arg);

         linecnt++;

    }

    pthread_exit((void *)linecnt);

    // close the file handler

    fclose(arg);

}

Explanation:

Program:-

8 0
3 years ago
If my 98 dodge ram 1500 truck is dropping RPM's when i stop does that mean i need new throttle body sensors or does it mean i ne
geniusboy [140]
You might need a new 02 sensor and i really dont know about the vacuum leak.
6 0
3 years ago
Read 2 more answers
Select the term below which is a protocol that provides a method for software components to communicate, interact, and share dat
KATRIN_1 [288]

Answer:

B. Application programming interface

Explanation:

An application programming interface (API) is an interface or communication protocol between different parts of a computer program intended to simplify the implementation and maintenance of software. An API may be for a web-based system, operating system, database system, computer hardware, or software library.

8 0
3 years ago
Care should be taken whenever you post comments or photos to any social media or other websites, because each of these online ac
ohaa [14]

Answer:

True is the correct answer for the above question.

Explanation:

  • The social website is used to connect the people using the internet to communicate. With the help of this, any people can communicate within the world's people.
  • If anyone posts their pictures or comment on this type of website, then they need to care for that post or pictures. it means he needs to make decisions to choose the pictures or comments while posting.
  • It is because when the user posts the wrong comments or pictures, then their popularity is less in front of the other people called society.
  • This concept is also said by the question, hence it is a true statement.
5 0
4 years ago
. Which of the following statements is true?a. the longer the distance of a telephone wire between sender and recipient, the low
lawyer [7]

Answer:

Explanation:

According to my research on information technology, I can say that based on the information provided within the question the longer the distance of a telephone wire between sender and recipient, the lower the bandwidth across that wire. This is because bandwidth is the amount of information that passes through the cable and the quality of it. The longer a cable is the more packet loss that will occur as well as having a high probability of transmission errors occurring.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

6 0
3 years ago
Other questions:
  • Sarah's research shows that business information management professionals also perform the duties of other professionals. Which
    9·1 answer
  • What are the features that can extend record acees beyong Organization-wide defaults?A. Criteria-based sharing rules.B. Owner-ba
    12·1 answer
  • A four-year old laptop will not boot and presents error messages on screen. You have verified with the laptop technical support
    11·1 answer
  • What is a propriety database
    10·1 answer
  • Maria found a cupcake recipe on a cooking blog. However, she would like to read comments and suggestions before she begins bakin
    6·2 answers
  • Six external parts or periphersal of a computer system
    7·1 answer
  • What should you do first to best use your personal goals as a means for a promotion?
    13·1 answer
  • Sound can be converted from the electrical energy inside a computer into the mechanical energy of soundwaves in air by using
    9·1 answer
  • What type of redundant storage configuration is most common for hosting the operating system and applications on a server
    9·1 answer
  • What is the potential outcome for an author if she uses a word without realizing its connotation? she may write something that s
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!