Title: cps161S14Topic Web
Course: CPS 161: An Intro to Programming with Java - DL MM MASTER

cps161S14 Topic Web
chasselb

Resources

Java 7 API
Course Content
Topic Web Site
White Board
Startup

Clem Hasselbach Introduction Page
Syllabus (11.5 min)
Class Policy (31.5 min)
Video Features
Discussion Board/Class Participation(15m)
Java Fundamentals

Java Historical Roots(25:34)
Java Characteristics (22.5 min)
Basics Hello World Comments (18 min)
Basics Simple Arithmetic (25 min)
Basics Other Primitives (14.5 min)
Basics Variables (20 min)
Arithmetic Precedence Mixed Arithmetic (16.5 min)
Arithmetic Primitive Sizes, Casting, Shortcuts (31 min)
Strings-Scanners-Formatting

Strings Scanners Classes Objects
Scanner & Formatting
String Methods Part 2
Simple Logic

If Statement Basics
If Statement Examples
While Loops
While Loop Examples
String Equals Comparison
For Loops
For Loop Examples
Switch Examples
More Boolean Concepts
Classes - Basics

Class Basics summary
Defining Classes 1(37m)
- instance variables - definition and access
- methods - definition and access
- formal parameters, actual parameters
- Examples: simple MyDate, and VendingMachine
Defining Classes 2: Rectangle(42.5m)
- Rectangle Example
- Point class - small utility class
- Passing classes as method parameters: equals, and overlap
- "this" keyword
Author's Date Sixth Try(31m)
- private instance variables
- "getters" - methods that start with "get" such as getDay, getMonth, getYear
- "setters" - methods that start with "set" such as setDate, setMonth, setDay, setYear
- method overloading
Classes_3: Summary, Constructors(40m)
- methods can return any primitive or any class
- local variables versus instance variables
- Default Constructors
- Constructor concepts - purpose is to initialize class
- Overloading constructors is very common
- keyword "this" can be used to have a constructor call another constructor
- Constructors are associated with calls with "new" keyword and memory is allocated from the "memory heap"
Defining Classes 4: Miscellaneous(34m)
- buzz words: Information hiding, Abstraction, Encapsulation, API (Application Programming Interface), ADT (Abstract Data Type), Accessor methods, Mutator methods
- Overloading rules and method signatures (note return type is not part of the signature)
- Initialization of Variables
- StringTokenizer example
Static Things (45m)
- static instance variables and static methods
- 3 kinds of memory: local variables (stored on stack), instance variables (stored on heap using "new"), static variables (global memory)
- static method limitations and static examples
- static things in the System class
- static things in the Math class
Wrapper classes(26.5m)
- Wrapper classes associated with primitives: Byte, Character, Short, Integer, Long, Float, Double
- Wrapper classes are Immutable with no default constructor
- Compiler provides "Boxing" and "UnBoxing"
- Useful methods in the Number Wrapper classes: parseInt, parseDouble, etc.
- Useful methods in the Character class: isLetter, isDigit, isWhitespace, isUpperCase, etc.
Parameters References(46.5m)
- References (addresses) are used for classes
- Parameter passing to methods
  - primitives (int, char, double, etc.) are passed as a copy
  - Mutable classes(Most normal classes) passed by reference and can be changed
  - Immutable classes (String, Integer, Double, other wrapper classes) passed by reference but can't be changed
- null - the keyword for the special "undefined" reference
- Side effects of passing Mutable classes and the use of "Copy-Constructors"
Packages, Access Levels(18m)
- Package is similar to a folder ... default package
- public, private access level and file naming rules for public classes
- default, frie ndly access method (i.e. no public or private)
- import statements and package statements
- Sample mytools package example with "P" and "In" classes
Arrays

Array Fundamentals1(42.5m)
Array Initialization & Method Parameters(33.5m)
Array Miscellaneous(42m)
Array Example: Standard Deviation(7.5m)
Array Example: Common Birthday(integer date) (15.5m)
ArraysExample: Common Birthday (using Date class) (12m)
Array Example: Unique Numbers(20m)
Arrays_part2

Select Sort(12.3m)
Arrays Part2 Miscellaneous(29.5m)
Array Multi-Dimensions(18m)
GradeBook and Fantasy Football(20m)
Bubble Sort(34.5m)
Matching Game(36m)
Game of Life(45.5m)
Classes - Inheritance

Inheritance: Introduction(46m)
Inheritance Odds and Ends(41.5m)
Inheritance More Examples(28m)
Inheritance Object Class(35m)
Polymorphism: Shapes(52m)
More Polymorphic Examples(24m)
Polymorphism Book Examples(22m)
Inheritance/polymorphism Chess Game(45m)
JavaUserInterface

Drawing Basics(32.5m)
Mouse Interfaces: Spots Painting(38.5m)
Mouse Interfaces: Drawing Program(41m)
Exceptions and I/O

Exceptions Basics(49.5m)
Exception Heirarchy and Strategy(47.5m)
Checked Exceptions, etc. (37m)
ExtraTopics

Word Search - Problem Solving(42.5m)
Simple GUI Components(24m)
Tic Tac Toe GUI(35m)
Polymorphic Game of Life: Ants and Predators(33.5m)
You now know enough to do JH0
Simple Development Environment (21.5 min)
You now know enough to do JH1
The following is an optional video that will show you how to do Java work
outside of Eclipse. In this video you will see how to use the javac and
java programs from the command line. There is also a fun little
game demo'ed in this video called "planetoid".
Command Line Java Development
You now know enough to do a lot of JH2
You now know enough to do ALL of JH2
You now know enough to do JH3
You now know enough to do JH4
Midterm this week --- see schedule in Aardvark
Most of JH5 should be doable now
You now know enough to do JH5
Eclipse Goodies(10m)
Eclipse Debugger(18.5m)
JING(8m)
You now know enough to do ALL of JH6
You now know enough to do JH7
Absolute Java Text
Tools

Simple Development Environment (20.5 min)
Eclipse Goodies
Eclipse Debugger
Jing Creation
Discussion Boards/Class Participation
Command Line Java Development Environment
JH_Help

JH Help Summary
JH1 Help
- Try doing JH1 on your own first, but if you want more hints, see the following:
- "Jar" assignment help
- "Making Change" help
JH2 Help
- Try doing JH2 on your own first, but if you want more hints, see the following:
- "Factorial" help
- "Fibonocci" help
- Help for Newton's Algorithm for Square roots
JH3 Help(26m)
- Try doing JH3 on your own first, but if you want more hints, see the following:
- "MyStringMethods" class help
- "Date" problem help
Help for JH3 on the Roman Calculator problem(38m)
- Hex Calculator is solved in the video which has some commonality with the Roman Calculator
JH4 Help - Hangman(7m)
- Try doing JH4 on your own first, but if you want more hints, see the following:
- Hangman class homework is discussed
Midterm Procedures and Hints
- Procedures for taking the midterm
- Hints about what you need to know for the midterm
JH5 Help - Fraction class(36.5m)
- Try doing JH5 on your own first, but if you want more hints, see the following:
- "Fraction" Problem help
JH6 Inheritance Exercise(24.5m)
- Try doing JH6 on your own first, but if you want more hints, see the following:
- Help for the Person, Student, Family problem. In the video we work a similar problem: Employee, HourlyEmployee, Company.
Programming Philosophy ( 2 min)
- Quick video to encourage you to:
  - Practice programming on a regular basis ... don't try to learn by cramming
  - Pay attention to "Code readability" ... learn from other's examples, published answers, etc.
miscellaneous

Documentation on Java
Linux Basics
User Tools