JavaFX Controls
ADTs
Binary Trees
Relevant interfaces
Misc
100

What is a stage and scene? 

Stage = window in which the JavaFX application is running
Scene contains a single control, such as a button or label

100

What is an abstract data type? 

A data type model defined by its behavior from the point of view of a user of the data

100

Diagram any type of binary tree and describe what makes it as such 

a tree data structure where each node has at most two children

100

Name five JCF implementations you're allowed to use! 

HashMap, TreeMap, HashSet, TreeSet, LinkedList, ArrayList, Queue, Stack, PriorityQueue

100

What's your favorite place to study on campus? 

Jennie's: RNG hehe I like to try new places everytime

200

What is a layout? 

A node of nodes (e.g. an HBox)

200

What are the differences between stacks and queues? 

LIFO vs FIFO

Different method names

200

Label a leaf, internal node, and root node on a board diagram

do you node da wae 

200

Compare comparable with comparator

Comparable: used to define the natural ordering of the objects within the class

Comparator: used to define custom sorting logic externally

200

What makes a binary tree balanced? 

If there are just as many nodes on the right and left sides

300

Name three types of layouts 

HBoxes, VBoxes, GridPanes, BorderPanes, StackPanes

300

How do you get to the tail node in a linked list?

Starting from the head, traverse the node 'next' pointers
300

What is infix traversal? 

In-order traversal: left, middle, then right node

300

What does Observer do?

the concrete observer implements Observer and notify()s when the subject's trigger has been observed 

300

What is a generic? 

Essentially a placeholder that allows for creating classes and interfaces that work with any type

400

Make a button factory method! 

private static Button makeButton(String text) {

Button button = new Button(text)

button.setOnAction(), button.setStyle(), etc

return button 

}

400

What is the time complexity of all basic ArrayList vs LinkedList operations?

AL: O(1) (except sometimes append) 

LL: O(1) for append and anything on head on tail, otherwise O(n) 

400

What are the differences between a heap and BST? 

A heap places highest or lowest at top and doesn't care about horizontal order, BST maintains a sorted order where each node's left child is smaller and each right child is larger 

400

Write an example of a lambda expression using the interface EventHandler 

button.setOnAction((ActionEvent event) -> {

  System.out.println("did you know dyeing your hair blue makes you live longer?");

});

400

What are the differences between TreeSet/TreeMap and HashSet/HashMap? 

TreeSet/TreeMap are sorted and slower 

500

Discuss & code an example of the JavaFX components that should be used to create a GUI for this Jeopardy 

Label + gridpane of buttons

500

Describe a circular array

Used to implement queue, is circular if the first element is also next of the last element

500

Diagram what order a heap and BST are traversed 

Heap: Root node downwards in equal horizontality 

BST: Bottom up, left-middle-right

500

Make an iterator for an array of letters

public class LetterArrayIterator implements Iterator{

hasNext(){ return index < array.length;}

next(){return letters[index++]}

}


500

Explain the MVC pattern! (Diagram it for some extra points too)

Model = Application building blocks

View = Current state of the model in viewable form

Controller = Translates actions

M
e
n
u