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
statuscvo [17]
3 years ago
12

Rules used in naming variables in object oriented programming​

Computers and Technology
1 answer:
schepotkina [342]3 years ago
4 0

Answer:

Explanation: Name your variables based on the terms of the subject area, so that the variable name clearly describes its purpose.

You might be interested in
Given two integer variables matricAge and gradAge, write a statement that gives gradAge a value that is 4 more than the value of
Natasha_Volkova [10]

Answer:

gradAge=matricAge+4;//Statement to give gradAge a value 4 more than matricAge.

Explanation:

This statement assigns the value stored in the matricAge variable with 4 added to it.So the value assigned to the gradAge is 4 more than value of matricAge.We have used assignment operator(=) to do this.Assignment operator assigns the value/variable's value written in the right to the variable to the left.

8 0
3 years ago
C programming Write a function named CalculateSphereVolume that takes one integer parameter intDiameter. The function should cal
FinnZ [79.3K]

Answer:

not familiar with C++. but basically save the constant 4/3 in a variable and use user input of cin << i  believe to ask for a radius. Then take that radius/input saved in a variable and cube it, then return the value.

Explanation:

i hope this works.

3 0
3 years ago
What does "&amp;&amp;" mean?
Leviafan [203]

Answer:

And

Explanation:

& is a simplified version of and

3 0
3 years ago
Read 2 more answers
What effect would excluding quotation marks from a search phrase have?
n200080 [17]

Answer: C

 it would broaden the search

Explanation:

Placing quotation marks around a search term or phrase limits your search to that exact term or phrase. Without the quotes, your search engine may return all results that contain each separate word. Placing AND between your keywords will return results that only include both or all your keywords.

4 0
3 years ago
Write a full class definition for a class named Player , and containing the following members:
Paraphin [41]

Answer:

I used C++ to implement this program using dev c++, however, i defined the public method inside the class. The code with illustration of this question is given in section phase. If you want to define the classes outside from class then you can use scope resolution operator to access the method of the class. However, the complete running code is given below in <em>explanation </em>section

Explanation:

#include <iostream>// included preprocessor directive

using namespace std;

class player// class player is started from here

{

private:// class varaibles are set at here and scope of varialbe is private.

 string name;//variable for getting and setting name of player

 int score;//variable for getting and setting score of player

 

public:// declaring public method that can be accessbile outside of class but in this program

 void setName (string name)// public method for setting name of player

{

 this->name=name;// name is initialized by paramenter name to variable name

}

 void setScore(int score)//publice method for setting score of player

{

 this->score=score;

}

int getScore()// public method for getting score of player

{

 return score;// on call, return the score of player

}

string getName()// public method for getting name of player

{

 return name;// return player name;

}

 

};//end of class "player"

int main()//main function get executed

{

   player firstPlayer;//class object "firstPlayer" is created

firstPlayer.setName("Renaldo");// firstPlayer name is initialized

firstPlayer.setScore(500);// assgined score to firstPlayer

string getname=firstPlayer.getName();// get name of firstPlayer

int getscore=firstPlayer.getScore();//get score of firstPlayer

cout<<getname;//print name of firstPlayer

cout<<"\n";//line break

cout<<getscore;//print score of firstPlayer

cout<<"\n";//line break

   

   return 0;//end of program

}

6 0
3 years ago
Other questions:
  • The Law of Increasing Opportunity Costs requires greater ______ of one good in order to produce ______ of another good.
    11·2 answers
  • List five characteristics of a series circuit
    9·1 answer
  • One of the disadvantages of Audacity is that it has limited technical support since it is a free program.     true or false
    11·2 answers
  • The cmos memory located on the motherboard is often referred to as _____ memory because of its capability to store bios settings
    9·1 answer
  • Write a loop that reads positive integers from standard input, printing out those values that are greater than 100, and that ter
    14·1 answer
  • A technician suspects a network card is not working. Which tool should the technician use to test the network card?
    8·1 answer
  • Which of the following is a software application program?
    12·1 answer
  • Which behavior demonstrates teamwork
    8·2 answers
  • It is a field that contains a unique identifier for each record in a primary table
    5·1 answer
  • Ria and her team ....................... they will win. *
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!