• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 6 páginas
Examen

Java Data Structures Final Exam Questions With Complete Solutions

Document preview thumbnail
Vista previa 2 fuera de 6 páginas

JAVA DATA STRUCTURES FINAL EXAM QUESTIONS WITH COMPLETE SOLUTIONS /.______ can be used to enforce the walls of an ADT. - Answer-Encapsulation /.A __________ allocates memory for an object and can initialize the object's data. - Answer-Constructor /.A linked list does not always have a head. - Answer-False /.A linked list with a null head is full. - Answer-False /.A recursive binary search algorithm always reduces the problem size by half at each recursive call. - Answer-True /.A recursive method always calls itself. - Answer-False /.A recursive solution can have more than one base case. - Answer-True /.A reference based implementation of the ADT list does impose a fixed maximum list length. - Answer-False /.A reference variable contains the location of an object in memory. - Answer-True /.A reference-based implementation of a linked list has a density factor of 1. - Answer-False /.A reference-based implementation of the ADT list does not shift items during insertion or deletion. - Answer-True /.A test for the base case enables recursive calls to stop. - Answer-True /.According to the basic tenets of software engineering, more than 50% of the cost and time for software is perpetuated within the maintenance phase of the software life cycle. - Answer-True /.ADT - Answer-Abstract Data Type /.An array of objects is actually an array of references to the objects. - Answer-True /.An array-based implementation of an ADT list: - Answer-requires less memory to store a data element than a reference-based implementation. /.An object encapsulates only data, not operations on that data. - Answer-False /.Check all of the following that are true of an array-based implementation of a linked list: - Answer-Generally has a fixed size /.Check all of the following that are true of an array-based implementation of a linked list: - Answer-Has a density factor of 1 /.CompareTo cannot compare two different types of numbers. - Answer-True /.Consider the following Java program. What is output by the program? public static void main( void ) { int a, b, result; a = 3; b = 4; result = value( a, b ); Sf("%dn",result); } public static int value( int x, int n ) { if ( n 0 ) return x * value( x, n - 1 ); else return 1; } - Answer-81 /.Constructor - Answer-Creates and initializes a new instance of a class

Vista previa del contenido

JAVA DATA STRUCTURES FINAL EXAM QUESTIONS
WITH COMPLETE SOLUTIONS


/.______ can be used to enforce the walls of an ADT. - Answer-Encapsulation

/.A __________ allocates memory for an object and can initialize the object's data. -
Answer-Constructor

/.A linked list does not always have a head. - Answer-False

/.A linked list with a null head is full. - Answer-False

/.A recursive binary search algorithm always reduces the problem size by half at each
recursive call. - Answer-True

/.A recursive method always calls itself. - Answer-False

/.A recursive solution can have more than one base case. - Answer-True

/.A reference based implementation of the ADT list does impose a fixed maximum list
length. - Answer-False

/.A reference variable contains the location of an object in memory. - Answer-True

/.A reference-based implementation of a linked list has a density factor of 1. - Answer-
False

/.A reference-based implementation of the ADT list does not shift items during insertion
or deletion. - Answer-True

/.A test for the base case enables recursive calls to stop. - Answer-True

/.According to the basic tenets of software engineering, more than 50% of the cost and
time for software is perpetuated within the maintenance phase of the software life cycle.
- Answer-True

/.ADT - Answer-Abstract Data Type

/.An array of objects is actually an array of references to the objects. - Answer-True

/.An array-based implementation of an ADT list: - Answer-requires less memory to store
a data element than a reference-based implementation.

, /.An object encapsulates only data, not operations on that data. - Answer-False

/.Check all of the following that are true of an array-based implementation of a linked
list: - Answer-Generally has a fixed size

/.Check all of the following that are true of an array-based implementation of a linked
list: - Answer-Has a density factor of 1

/.CompareTo cannot compare two different types of numbers. - Answer-True

/.Consider the following Java program. What is output by the program?

public static void main( void )

{

int a, b, result;

a = 3;

b = 4;

result = value( a, b );

System.out.printf("%d\n",result);

}

public static int value( int x, int n )

{

if ( n > 0 )

return x * value( x, n - 1 );

else

return 1;

} - Answer-81

/.Constructor - Answer-Creates and initializes a new instance of a class

Información del documento

Subido en
30 de julio de 2025
Número de páginas
6
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$11.49

¿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.
Brainariam
3.4
(30)
Vendido
160
Seguidores
7
Artículos
8386
Última venta
4 semanas 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