Structural differences of constructor methods in object-oriented paradigms: a comparative study using C++, Java and Python / Jamal Othman ... [et al.]
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 const...
Saved in:
| Main Authors: | , , , |
|---|---|
| Format: | Article |
| Language: | en |
| Published: |
Unit Penerbitan JSKM
2025
|
| Subjects: | |
| Online Access: | https://ir.uitm.edu.my/id/eprint/114297/1/114297.pdf https://ir.uitm.edu.my/id/eprint/114297/ https://appspenang.uitm.edu.my/sigcs/ |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| Summary: | 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. |
|---|
