Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Examen

SD 2 – Object-Oriented Programming 10

Puntuación
-
Vendido
-
Páginas
30
Grado
A+
Subido en
17-03-2025
Escrito en
2024/2025

SD 2 – Object-Oriented Programming 10

Institución
Object-oriented Programming
Grado
Object-oriented programming

Vista previa del contenido

1. Which of the following is an example of a real-world object that can be

represented in an object-oriented system?

A. An integer

B. A car, with properties like color and speed

C. A function that performs calculations

D. A constant value

Answer: B) A car, with properties like color and speed

Rationale: A real-world object like a car can be represented in OOP with attributes

(properties) and methods (behaviors).




2. Which of the following is a feature of object-oriented programming?

A. Data is hidden

B. Data is manipulated directly

C. Functions are not used

D. Programs are written in a procedural way

Answer: A) Data is hidden

,Rationale: One of the key features of OOP is data encapsulation, which means data

is hidden from outside access and can only be accessed through public methods.




3. Which of the following is a key feature of encapsulation?

A. Hiding the implementation details

B. Reusing code from parent classes

C. Sharing data between different classes

D. Allowing multiple objects to inherit the same properties

Answer: A) Hiding the implementation details

Rationale: Encapsulation involves bundling data and the methods that operate on

that data, restricting access to the internal workings of an object.




4. Which of the following is an example of method overloading?

A. A method with the same name but different parameters

B. A method that changes its behavior based on the object type

C. A method that calls another method

D. A method that throws an exception

Answer: A) A method with the same name but different parameters

, Rationale: Method overloading occurs when multiple methods with the same name

exist but with different parameter lists.




5. Which of the following best describes a class in object-oriented programming?

A. A function that performs tasks

B. A template for creating objects

C. A variable used to store data

D. A process used to execute instructions

Answer: B) A template for creating objects

Rationale: A class defines the blueprint or template from which objects are

instantiated.




6. What does a constructor do in OOP?

A. Initializes an object with default values

B. Defines the structure of the class

C. Executes when an object is deleted

D. Converts an object to a string

Answer: A) Initializes an object with default values

Escuela, estudio y materia

Institución
Object-oriented programming
Grado
Object-oriented programming

Información del documento

Subido en
17 de marzo de 2025
Número de páginas
30
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

$10.99
Accede al documento completo:

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Conoce al vendedor
Seller avatar
douglasmugwe82
5.0
(1)

Conoce al vendedor

Seller avatar
douglasmugwe82 Teachme2-tutor
Ver perfil
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
2
Miembro desde
1 año
Número de seguidores
0
Documentos
4239
Última venta
9 meses hace
fully answered questions and answer

fully answered questions and answer

5.0

1 reseñas

5
1
4
0
3
0
2
0
1
0

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes