Abstract
Object-Oriented Programming (OOP) is one of the fundamental paradigms in modern software development. It offers a range of powerful features that make it highly suitable for addressing real-world problems. Among these features are code reusability, modularity, data encapsulation, enhanced security, and improved code organization, all of which contribute to the development of efficient, maintainable, and scalable software systems. OOP is structured around several core principles, including the use of classes and objects, inheritance, polymorphism, abstraction, and encapsulation (also referred to as information hiding). These principles collectively enable developers to model complex systems in a way that mirrors real-life entities and their interactions. A significant aspect of object-oriented design is the concept of association, which describes relationships between classes. Within this context, aggregation is recognized as a specialized form of association, often contrasted with composition. Both aggregation and composition are referred to as "has-a" relationships, indicating that one class contains references to another. However, aggregation represents a weaker relationship compared to composition. In aggregation, the contained (or referenced) object can exist independently of the containing object. That is, if the container object is destroyed, the contained object is not necessarily affected and may continue to exist on its own. This article aims to provide a brief yet informative explanation of aggregation within the scope of object-oriented programming. It will explore the concept in greater detail and illustrate its implementation through practical examples. In particular, sample code written in the Java programming language will be presented to demonstrate how aggregation can be applied.
Metadata
| Item Type: | Article |
|---|---|
| Creators: | Creators Email / ID Num. Mohamed Yusoff, Syarifah Adilah syarifah.adilah@uitm.edu.my Othman, Jamal jamalothman@uitm.edu.my Abu Bakar, Mohd Saifulnizam mohdsaiful071@uitm.edu.my Rosmani, Arifah Fasha arifah840@usm.edu.my |
| Contributors: | Contribution Name Email / ID Num. Advisor Abd Rahman, Nor Hanim UNSPECIFIED Chief Editor Othman, Jamal UNSPECIFIED |
| Subjects: | Q Science > QA Mathematics > Evolutionary programming (Computer science). Genetic algorithms |
| Divisions: | Universiti Teknologi MARA, Pulau Pinang > Permatang Pauh Campus |
| Journal or Publication Title: | Merging Lanes: Where E-Learning Diversity Meets Future Trends |
| ISSN: | 978-629-98755-9-8 |
| Volume: | 11 |
| Page Range: | pp. 8-16 |
| Keywords: | Object-Oriented Programming (OOP), Association, Aggregation |
| Date: | April 2026 |
| URI: | https://ir.uitm.edu.my/id/eprint/139367 |
