• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 48 pages
Exam (elaborations)

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

Document preview thumbnail
Preview 4 out of 48 pages

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

Content preview

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

Document information

Uploaded on
September 28, 2026
Number of pages
48
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$15.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
TutorExpert
3.7
(80)
Sold
608
Followers
314
Items
10951
Last sold
18 hours ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions