subject

ClassB and ClassA have no special relationship; they are two separate classes both used by the same main(). void methodB( ClassA aObj ) is a method ofclassB. It takes a ClassA object as an ordinary parameter. The client, main(), calls methodB(). Here is an outline of the situation:
class ClassA
{
private:
char someMemb;
};
class ClassB
{
public:
void methodB( ClassA aObj );
};
int main()
{
ClassA myObjA;
ClassB myObjB;
myObjB. methodB ( myObjA );
}
Check all the true statements (Check all that apply):
A. If methodB() modifies aObj's someMemb, the client's myObjA's someMemb will also be modified, accordingly, when the method returns.
B. If methodB() modifies aObj's someMemb, the client's myObjA's someMemb will not be modified when the method returns.
C. methodB() can change aObj's someMemb value through direct assignment, as in aObj. someMemb = something.
D. methodB() can read (access) aObj's someMemb value directly without changing it, as in something = aObj. someMemb.
E. methodB() can read from (access) and/or write to (change) aObj's someMemb indirectly through appropriate public ClassA methods, if ClassA offers such methods.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:30
What kind of motivation is katrina showing? use the drop-down menu to complete the statement. katrina is using motivation because she is personally interested in learning more.
Answers: 2
question
Computers and Technology, 22.06.2019 17:00
Acase study allows a more detailed look at the life of a single subject than any other study.
Answers: 3
question
Computers and Technology, 23.06.2019 19:30
What are loans to a company or government for a set amount of time
Answers: 1
question
Computers and Technology, 24.06.2019 10:30
This device directs network traffic. bridge hub nic repeater router switch
Answers: 3
You know the right answer?
ClassB and ClassA have no special relationship; they are two separate classes both used by the same...
Questions
question
Biology, 20.09.2020 02:01
Questions on the website: 13722363