1 / 4

14.7

Aggregation. 14.7. Aggregation. Aggregation : a class is a member of a class Supports the modeling of ‘has a’ relationship between classes – enclosing class ‘has a’ enclosed class Same notation as for structures within structures. Aggregation. class StudentInfo { private:

arlais
Download Presentation

14.7

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Aggregation 14.7

  2. Aggregation • Aggregation: a class is a member of a class • Supports the modeling of ‘has a’ relationship between classes – enclosing class ‘has a’ enclosed class • Same notation as for structures within structures

  3. Aggregation class StudentInfo { private: string firstName, LastName; string address, city, state, zip; ... }; class Student { private: StudentInfo personalData; ... };

  4. See the Instructor, TextBook, and Course classes in Chapter 14.

More Related