View on GitHub

Chenxin's Individual Work (Tri 3)

This github page is a source and version control for my replit with code from Tech Talk challenges and OO assignments. It also stores my notes and questions from Tech Talks, as well as my plan for preparing for the upcoming AP CSA exam.

Home/Review Tech Talk Notes AP Test Prep FRQ Code

Tech Talk Notes

TT2 (Calculator)

Calculator class: inputs a string with integers and operations, returns the product

  1. Tokenization: seperate string into tokens
  2. Put into RPN: put numbers into list and operators into stack depending on precedence, first have to peek (PEMDAS)
  3. If operator in stack has precedence procede to calculate
  4. Calculate: put all numbers in list into stack, when you get an operator, pop 2 numbers from stack and calculate, then push back into stack

toString method: that has original expression, other expressions, and final result


Plans

Potential questions: How to print out RPN whilst calculating it

  1. Review Wikipedia page on the Reverse polish notation to understand it
  2. Figure out how seperators are coded in calculator
  3. Code the different parts of calculator

TT1 (Linked Lists)

Linked lists, queus, stacks are fundamental data structures. Implements …

Queus: are first in first out (FIFO): there is a head and tail pointer, where head stays constant and tail changes as things are added, but head changes and tail is constant as things are removed. Enqueu and Dequeu

image

Stacks: are last in first out (LIFO): use push and pop

image

Linked lists: Queus has a linked list. Data is the objects, the next node would be the next object. image


Plans

Potential questions: How are linked lists related to queus and stacks? What is the difference between hashmaps and linked lists?

  1. Understand how queus use FIFO to add/delete objects
  2. Learn how to use for each loops as a iterable

TT0 (Data Structures)

Paradigms

Paradigms are a strategy to be followed for writing software applications

Data Structures

Some common data structures that java uses to store information include: Array lists, hashmaps, and algorithms (such as recursion).


Plans

Potential questions: Why do we not use imperative paradigms in java? What is difference between dictionaries and hashmaps?

  1. Figure out how to use hashmaps in menu
  2. Figure out how to return a 2d array as a String
    • Hint: “/n” is a line break in a string