Computers and Technology

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.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 23:30, Molly666
What does 21 pilots middle aged name as a band 15 years prior to them naming their band 21 pilots?
Answers: 1
image
Computers and Technology, 23.06.2019 16:00, CalCDanG
What is the biggest difference between section breaks and regular page breaks? section breaks are more difficult to add than page breaks. section breaks make it easier for you to view the document as an outline. section breaks allow you to have areas of the document with different formatting. section breaks are smaller than regular page breaks.
Answers: 2
image
Computers and Technology, 24.06.2019 09:30, nialphonsa
Atype of researcher who uses computers to make sense of complex digital data
Answers: 1
image
Computers and Technology, 25.06.2019 05:00, Satoetoe24
Craig keeps missing important staff meetings and getting double-booked for appointments. craig should use scheduling software a database diagramming software a word processor
Answers: 1
Do you know the correct answer?
ClassB and ClassA have no special relationship; they are two separate classes both used by the same...

Questions in other subjects: