Tuesday, February 13, 2018

February 13, 2018

Objective: Analyze algorithm complexity using big O notation

Activities
  • Read BPJ Lesson 38
  • Do Exercise 38 & Big O Contest Problems
  • Finish and incomplete assignments

Tuesday, February 6, 2018

February 6, 2018

Objective: Write recursive algorithms

Activities
  • Discuss meaning of "fractal".  
    • Examples: Chesapeake Bay coastline, Esher drawing, Mandelbrot set
  • Assignments for this week (recursion):
    • Read Blue Pelican Java lesson 39
    • Do exercise 39 and Fibonacci project
    • CodeStepByStep problems - Java>Recursion
      • Any 5 "mystery" problems
      • sumUpTo
      • hashString
      • repeatString
      • wayToClimb
      • hanoi
    • Make a fractal drawing with the DrawingBoard software and recursion
      • Use color, make it suitable for display

Wednesday, January 31, 2018

January 31, 2018

Objective: Design and code an object-oriented program for digital graphics

Activities

Monday, January 29, 2018

January 29-30, 2018

Objective: Design and build an object-oriented program

Activities
  • Review of RGB
  • Overview of DrawingBoard methods
  • Continue with DrawingBoard project

Friday, January 26, 2018

January 26, 2018

Objective: Design and build an object-oriented program

Activities
  • Revise UML diagram to use the Drawable interface
  • Drawing class must support:
    • add(Drawable)   - only way to add shapes and shape groups
    • show()  - display the window with the drawing
  • Divide programming tasks, start work

January 25, 2018

Objective: Design and implement an object-oriented program

Activities
  • DrawingBoard project requirements
    • A vector graphics program for drawing simple shapes on a background image
    • There is a Drawing object that represents the drawing and manages all other objects
    • Drawing contains a collection of Drawable objects
      • simple shapes: rectangles, right triangles, line segments
        • have a color and (x,y) position
      • groups of simple shapes (e.g. a house shape)
        • each simple shape has an (x,y) position relative to the group origin
    • Must use base code provided by the company: 
      • DrawingBoard - displays a window containing an RGB pixel array
      • Drawable - an interface that all simple shapes and shape groups must support
  • Software design
    • How to diagram a package with simplified UML (Barron's p. 212)
      • Add 0..n notation to indicate multiplicity (a collection)
    • Form groups of 2
    • Brainstorm a proposed UML diagram for your project
    • Group presentations

Wednesday, January 24, 2018

January 24, 2018

Objective: for-each loops and Iterators

Activities
  • for-each loop examples
    • Arrays:  Barron's p. 235
    • Collections: Barron's p. 248
    • Cannot remove elements during traversal of array
    • Is part of AP Java subset
  • Iterator examples
    • Collections (including ArrayList): Barron's p. 247 
    • Is not part of AP Java subset, but good to know
  • CodeStepByStep ArrayList problems
    • Bug fixed in twice() - try it again
    • Finish assigned problems (see yesterday's blog)
    • Redo some problems using for-each and Iterator