Which of the following programming languages is an example of an object-oriented language?

Prepare for the WGU EDUC5289 D017 School Law Test. Engage with flashcards and multiple-choice questions, each with hints and explanations. Get exam-ready now!

C++ is recognized as an object-oriented programming language because it is built around the concepts of objects and classes, which are fundamental to object-oriented programming (OOP). In C++, programmers can create objects that encapsulate both data and the functions (methods) that operate on that data. This encapsulation allows for the creation of reusable code, as well as the organization of complex systems in a way that models real-world phenomena.

Furthermore, C++ supports key OOP principles such as inheritance, polymorphism, and encapsulation, allowing developers to build upon existing code and create hierarchical class structures. This makes it a versatile choice in a variety of programming contexts, particularly where complex data structures and behaviors are needed.

In contrast, the other programming languages mentioned do not primarily adhere to the object-oriented paradigm in their design and functionality. Fortran is a procedural programming language, BASIC focuses on simpler procedural constructs, and while JavaScript does support object-oriented programming, it is primarily used as a prototype-based language. Thus, C++ stands out in this context as a strong representative of object-oriented programming languages.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy