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

Exam (elaborations) CS2114

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

entails questions and answers

Institución
CS2114
Grado
CS2114

Vista previa del contenido

, To implement a Deque(double ended queue) with a firstNode and a lastNode reference,
which of the following underlying representations would result in a more efficient
implementation? - CORRECT ANSWERS-Double linked chain

Of the two sorting algorithms we studied in lecture, which would do less work, in terms
of comparisons and swaps, if executed upon an already sorted array? - CORRECT
ANSWERS-Insertion Sort

Advantage(s) of an inner iterator class over a separate iterator class: - CORRECT
ANSWERS-It has direct access to the ADT's data so it can execute more efficiently

For an array implementation of a list, the efficiency of remove(index) is: - CORRECT
ANSWERS-O(n)

For an array implementation of a stack, the efficient choice for the top is - CORRECT
ANSWERS-the last element in the array.

Which of the following List member methods should not be implemented for a
SortedList? - CORRECT ANSWERS-add(int newPosition, T newEntry)

Why do we use inheritance? - CORRECT ANSWERS-To have a general class with
common properties and behaviors shared by multiple more specialized classes.

A key benefit of inheritance is - CORRECT ANSWERS-an object can have several
types, it is type compatible with any of its superclasses

Encapsulation - CORRECT ANSWERS-A design principles that encloses data and
methods within a class', thereby hiding the class implementation details

abstraction - CORRECT ANSWERS-focus on what not how

client interface - CORRECT ANSWERS-what client code needs to know to use a class

implementation - CORRECT ANSWERS-all the data fields and details of method
defintions

The most efficient approach to dealing with a gap left in an array after removing an entry
from a bag is to - CORRECT ANSWERS-replace the entry being removed with the last
entry in the array and replace the last entry with null

Which of the following visibility modifiers should be used for a field in a class C if the
programmer does not want the the subclass to have direct access to the field? -
CORRECT ANSWERS-private

Escuela, estudio y materia

Institución
CS2114
Grado
CS2114

Información del documento

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

Temas

$18.66
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
ndungwamonicah600
4.0
(2)

Conoce al vendedor

Seller avatar
ndungwamonicah600 Chamberlain College Of Nursing
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
6
Miembro desde
1 año
Número de seguidores
0
Documentos
1647
Última venta
2 meses hace

4.0

2 reseñas

5
1
4
0
3
1
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