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

Which is one characteristic of an object-oriented language that is not a characteristic of a procedural or functional language?

Full set: 137 questions
Answer options
A: The language is optimized for recursive programming.
B: The language is based on the concept of modular programming and the calling of a subroutine.
C: The language treats programs as evaluating mathematical functions.
D: The language supports decomposing a program into objects that interact with one another. Correct answer
Correct Answer:
D. The language supports decomposing a program into objects that interact with one another.
Explanation

The defining characteristic of object-oriented programming (OOP) is the concept of bundling data (attributes) and the methods (functions) that operate on that data into a single unit called an "object." This allows a program to be decomposed into a collection of interacting objects. This principle, often involving concepts like encapsulation, inheritance, and polymorphism, is unique to OOP and distinguishes it from procedural and functional paradigms, which organize programs around procedures or functions, respectively.

Why Incorrect

A. Recursion is a prominent feature of functional programming, where problems are often solved by applying a function to its own output.
B. Modular programming and calling subroutines (procedures or functions) are the foundational concepts of the procedural programming paradigm.
C. Treating programs as the evaluation of mathematical functions is the core principle of the functional programming paradigm.

References

1. Abelson, H., & Sussman, G. J. (1996). Structure and Interpretation of Computer Programs (2nd ed.). MIT Press. Chapter 3, "Modularity, Objects, and State." Section 3.1 discusses the concept of assignment and local state, which leads to the object-oriented paradigm of grouping state and operations.

2. Guttag, J. V. (2021). 6.0001 Introduction to Computer Science and Programming in Python. Massachusetts Institute of Technology: MIT OpenCourseWare. Lecture 8: Object Oriented Programming. Defines OOP as a style of programming that involves bundling data and functions that work on that data into objects.

3. Weisfeld, M. (2019). The Object-Oriented Thought Process (5th ed.). Addison-Wesley Professional. Chapter 1, "Introduction to Object-Oriented Concepts." "The fundamental concept of object-oriented (OO) development is to view a system as a set of interacting objects."

Scroll to Top