What is the reason why utilizing getters & setters are preferred to making instance variables public?
Comp 210 MT2 Review

Flashcard
•
Computers
•
University
•
Hard
Quizizz Content
FREE Resource
Student preview

23 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Back
It allows for enforcement of formatting / validation when getting & setting data.
2.
FLASHCARD QUESTION
Front
When implementing an interface, to implement a specific method we should use this keyword:
Back
@Override
3.
FLASHCARD QUESTION
Front
Which of the following would be the proper class header for a Java class implementing a simulation of a collection of things that can be compared?
Options:
public class Simulation<T implements Comparable<T>>
public class Simulation implements Comparable
public class Simulation
public class Simulation<T>
Back
public class Simulation<T implements Comparable<T>>
4.
FLASHCARD QUESTION
Front
TRUE OR FALSE: Searching for an element in a doubly linked list has a better average time complexity than searching through a singly linked list.
Back
False
5.
FLASHCARD QUESTION
Front
Assume we have a doubly linked list, and a particular element to be deleted's pointer is on hand (but NOTHING else). How does the time complexity for this deletion compare to if this was a singly linked list?
Back
Doubly: o(1), If Singly: o(n)
6.
FLASHCARD QUESTION
Front
Assume elements are inserted into a BST in exactly the following order: 52, 23, 77, 65, 9. What would the resulting BST look like?
Back
7.
FLASHCARD QUESTION
Front
The best case time complexity of searching a BST is o( _ )
Back
1
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
Software Engineering

Flashcard
•
University
15 questions
Binary Numbers Flashcard

Flashcard
•
12th Grade
20 questions
Logo Thon Flashcard Competition

Flashcard
•
University
15 questions
Data Structures and Algorithms Flashcard

Flashcard
•
University
20 questions
Data Structures Flashcard

Flashcard
•
KG - University
16 questions
Computer Science Principles Unit 1

Flashcard
•
12th Grade
21 questions
Mastering Data Structures

Flashcard
•
University
20 questions
Software Engineering

Flashcard
•
University
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade