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
tia_tia [17]
3 years ago
5

Explain why you would need both public and privatemembers in a class.

Computers and Technology
1 answer:
inn [45]3 years ago
8 0

Answer:

In a class, a public data member are those member which can be accessible to all other classes in the computer program. By using public data member a class can modify its data member and its member function. Hence, the key member in class are not be declared as public.  

It is declared as:

class public

{

 public;    // public access specifier

  int a,b;      // Data Member

}

In a class, a private data member are only access by member function inside the class as, it is completely invisible from the outside world. In this, member function and class variable are private by default.

class private

{

private;   // private access specifier

 int a,b;    // Data Member

}

You might be interested in
You can use any font when creating your website as all users can see the same fonts.
Anastaziya [24]
False, think about the people with low vision. Think about the font and what size it would have to be,the color (ex. yellow would not be good), Spacing, tracking etc. Just a few things to consider.
3 0
3 years ago
How do you autofit a column to fit the longest word in Microsoft Word?
sergey [27]

Adjust the table size, column width, or row height manually or automatically. You can change the size of multiple columns or rows and modify the space between cells. If you need to add a table to your Word document.

i hope its right!!!!


5 0
4 years ago
Read 2 more answers
Which of the following cells can't be recharged
Andrew [12]
The A. Primary cell can not be recharged or the primary cell is not a rechargeable cell. The choices above are the several types of the battery cell which are used for preserving electric energy. There are two major types of the battery cell which are the primary and the secondary cell based on its recharging ability<span>. The other choices besides the primary cell are the secondary cell.</span>
5 0
4 years ago
âin order to aid a forensics investigation, a hardware or software ______________ can be utilized to capture keystrokes remotely
faltersainse [42]
(keystroke) logger. I'm hoping this is what you wanted.
5 0
4 years ago
What level does Drantini evolve? I'm currently grinding on my TI 84 calculator.
ad-work [718]

Answer:

Dratini first evolves into dragonair at level 30, which then later on evolves into dragonite at level 55.

4 0
3 years ago
Other questions:
  • In a transaction-processing system (tps), if the tps database can be queried and updated while the transaction is taking place,
    11·1 answer
  • In ethical hacking testing, what approaches exist for the ethical hacker to choose from depending on how much information is kno
    10·2 answers
  • What is the advantage of defining a target user?
    6·1 answer
  • BRALYEST TO FIRST PERSON THAT IS CORRECT!!! Select the correct navigational path to add titles to your printable worksheet. Clic
    9·2 answers
  • Write two statements to get input values into birthMonth and birthYear. Then write a statement to output the month, a slash, and
    5·1 answer
  • What are the examples of personal computers ?
    8·1 answer
  • The distance that light travels in a vacuum in one year is a(n) _____. A. AU B. parsec C. light-year D. kilometer
    15·1 answer
  • Match the command to the use. Test connectivity to a remote computer Test DNS lookup View packets in a transmission Display the
    14·1 answer
  • Which of the following correctly declares and initializes a Scanner object that will use input from the keyboard as its data sou
    13·2 answers
  • If an OS is using paging with offsets needing 12 bits, give the offset (in decimal or hexadecimal) to: the third word on a page
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!