Lecture Notes
CPSC 224 (Spring 2012)
Today
Best practices
Inner classes
Reading
Ch 6: 258275
S. Bowers
1 of 8
Lecture Notes
CPSC 224 (Spring 2012)
Some (Java) Best Practices
Minimize accessiblity of classes and elds
instance vars should never be publi
Lecture Notes
CPSC 224 (Spring 2012)
Today
Quiz 6
Start on Java Swing
Homework
hw5 out
Reading
Ch 7: 281-299
Ch 8: 323-330
S. Bowers
1 of 10
Lecture Notes
CPSC 224 (Spring 2012)
GUI programming in Java
Early versions of Java used the AWT
Abstract Wi
Lecture Notes
CPSC 224 (Spring 2012)
Today
Java objects
Homework
hw 3 out
Reading
Ch 4: 105128
S. Bowers
1 of 9
Lecture Notes
CPSC 224 (Spring 2012)
Java Objects
So far we have been at the class level:
static (class) methods and static (class) variabl
Lecture Notes
CPSC 224 (Spring 2012)
Today .
More on Java basics
Homework
hw 2 out (due Tues.)
Reading
Ch 3: 63-98 (more review)
S. Bowers
1 of 10
Lecture Notes
CPSC 224 (Spring 2012)
Getting Started
EXERCISE
Create a class named Lab1 with a main metho
Lecture Notes
CPSC 224 (Spring 2012)
Today .
Quiz 2
Java basics
Homework
hw 1 due
hw 2 out (due one week from Tues.)
Reminder
Well meet in the lab on Tuesday
Q: What is the signature for a Java main method?
S. Bowers
1 of 9
Lecture Notes
CPSC 224 (Sp
Lecture Notes
CPSC 224 (Spring 2012)
Today .
Java basics
S. Bowers
1 of 8
Lecture Notes
CPSC 224 (Spring 2012)
Java main method (cont.)
In Java, main looks like this:
public class HelloWorld cfw_
public static void main(String[] args) cfw_
System.out.pri