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
tresset_1 [31]
3 years ago
7

Write the interface (.h file) of a class Player containing: A data member name of type string. A data member score of type int.A

member function called setName that accepts a parameter and assigns it to name . The function returns no value.
A member function called setScore that accepts a parameter and assigns it to score . The function returns no value.
A member function called getName that accepts no parameters and returns the value of name .
A member function called getScore that accepts no parameters and returns the value of score .
My start code:
class Player
{
string name;
int score;
void setScore (int playerScore)
{
score = playerScore;
}
int getScore()
{
return score;
}
}
Computers and Technology
1 answer:
mezya [45]3 years ago
7 0

Answer:

Following are the class definition to this question:

class Player//defining a Player class  

{

private://use access specifier

string name;//defining string variable  

int score;//defining integer variabl  

public://use access specifier

void setName(string par_name);//declaring the setName method with one string parameter

void setScore(int par_score);//declaring the setScore method with one integer parameter

string getName();//declaring string method getName

int getScore();//declaring integer method getScore

};

Explanation:

In the above-given code, a Player class is defined, that hold a method and the variable which can be defined as follows:

  • It uses two access specifier, that are public and private.
  • In private, a string and an integer variable "name, score" is declared, which holds their respective value.
  • In public, it declares the get and set method, which holds the value from its parameters.
You might be interested in
Select the correct answer.
Gnesinka [82]

Answer:

D.

Explanation:

I think.

4 0
2 years ago
………………….. is the process of causing a system variable to conform to some desired value. Options Control feedback Design none of
frutty [35]
Control <span>is the process of causing a system variable to conform to some desired value. Options Control feedback Design none of the above</span>
4 0
3 years ago
The OSI model is a useful tool in troubleshooting a network because it enables you to isolate a problem to a particular software
lutik1710 [3]

Answer:

1)  Layer 4, transport

2) Layer 2, datalink

3) Layer 5, session

4) Layer 7, application

Description of Problems are as below:

1) One of your servers has been exhibiting sluggish network performance. you use a network-monitoring program to try to evaluate the problem. You find considerable TCP retries occurring because the server is being overwhelmed by data, and packets are being discarded.

2) You check some statistics generated by a network-monitoring program and discovers that an abnormally high number of CRC errors were detected. (Hint think of the cause of CRC errors).

3) A user is trying to connect to another computer, but the logon attempt is continually rejected.

4) You try to access a Linux server to share files by using NFS. You can communicate with the server, but the shared files don't appear to be available.

Explanation:

OSI Model is a reference model to determine how applications communicate over a network. OSI consists of seven layers, and each layer performs a particular network function. The seven layers are:

   Layer 7 - Application.

   Layer 6 - Presentation.

   Layer 5 - Session.

   Layer 4 - Transport.

   Layer 3 - Network.

   Layer 2 - Data Link.

   Layer 1 - Physical.

1) One of your servers has been exhibiting sluggish network performance. you use a network-monitoring program to try to evaluate the problem. You find considerable TCP retries occurring because the server is being overwhelmed by data, and packets are being discarded.

Layer 4, transport

2) You check some statistics generated by a network-monitoring program and discovers that an abnormally high number of CRC errors were detected. (Hint think of the cause of CRC errors).

Layer 2, Data Link

3) A user is trying to connect to another computer, but the logon attempt is continually rejected.

Layer 5, session

4) You try to access a Linux server to share files by using NFS. You can communicate with the server, but the shared files don't appear to be available.

Layer 7, application

7 0
3 years ago
The exception of MS Access 2007 and above files is _ and older version are _ files ​
ohaa [14]

Answer:

Never heard of that kind of software, but I think it's an old file.

4 0
3 years ago
comparing the cost of care provided to medicare beneficiaries assigned to primary care nurse practitioners and physicians
Aleks [24]

"Comparing the cost of care provided to Medicare beneficiaries assigned to primary care nurse practitioners and physicians" is a study that

<h3>What is the cost of Medicare according to the above study?</h3>

The study shows that after controlling for demographics, geography, comorbidities, and proclivity to visit an NP, Medicare evaluation and management payments for patients allocated to an NP were $207, or 29%, less than PCMD assigned beneficiaries.

The similar tendency was seen for inpatient and total office visit payment amounts, with NP-assigned beneficiaries receiving 11 and 18 percent less, respectively. The work component of relative value units yields similar results.

Learn more about Medicare:
brainly.com/question/1960701
#SPJ4

8 0
1 year ago
Other questions:
  • .How does kinetic energy affect the stopping distance of a vehicle traveling at 30 mph compared to the same vehicle traveling at
    13·1 answer
  • The first screen you see when you open word2016 what is called?​
    5·2 answers
  • A serialized object is ________. an object represented as a sequence of bytes used to store the object's data in a file an objec
    5·2 answers
  • Data that are collected on large populations of individuals and stored in databases are referred to as _____.
    15·1 answer
  • A score of 3 or better on the exam administered at the end of which type of course usually means that you will earn college cred
    6·1 answer
  • Patricia is leading an online group of students from many
    8·2 answers
  • Interruption attacks are also called ___ attacks:
    8·1 answer
  • State True or False: 1. Application software can run without the presence of system software. 2. . A language processor translat
    14·1 answer
  • Differences between dot_mattix printer and a line printer
    12·1 answer
  • What science category includes physics and biology?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!