csa

Tech Talk Notes
Tech Talk 0
Tech Talk 1
Tech Talk 2
Tech Talk 3

Test Prep
Review
2015 Test
2020 Test

Tech Talk 0 : Data structures

What is a data structure?

Method of organizing data

Paradigms

Paradigm: An approach or method to be followed for writing software.

Imperative Paradigm: Sequence of events based off of a choice. Think about it like a flowchart.

Object-oriented Paradigm: Paradigm that relies on the concept of classes and objects. Think about it like a UML diagram.

Data Structures

Arrays/Lists

public static Animal[] animalData() {
	return new Animal[]{
	        new Animal("Lion", 8, "Gold"),
	        new Animal("Pig", 3, "Pink"),
		new Animal("Robin", 7, "Red"),
		new Animal("Cat", 10, "Black"),
		new Animal("Kitty", 1, "Calico"),
		new Animal("Dog", 14, "Brown")
	};
}

//this is a comment

Java HashMap

private final Map<String, Integer> OPERATORS = new HashMap<>();
    {
        // Map<"token", precedence>
        OPERATORS.put("*", 3);
        OPERATORS.put("/", 3);
        OPERATORS.put("%", 3);
        OPERATORS.put("+", 4);
        OPERATORS.put("-", 4);
    }

Algorithms always accompany data structures.

Replit Review Ticket
Replit Review Ticket