• ¿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 4 fuera de 48 páginas
Examen

MCIT Newest Actual Exam Complete Questions & Correct Detailed Answers (Verified )

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

MCIT Newest Actual Exam Complete Questions & Correct Detailed Answers (Verified )

Vista previa del contenido

MCIT Newest Actual Exam Complete
Questions & Correct Detailed Answers
(Verified )
Question 1
How do you construct a LinkedList?
Correct Answer
LinkedList constructs a list containing the elements of the specified collection, in
order they are returned by the collection's iterator



Question 2
What are the pros of the Singly Linked Lists?
Correct Answer
The linked list is more efficient at memory allocation because we don't need to
indicate the capacity -- like with the ArrayList Stack implementation



Question 3
What is a false negative / positive in our unit test?
Correct Answer
It's a bug in your test case and code.



Question 4
What is external quality?
Correct Answer
Executable program running on hardware in some environment.
Functionality - adheres to specifications
Reliability - maintains level of performance
Usability - ease with which suers can perform tasks
Efficiency - minimal use of resources
Security - confidentiality, integrity, availability




Page 1 of 48

,Question 5
What are the three places we can add a value to a LinkedList?
Correct Answer
front: link new node to current head; point head at a new node
rear: link tail node to a new node; point tail at a new node
middle: link new node to one that follows it; link previous node to new node



Question 6
What is the most efficient way of copying an array?

Correct Answer
System.arraycopy()



Question 7
What is a stack?
Correct Answer
A data structure that works like a LinkedList but only has two operations:
push - add the specified element to the top of the stack
pop - remove the element from the top of the stack




Page 2 of 48

,Question 8
What is a "generic" class?
Correct Answer
Uses parameters of different types that it uses

Use the type parameter in the class definition:

## definition
public class GenericArrayList {
protected E[] data;
....
public GenericArrayList(int capacity){
data = (E[]) new Object[capacity];
}
public void add(E value) {
....
}
public E get(int index) {
....
}

}

## implementation
GenericArrayList dogs = new GenericArrayList<>();

dogs.add(new Dog("Pearl"));



Question 9
What is a double-ended queue?
Correct Answer
Queue-like data structure that supports insertion and deletion at both the front and
the back of the queue. It is more abstract and general than the stack and queue
ADTs.




Page 3 of 48

, Question 10
How should you access instance variables in JUnit tests?
Correct Answer
Use the "protected" keyword to access instance variables. This will make the variable
able to be set in the JUnit test (because it's a part of the package).



Question 11
What is unit testing?
Correct Answer
test small piece of code; intuition is that bugs will be easier to find/fix



Question 12
How do you find an element in a LinkedList?
Correct Answer
public class LinkedList {
...
public boolean contains(E value) {
Node current = head;
while (current != null) {
if (current.value.equals(value)) {
return true;
}
current = current.next;
}
return false;
}
}




Page 4 of 48

Información del documento

Subido en
28 de septiembre de 2026
Número de páginas
48
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$15.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.
TutorExpert
3.7
(80)
Vendido
608
Seguidores
314
Artículos
10951
Última venta
18 horas 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