IB Computer Science 2
From WLCS
Contents
- 1 Wednesday - Thursday (11/1/17 - 11/2/17)
- 2 Monday - Tuesday (10/30/17 - 10/31/17)
- 3 Friday (10/27/17)
- 4 Wednesday (10/25/17)
- 5 Monday - Tuesday (10/23/17 - 10/24/17)
- 6 Thursday - Friday (10/19/17 - 10/20/17)
- 7 Monday - Wednesday (10/16/17 - 10/18/17)
- 8 Thursday - Friday (10/12/17 - 10/13/17)
- 9 Tuesday (10/10/17)
- 10 Friday (10/6/17)
- 11 Thursday (10/5/17)
- 12 Wednesday (10/4/17)
- 13 Monday - Tuesday (10/2/17 - 10/3/17)
- 14 Archives
Wednesday - Thursday (11/1/17 - 11/2/17)
Agenda:
- Introduction to Stacks - Media:Stacks.ppt
- Be able to describe the characteristics of a stack
- Be able to explain the operations of a stack
- Be able to describe different stack applications
- If given a list or an array, be able to explain their use as stacks
- Data Structure Visualizations
- Practice Stack Exercises
- Push the following words onto a stack: "Washington-Lee", "Generals", "Computer", "Science". What will the words be in the order of popping them all.
- Imagine that you are stuck in a dungeon. You are using a stack to keep track of your movements so that you can find your way back to the beginning of the dungeon. Diagram the stack after the following moves: forward, left, left, right, forward, forward, right, forward, left. Using your stack, what would the order of moves be to return back to your starting position?
- Assume you are given a list of numbers that you can only access one at a time in their order. Describe how you would use stacks to reverse their order
- Static-sized Stack class walk-through
- Implement a Stack using a static data structure (e.g. array)
- Test out our implementation to find weaknesses
- Fix the weaknesses in our implementation
- Queues - Media:Queues.ppt
- Work on Java - Static Queue Assignment
Monday - Tuesday (10/30/17 - 10/31/17)
Agenda:
- Group 4 Project Field Trip
- November 29th, 2017
- Smithsonian Museum of Natural History
- We need chaperones -- ask your parent and return the form
- 1st Quarter is ending -- demo any missing assignments
- Work on your Internal Assessment or college applications
- If you are completely done with college applications, then work on scholarships
Friday (10/27/17)
Agenda:
- Mr. Bui has a slight case of pneumonia.
- Complete any missing assignments
- Work on college applications (November 1st deadline is just around the corner)
- If you are complete done with college applications, then work on scholarships
Wednesday (10/25/17)
Agenda:
- Demo the following:
Monday - Tuesday (10/23/17 - 10/24/17)
Agenda:
- Demo the distance() and midPoint() methods using the points that Mr. Bui has written on the board
- Work on the following labs:
Thursday - Friday (10/19/17 - 10/20/17)
Agenda:
- Search and Sort Quiz
- Finish working on the Point class from last class period
- Define more static methods in PointMain.java:
- double distance(Point p1, Point p2) - returns distance between p1 and p2
- Point midPoint(Point p1, Point p2) - returns a new Point, which is the midpoint between p1 and p2
- Test your new methods in the main(). Demonstrate the tests to Mr. Bui
Homework:
- Add the distance() and midPoint() methods to your PointMain.java (see above)
Monday - Wednesday (10/16/17 - 10/18/17)
Agenda:
- Demo the CelsiusConverter GUI Tutorial
- Search and sort quiz this Thursday (10/19/17). Be able to describe the step-by-step algorithms:
- Linear search
- Binary search
- Selection sort
- Bubble sort
- Java Functions/Methods Review
- Media:JavaMethods.pptx
- Method Definitions
- Method Return types
- Method Parameters
- Method Calls
- Java Objects
- Point Class assignment
- You will create two java files: Point.java and PointMain.java
- Point.java - the Point class definition will be here
- PointMain.java - only the main() method will be located here
- Declare and initialize the following private attributes in the Point class
- double x = 0.0
- double y = 0.0
- Define two Point() constructors:
- default constructor: Point()
- specific constructor Point(double newX, double newY)
- Define the following public methods in the Point class
- double getX() - returns the x-coordinate
- double getY() - returns the y-coordinate
- void setX(double newX) - sets the x-coordinate to the new x-coordinate parameter
- void setY(double newY) - sets the y-coordinate to the new y-coordinate parameter
- String toString() - returns a String representation of the Point object (skip this for now)
- Go to your PointMain.java file to test out your Point class
- In the main method, create several new instances of Point objects
- Print out each of your Point objects
- Define a static method in PointMain.java named double slope(Point p1, Point p2) - returns the slope between p1 and p2
- Test and print out your slope method when you use it with your instantiated Point objects in the main() method
- You will create two java files: Point.java and PointMain.java
Thursday - Friday (10/12/17 - 10/13/17)
Agenda:
- Demo missing assignments
- Complete the CelsiusConverter GUI Tutorial
- Be sure to read the page, complete the steps, and then hit next
- Java NetBeans GUI Review
Tuesday (10/10/17)
Agenda:
- Mr. Bui is out today b/c his son is sick.
- Complete any missing assignments
- Complete the CelsiusConverter GUI Tutorial
- Be sure to read the page, complete the steps, and then hit next
Friday (10/6/17)
Agenda:
- Demo missing assignments
- Everything up through Bubble Sort
Thursday (10/5/17)
Agenda:
- Mr. Bui is sick today
- Complete any missing assignments
- Work on your Internal Assessment code
- If you cannot work on your code, you should research or design aspects of your code that you know you will need to develop
Wednesday (10/4/17)
Agenda:
- Introduction to Sorting
- Complete and demo Media:SelectionSort.java
- Complete and demo Media:BubbleSort.java
Monday - Tuesday (10/2/17 - 10/3/17)
Agenda:
- Introduction to Sorting
- Complete and demo Media:SelectionSort.java
- Period 6
- Complete and demo Media:BubbleSort.java