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
Document preview thumbnail
Vista previa 4 fuera de 35 páginas
Notas de lectura

IS 128 ( Object Oriented Programming I) Latest Midterms Review Q & S 2024

Document preview thumbnail
Vista previa 4 fuera de 35 páginas

IS 128 ( Object Oriented Programming I) Latest Midterms Review Q & S 2024IS 128 ( Object Oriented Programming I) Latest Midterms Review Q & S 2024IS 128 ( Object Oriented Programming I) Latest Midterms Review Q & S 2024

Vista previa del contenido

IS 128




Object Oriented Programming I




LATEST MIDTERMS REVIEW
Q&S




©2024/2025

,1. Multiple Choice: Which principle of object-oriented
programming is demonstrated by the ability of different classes to
use the same interface?
a) Encapsulation
b) Abstraction
c) Polymorphism
d) Inheritance
Correct Answer: c) Polymorphism
Rationale: Polymorphism allows objects of different classes to
be treated as objects of a common superclass, particularly through
the use of a shared interface.


2. Fill-in-the-Blank: An __________ is a blueprint from which
individual objects are created in object-oriented programming.
Correct Answer: Class
Rationale: A class is a template or blueprint that defines the
variables and the methods common to all objects of a certain kind.


3. True/False: In object-oriented programming, encapsulation is
solely concerned with the internal workings of a class and does
not affect its external interface.
Correct Answer: False

©2024/2025

, Rationale: While encapsulation does involve the internal
workings of a class, it also defines the external interface through
which the class interacts with other parts of the program.


4. Multiple Response: Select all that apply. Which of the
following are benefits of using inheritance in object-oriented
programming?
a) Code reusability
b) Increased program complexity
c) Easier maintenance
d) Tight coupling
Correct Answers: a) Code reusability, c) Easier maintenance
Rationale: Inheritance promotes code reusability and easier
maintenance by allowing new classes to adopt the properties of
existing ones. Increased program complexity and tight coupling
are generally considered disadvantages.


5. Multiple Choice: What is the term used to describe a class that
cannot be instantiated but can be subclassed?
a) Concrete class
b) Abstract class
c) Final class
d) Static class

©2024/2025

, Correct Answer: b) Abstract class
Rationale: An abstract class cannot be instantiated on its own
and is intended to be subclassed, where its methods can be
implemented.


6. Fill-in-the-Blank: The process by which one object acquires the
properties of another object is known as __________.
Correct Answer: Inheritance
Rationale: Inheritance is the mechanism in OOP by which one
class is allowed to inherit the features (properties and methods) of
another class.


7. True/False: The 'this' keyword in object-oriented programming
is used to reference the current class instance.
Correct Answer: True
Rationale: The 'this' keyword is a reference to the current object,
used within a class to refer to the current instance of that class.


8. Multiple Response: Which of the following statements are true
regarding static methods in object-oriented programming?
a) They can be called without creating an instance of the class
b) They can access instance variables directly
c) They belong to the class, rather than any object instance

©2024/2025

Información del documento

Subido en
21 de noviembre de 2024
Número de páginas
35
Escrito en
2024/2025
Tipo
Notas de lectura
Profesor(es)
Desconocido
Contiene
Todas las clases
$12.99

¿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

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
EmilioOchieng
4.1
(24)
Vendido
148
Seguidores
17
Artículos
4032
Última venta
3 meses hace


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