SCRIPTING-AND-PROGRAMMING-FOUNDATIONS practice question 5 of 25

Which characteristic specifically describes an object-oriented language?

Full set: 137 questions
Answer options
A: Supports creating programs as a set of functions
B: Requires a compiler to convert to machine code
C: Can be run on any machine that has an interpreter
D: Supports creating program as item that have data plus operations Correct answer
Correct Answer:
D. Supports creating program as item that have data plus operations
Explanation

The defining characteristic of an object-oriented language is its support for creating programs as a collection of objects. An object is a construct that encapsulates both data (attributes or properties) and the operations (methods) that can be performed on that data. This bundling of data and functionality into a single unit is a core principle of object-oriented programming (OOP), distinguishing it from other paradigms like procedural programming, which typically separates data structures from the procedures that manipulate them.

Why Incorrect

A. This describes procedural programming, which organizes programs around functions or procedures rather than objects.
B. This describes a compiled language. A language's compilation model is independent of its support for the object-oriented paradigm.
C. This describes an interpreted language. The execution model (interpreted vs. compiled) is orthogonal to the object-oriented paradigm.

References

1. Oracle. (2024). The Java™ Tutorials: Object-Oriented Programming Concepts. In the lesson "What Is an Object?", it states, "An object bundles its data (state) and behavior (operations) together into a single unit."

2. Weisfeld, M. (2019). The Object-Oriented Thought Process (5th ed.). Addison-Wesley Professional. Chapter 1, "Introduction to Object-Oriented Concepts". This chapter introduces the fundamental concept of an object as a combination of data and behavior.

3. Guttag, J. V. (2016). 6.0001 Introduction to Computer Science and Programming in Python, Fall 2016. MIT OpenCourseWare. Lecture 8 Notes, p. 1. The notes define objects as containing both data and methods that operate on that data.

Scroll to Top