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
Since cable tv and cable ​internet can share the same coaxial cable, they are considered to be what type of technology?
jekas [21]

broadband technology

6 0
3 years ago
I need help 40 points and brainless if you answer
Reil [10]
The answer is c
But I’m not sure
8 0
3 years ago
Read 2 more answers
The _______ system coordinates computer resources, provides the user interface, and runs applications.
pychu [463]
Not sure but it could be operating system 

could be wrong though
5 0
3 years ago
What is one key difference between the radiation and convection zones?
Anuta_ua [19.1K]
 convection requires a medium is not the main difference, it is simply the most obvious aspect of what is a fundamentally different mechanism for transfering energy. Convection is the transfer of energy by movement of a medium, whereas radiation is the transfer of energy by, well, thermal radiation. Conduction also requires a medium, but, again, it is a fundamentally different mechanism than either convection or radiation; in this case it is the transfer of energy through a medium.

Unfortunately, analogies are hard but if you can visualize the particles involved, it would help. Picture the red hot iron you mentioned. On a molecular level, the material is emitting lots and lots of photons (hence why it is glowing red). The creation of these photons takes energy; energy from the heat of the iron. These photons leave the iron, pass through the environment, and eventually collide with some other object where they are absorbed and deposit their energy. This is radiative heat transfer. If that energy is deposited on your retina or a CCD (like in a digital camera), an image forms over time. This is how infrared goggles work and they would work equally well in high vacuum as here on earth.

In conduction, the next simplest example, there is no generation of photons (physics nerds forgive me for the sake of simplicity). The individual atoms in the object are vibrating with heat energy. As each atom gains energy from it's more energetic neighbors, so it gives up energy to its less energetic ones. Over time, the heat "travels" through the object.

In convection, the molecules of gas near the object gain energy, like in the conduction case, but those same molecules that gained energy then travel through the environment to some other location where they then give off their heat energy.

In summary:

radiation = generated and absorbed photonsconduction = molecules exciting their neighbors succesivelyconvection = molecules heated like in conduction, but then move to another location
7 0
3 years ago
Meenakshi has created a presentation of six slides. The slides have the same background, but s wants to change the background of
sdas [7]
Ans:- Using Background Styles button present in Background group on the Design tab.
5 0
2 years ago
Other questions:
  • In the game of economics, which player has the role of providing goods and services
    10·1 answer
  • A(n) _____ bus enables the central processing unit (CPU) to communicate with a system’s primary storage.
    5·1 answer
  • 100 points please hurry!!!
    14·2 answers
  • Which feature of vitualization helps increase the IT productivity of a business?
    10·1 answer
  • What is the output by the code system.out.print(8-4+2);
    13·1 answer
  • Assume the user responds with a 3 for the first number and a 5 for the second number.
    13·1 answer
  • Electrical data suitable for transmission is called a(n)
    5·1 answer
  • You are given a graph G = (V, E) with positive edge weights, and a minimum spanning tree T = (V, E’) with respect to these weigh
    14·1 answer
  • Dunbar's number, 150, refers to the number of:
    5·1 answer
  • If a robot is able to change its own trajectory as per the external conditions, then the robot is considered as the__.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!