Practicum 3
A set of parallel vectors can be converted into a vector of objects, where the object has
A data member that matches the data type of each of the original vectors
What is needed for encapsulation?
A public data member
An object of a class may have which of the following items?
Accessor member functions, Data members, and Mutator member functions.
Which of the following hides the implementation details of the data members and member functions within a class?
Encapsulation
In a music store application, there are MusicRecording, MusicTrack, and Artist classes. MusicRecording contains a collection of music tracks. Each music track is created by an artist. In a C++ program, which of the following statements correctly describes the relationship between these classes?
The MusicRecording class aggregates the MusicTrack class.
A programmer working on an airline ticketing application realizes that she needs to create many Flight objects in this application. What does she need to do in order to define a Flight Class?
Write a flight class that defines the data members and function that flight objects will have.
What is get_data(); Context: ClassBuilding { public: void get_data() const;
access member function
A Member function that allows the user of the class to see the value in a data member is known as
an accessor function.
Why do you want to usually make data members private in a class?
ensure data integrity, provide data abstraction, and provide information hiding
What is the name of the concept that explains why there can be multiple methods (member functions) with the same name?
overloading
In a class, all members are ________ by default.
private