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: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
Annie is creating a corporate report for a company’s annual meeting. in the report, she wants to add the signature of various department heads. which device can annie use to capture signatures to include in the report? a. printer b. monitor c. e-reader d. digitizing tablet
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
Amanda needs to create an informative print brochure for her local library’s fundraiser dinner. what critical detail must she have before she starts designing the brochure?
Answers: 1
question
Computers and Technology, 23.06.2019 08:30
When you interpret the behavior of others according to your experiences and understanding of the world your evaluation is
Answers: 1
question
Computers and Technology, 25.06.2019 19:50
What is the leading use of computers
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
Mathematics, 21.04.2020 09:18
question
Chemistry, 21.04.2020 09:18
question
Mathematics, 21.04.2020 09:18
question
Social Studies, 21.04.2020 09:18
question
Mathematics, 21.04.2020 09:18