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
Bas_tet [7]
1 year ago
10

Write the implementation (.cpp file) of the player class from the previous exercise

Social Studies
1 answer:
erica [24]1 year ago
5 0

The implementation (.cpp file) of the Player class from the previous exercise:

void Player::setName (string playerName) {

name = playerName;

}

void Player::setScore (int playerScore){

score = playerScore;

}

string Player::getName (){

return name;

}

int Player::getScore(){

return score;

}

Where .cpp file extension is used?

In files with the CPP file suffix, applications created in the C++ programming language are kept. In one C++ project, there may be several CPP files used as application source code.

What is a programming language?

The term "programming language" refers to any collection of rules that are used to convert strings into other kinds of machine code, such as graphical program elements in the case of visual programming languages. A programming language is one kind of computer language that is used to implement algorithms in computer programming.

What is the C++ programming language used for?

Powerful general-purpose programming languages like C++ exist. It can be applied to the creation of operating systems, browsers, games, and other applications. Procedural, object-oriented, functional, and other programming paradigms are supported by C++. Because of this, C++ is both flexible and powerful.

Learn more about programming language: brainly.com/question/23959041

#SPJ4

The correct question is:

Write the implementation (.cpp file) of the Player class from the previous exercise. Again, the class contains:

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 a name. The function returns no value.

A member function called secure that accepts a parameter and assigns it to a score. The function returns no value.

A member function called getName that accepts no parameters and returns the value of the name.

A member function called getScore that accepts no parameters and returns the value of the score.

You might be interested in
Question <br><br>EXPLAIN AIR POLLUTION WITH ITS MEASURES ,EFFECTS etc IN DETAIL.​
Flura [38]

Answer:

Explanation:

Air Pollution is the release of pollutants such as gases, particles, biological molecules, etc. into the air that is harmful to human health and the environment.”

Effects of Air Pollution:

The hazardous effects of air pollution on the environment include:

Diseases

Air pollution has resulted in several respiratory disorders and heart diseases among humans. The cases of lung cancer have increased in the last few decades. Children living near polluted areas are more prone to pneumonia and asthma. Many people die every year due to the direct or indirect effects of air pollution.

Global Warming

Due to the emission of greenhouse gases, there is an imbalance in the gaseous composition of the air. This has led to an increase in the temperature of the earth. This increase in earth’s temperature is known as global warming. This has resulted in the melting of glaciers and an increase in sea levels. Many areas are submerged underwater.

Acid Rain

The burning of fossil fuels releases harmful gases such as nitrogen oxides and sulphur oxides in the air. The water droplets combine with these pollutants, become acidic and fall as acid rain which damages human, animal and plant life.

Ozone Layer Depletion

The release of chlorofluorocarbons, halons, and hydro chlorofluorocarbons in the atmosphere is the major cause of depletion of the ozone layer. The depleting ozone layer does not prevent the harmful ultraviolet rays coming from the sun and causes skin diseases and eye problems among individuals.

Effect on Animals

The air pollutants suspend on the water bodies and affect the aquatic life. Pollution also compels the animals to leave their habitat and shift to a new place. This renders them stray and has also led to the extinction of a large number of animal species.

Measures:

Following are the measures one should adopt, to control air pollution:

Avoid Using Vehicles

People should avoid using vehicles for shorter distances. Rather, they should prefer public modes of transport to travel from one place to another. This not only prevents pollution, but also conserves energy.

Energy Conservation

A large number of fossil fuels are burnt to generate electricity. Therefore, do not forget to switch off the electrical appliances when not in use. Thus, you can save the environment at the individual level. Use of energy-efficient devices such CFLs also controls pollution to a greater level.

Use of Clean Energy Resources

The use of solar, wind and geothermal energies reduce air pollution at a larger level. Various countries, including India, have implemented the use of these resources as a step towards a cleaner environment

8 0
3 years ago
As a social work tool, single subject design can be used with: Question 3 options: A single client A single agency A single comm
mario62 [17]

A single client, single agency or single community can all be used as a single subject design for a social work tool.

<h3>What is a social work tool?</h3>

These are tools that enhance engagement in the social services so as to hace a more productive interactions between social service practitioners and the people they work with.

Example of a social work tool includes communication, organizational skills, boundaries, code of ethics, persuasion, coordination etc

Therefore, the Option D is correct.

Read more about social work tool

<em>brainly.com/question/27104427</em>

7 0
3 years ago
1. What event in 1860's convinced many Georgia leaders and other southern states to change their minds about wanting to stay in
Vesna [10]

Answer: 1) Joseph Brown convinced everyone that if they stayed in the Union, Lincoln would end up freeing their slaves, and they should not follow any interventions Lincoln passed.

2. They knew if they fought the opposing side for long enough, one would eventually give in due to loss of manpower and supplies.

3. The Emancipation gave the North the aid of runaway slaves to help fight. Also, Vicksburg and Gettysburg were the beginning of a streak of wins for the North, boosting the morale of the Northerners.

4. African Americans were given full citizenship, and eventually were treated the same way white men were.

5. The war completely destroyed the south, stripping it of its people and its land. It did the same to the North, but the impact wasn’t as great.

6. Georgia’s economy was completely destroyed and a majority of the men were dead. Georgia was the last to reenter the Union in 1870.

Explanation:

7 0
3 years ago
What is the Alligator Gar motility
CaHeK987 [17]
<span>Alligator gar are ray-finned euryhaline fish related to bowfin in the infraclass Holostei. The fossil record traces their existence to the Early Cretaceous over a hundred million years ago. They are the largest species in the gar family, and among the largest freshwater fishes in North America. Gars are often referred to as "primitive fishes",  hope that helped</span>
4 0
3 years ago
Businesses are necessary in order to perform which of the following
gizmo_the_mogwai [7]

I believe the answer is B "Hire, organize and supply workers". Hope this helps!

3 0
3 years ago
Read 2 more answers
Other questions:
  • Professor crisman believes that most women prefer tall and physically strong partners because this preference promoted the survi
    12·2 answers
  • When a tourist notices that certain members of the host society control resources and demand obedience of other host members, it
    10·1 answer
  • A suspect is leading the police on a car chase. The officer reports that the suspect is traveling north at 100 miles per hour. T
    15·2 answers
  • Use examples from the lessons and your own personal experiences to compose at least one well-developed paragraph on the followin
    9·1 answer
  • What horrific historical event was responsible for the killing of millions of European Jews during WWII?
    11·1 answer
  • Which statement best describes what the 13th United States Colored Troops accomplished at the Battle of Nashville
    14·1 answer
  • Which of the following is true of the relationship between public opinion and shifts in major government policies? Linguist Noam
    11·1 answer
  • (i) The first general elections were held in India in the year 1952 (ii) Pressure groups are essentially political in nature. (i
    14·1 answer
  • Which of the following demonstrates interference theory?
    11·1 answer
  • The Stamp Act required...
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!