Answer the following statements true (T) or false (F)
1. Multiple public: and private: sections are prohibited in a class.
2. A sure test of whether you have succeeded in producing an Abstract Data Type (whether you have truly separated the interface from the implementation) is whether you can use the ADT then change either the implementation or the client code without being required to change the other.
3. The scope resolution operator can be used with an object to qualify a member function.
4. The dot operator is used between an object and a data member or between a calling object and a call to a member function from the class of the object.
1. False
The keywords public: and private: have effect that runs up to the next instance of one of these keywords. There is no prohibition against having a sequence of private section after a public section and so on.
2. True
This is the definition of ADT.
3. False
The scope resolution operator is used with a class name to qualify a member to tell the compiler that this member comes from that class.
4. True
If we have object.func(arg_list) we speak of the object as the calling object for the function call func(arg_list). The dot is the operator that signals to the compiler that we intend to call that function, with data members available from the object. If the object.data_member is specified, the dot says to the compiler that we want to access the data from data_member that belongs to that particular object.
You might also like to view...
Critical Thinking QuestionsCase 2-2Your friend Kathryn is planning to use Outlook to manage her schedule during her first year of college. She is in the process of configuring Outlook to best suit her purposes, and she turns to you for help.Kathryn would like to display her schedule for an entire seven-day week. Which view should she use? a. Dayc. Weekb. Work Weekd. Schedule
What will be an ideal response?
____ spaces are special, invisible characters used to create more than one space between text and other elements.
A. Breaking B. Nonbreaking C. Character D. Element
Advertising is the main source of revenue for only a few blogs.
Answer the following statement true (T) or false (F)
Amazon RDS DB snapshots and automated backups are stored in
A. Amazon S3 B. Amazon ECS Volume C. Amazon RDS D. Amazon EMR