CS 176 / 501b - Intro to CompSci II / Program Development
Semester: TBA
Information / Announcements
Notes
1 - Review of Java basics, IDEs, Intro to Two-Dimensional Arrays
2 - Arrays as Method Input Parameters, Sorting and Searching Arrays, Copying Arrays
CompareSearch example
3 - Review of Classes and OOP
MagicEightBall.java
and
TestMagicEightBall.java
BlueJ project zip:
MagicEightBall.zip
The
Three
, or sometimes
Four
Pillars of OOP
4 - Objects in Methods, Objects as Class Fields, the ArrayList Class
Original Fraction class:
Fraction.java
,
TestFraction.java
BlueJ project zip:
Fraction.zip
Minesweeper project example:
Square.java
,
Grid.java
,
Minesweeper.java
BlueJ project zip:
Minesweeper0.zip
5 - Static Class Members, Enumerated Types, Packages
What is "this"?
Static addFraction and subtractFraction methods in the Fraction class:
Fraction.java
,
TestFraction.java
BlueJ project zip:
FractionStatic.zip
Minesweeper project example:
with additional methods plus a Level enum
Level.java
,
Square.java
,
Grid.java
,
Minesweeper.java
BlueJ project zip:
Minesweeper.zip
6 - Introduction to Inheritance
Triangle class inheritance example
GeometricObject1.java
,
Triangle.java
,
testTriangle.java
BlueJ project zip:
Triangle.zip
7 - Inheritance and GUIs
Fraction class GUI example
Fraction.java
,
FractionCalc.java
8 - The Object Class, Abstract Classes, Interfaces, Polymorphism
Example: Fraction class with a Relatable interface
Relatable.java
,
Fraction.java
,
TestFraction.java
BlueJ project zip:
FractionRelatable.zip
9 - Comparable & Sorting, Files
10 - Recursion
Iterative and recursive printFactorial methods:
Factorial.java
Recursion in Minesweeper project:
See the
setOpened
method of the Square class.
Level.java
,
Square.java
,
Grid.java
,
Minesweeper.java
Tasks
Install the
Class Card
UML extension for BlueJ
In Linux, save the Klassenkarte.jar file to the ~/.bluej/extensions folder by running the
bluejclasscardsetup
command in a Terminal.
Assignments
Links and Resources
http://rockhopper.monmouth.edu/cshelp/mucsremote
(Remote access to MU UNIX account)
http://rockhopper.monmouth.edu/cshelp/Remote_file_management
(Remote file management)
http://math.hws.edu/javanotes/
(Introduction to Programming using Java)
http://java.sun.com/docs/books/tutorial/
(Sun Java Tutorials)
http://www.disordered.org/Java-QA.html
(Make Sense of Java)
The bluej IDE
The drjava IDE
The netbeans IDE