Abstract
Structure of a class in Object Oriented Programming involves the attributes and methods. The methods of a class normally consist of constructors, mutators, retrievers, processors and printers. Among these, constructor methods play a vital role in initializing objects and are essential in class construction within the Object-Oriented paradigm. Constructor method is the most important method in constructing a class. This article will compare the structure of constructor methods in three (3) different programming languages such as the C++, Java and Python, providing a clear comparison of how each language handles object initialization. These three programming languages support the Object-Oriented Paradigms. The comparative will be focusing on the syntaxes which are applied in each programming language to construct the constructor methods. Constructor methods can be categorized as default, normal and copy constructors and comparison of the three programming languages will be shown to compare the structure for each category of constructor methods. Understanding these differences is crucial for programmers who work with multiple languages and need to adapt their coding approaches accordingly.
Metadata
Item Type: | Article |
---|---|
Creators: | Creators Email / ID Num. Othman, Jamal jamalothman@uitm.edu.my Mohamed Yusoff, Syarifah Adilah syarifah.adilah@uitm.edu.my Rosmani, Arifah Fasha arifah840@uitm.edu.my Abu Bakar, Mohd Saifulnizam mohdsaiful071@uitm.edu.my |
Contributors: | Contribution Name Email / ID Num. Chief Editor Othman, Jamal UNSPECIFIED |
Subjects: | T Technology > TK Electrical engineering. Electronics. Nuclear engineering > Electronics > Computer engineering. Computer hardware |
Divisions: | Universiti Teknologi MARA, Pulau Pinang > Permatang Pauh Campus |
Journal or Publication Title: | Beyond Boundaries: The Multidimensional Horizons of E-Learning |
ISSN: | 9786299875550 |
Volume: | 9 |
Page Range: | pp. 165-170 |
Keywords: | Object-Oriented, Class, Constructors |
Date: | March 2025 |
URI: | https://ir.uitm.edu.my/id/eprint/114297 |