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

Consider the following base and derived class declarations: class BaseClass { public: void BaseAlpha(); private: void BaseBeta()

; float baseField; }; class DerivedClass : public BaseClass { public: void DerivedAlpha(); void DerivedBeta(); private: int derivedField; }; For each class, do the following:
a) List all private data members.
b) List all private data members that the class's member functions can reference directly.
c) List all functions that the class's member functions can invoke.
d) List all member functions that a client of the class may invoke.
Computers and Technology
1 answer:
Alina [70]3 years ago
8 0

Answer:

a) Baseclass - baseField

DerivedClass - derivedField

b) BaseClass - baseField

DerivedClass - derivedField

c) BaseClass - BaseBeta(), BaseAlpha()

DerivedClass - BaseAlpha(), DerivedAlpha(), DerivedBeta()

d) BaseClass - BaseAlpha()

DerivedClass - BaseAlpha(), DerivedAlpha(), DerivedBeta()

Explanation:

a) Since, private members of a class cannot be inherited, that is why, DerivedClass has only one private data member.

b) Member function of a class can invoke private data variables of the class, so, they can refer to their private members on their own but DerivedClass has no access to BaseClass's private members.  

c) Every member function of a class can invoke every other member function of that class, but DerivedClass's member function cannot invoke BaseClass's private member functions.

d) Object of a class has no access to private members of a class, that is why they can invoke only public member functions of the class.

You might be interested in
Cybersecurity is defined as the set of techniques to protect the secrecy, integrity, and availability of computer systems and da
natka813 [3]

Answer:

<h3>The answer is true because it protects our secret account </h3>
7 0
2 years ago
HELP I SUCK IN THIS HELP!!!!! ​
Alona [7]

Answer:

I think it's print(5**3)

8 0
3 years ago
In python:
viva [34]

Answer:

Following are the program in the Python Programming Language:

#set dictionary

d = { 'State' : 'Delhi', 'Country' : 'India'};

#reverse the dictionary.

revers = dict((v, k) for k, v in d.items())

#Displays the reversed dictionary.

print("Dictionary is: \n")

print(revers)

<u>Output</u>:

Dictionary is:  

{'Delhi': 'State', 'India': 'Country'}

Explanation:

Here, we set the dictionary data type variable "d" then, we set the variable in which we store the reverse of the dictionary in which key is converted into the value and value is converted into the key. and finally  we print the reverse dictionary.

4 0
3 years ago
What arw two reasons for maintaning your privacy on the internet
Mekhanik [1.2K]

Answer:

so people can't get your information and use it to their advantage and because you never know what people could do with that information

Explanation:

8 0
4 years ago
Read 2 more answers
An output device is any device that displays, prints, or plays content stored on a computer. from the list below, identify the d
inysia [295]
Answer is C = Speaker

How? as the speaker is the only item on the list that displays any type of content, that being audio, it's the only feasible answer to this question.
3 0
3 years ago
Other questions:
  • What type of program would use to create a personal budget?
    14·1 answer
  • A forensics workstation consisting of a laptop computer with almost as many bays and peripherals as a stationary workstation is
    10·1 answer
  • The keyboard and the mouse____ parts of a computer ​
    8·1 answer
  • A defensive driver's priority is __<br> A. efficiency<br> B. speed<br> C. handling<br> D. safety
    9·2 answers
  • Where are the worksheet tabs located
    7·1 answer
  • What are tributaries
    15·2 answers
  • NEED FIVE QUESTIONS ANSWERED!!!
    7·1 answer
  • Program: ASCII art (Python 3)1) Output this tree. 2) Below the tree (with two blank lines), output this cat. (3 pts) /\ /\ o o =
    8·1 answer
  • In a systems development life cycle (SDLC) model, the purpose of the _____ is to create a physical model that will satisfy all d
    10·1 answer
  • What will the computer do in response to a line of code reading # name = input("What is your name?")
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!