|
|
|
| Week |
To be covered |
Assignment & Materials |
|
|
|
| |
| | | |
|
|
|
| 8/30 – 9/01 |
Administrivia/Review of Programming I: Chapters
2–6 and 8.1–8.5 |
- Slides for week 1 – Code:
- Simple RPN calculator. A
calculator that asks for two
values and an operator. After
it performs the appropriate
operation, it asks for another
value and an another operator.
Then it performs
the appropriate operation on
the value and the result from
the previous operation. Then
it asks for another value
and operator and uses the
previous result and the value
to perform the operation, and
so on until the user hits
the letter ’q’ in place of an
operator. Then the program
exits. For this program you
must use funtions and create
your own ’
operator for the
power funtion.
|
|
|
|
| 9/06 – 9/08 |
I/O Files and the Web: Section 4.10 and additional
material |
- Code:; Slides:
- Assignment 2: Make your
RPN calculator be aware of
the last result so it stores even
after the program exits. Then,
the next time the program
starts it will put the latest
result as one of the values
and will ask for another value
and an operator and it takes it
from there. Due 9/15
|
|
|
|
| 9/13 – 9/15 |
Searching and Sorting
- Bubble, Insertion and Selection Sort: Sections
16.1
|
- Slides
- Assignment 3. Modify any of
the sort algorithms to sort a
secondary array B based on
the sorting order of A (that is
akin to say: sort the titles of
the songs (B) based on their
rank(A).
|
|
|
|
| 9/20 – 9/22 |
Searching and Sorting II
- Sequential Search: Section 8.8
- Binary Search: Section 16.2
- Sorting and Searching Strings
|
Slides and Code1 and Challenge |
|
|
|
| 9/27 – 9/29 |
Review and Midterm I |
|
|
|
|
| 10/4 – 10/6 |
the String class
- Comparing Strings
- String arrays/ Strings as arrays
- Additional Methods
|
Assignment 4, Due 10/13: Complete
the game of life (Simulation of
life) here, by coding the empty
methods according to what they are
supposed to do or according to the
comments. Note: You may come up
with more efficient ways to code
these methods that do not follow the
comments sequentially and that’s
fine. However, the behavior has to
be consistent with the comments.
The methods and the name of the
file have to stay as they are in the
file. You are welcome to code extra
methods if you need them, as long as
you don’t modify the main method
and as long as there is a DOPAction
and PODAction methods. |
|
|
|
| 10/11 – 10/13 |
Two Dimensional Arrays
- Rows, Columns
- Spreadsheets (Grade Sheet)
- Graphs
- The game of life, Latin Square, Soduku
|
Assignemnt 4 dedline extended. |
|
|
|
| 10/18 – 10/20 |
Introduction to Classes: Sections 6.1–6.6 and 9.1
- Data Abstraction
- Fields, Methods
- Constructors
- Polymorphism, Inheritance
- Overloading, Overriding
|
- Slides are here. Here are our
Car,Limo and Test classes.
- The
classes for the game where
Aliens are placed randomly
in an array and then shot at
randomly are here: Creature,
Alien, TestGame. Enjoy.
- Assignment 5: Modify the
previous assignment (Game
Of Life) so that it can use a
board that contains creatures.
Creatures can be ”empty”,
DOPs and PODs. Do this by
implementing
a class Creature, and sub
classes DOP and POD that
inherit from it. Implement
methods for moving, fighting
and reproducing for DOPs
and PODs that mimic the
behavior specified in
the previous assignment. Also
implement a toString method
for these classes. Make sure
you change the print, play and
init board methods
accordingly. Also, change the
type of elements of the board
accordingly (will not be a 2D
array of int anymore, but a
2D array of Creature. Here’s
a rough skeleton of the main
class of the game GoLHW2).
|
|
|
|
| 10/25 – 10/27 |
Special Data Structures
- Linked Lists
- Stack
- Queue
Video Games keynote speaker at the auditorium |
Slides are here. |
|
|
|
| 11/01 – 11/03 |
MIDTERM II |
|
|
|
|
| 11/08 – 11/10 |
GUIs
- Swing, AWT
- JFrame, Components
- JButton, JLabel, JTextField
|
- Slides are here, and sample
files are here.
- Assignment 6: Please take a
look
at the classes in here. Your job
is to implement the necessary
methods in LinkedList.java
and implement the classes for
Stack and Queue. The file
TestLists.java contains tests
and you are not allowed to
modify it. When you run
TestLists it will try to run
a battery of tests against
your classes. This is your
benchmark to see if your
methods are working. Once
you finish your homework
you should be able to compile
and pass all the tests. Then,
you should be in good shape
to submit.
|
|
|
|
| 11/15 – 11/17 |
GUI. Events
- More GUI. Events
- Clicks and Text Input Events
- Inner classes for Listeners
|
|
|
|
|
| 11/22 – 11/24 |
More on GUI.
- Using the Java API documentation
- Listening to multiple events in a Window
- Extending Swing classes
|
|
|
|
|
| 11/29 – 12/01 |
More GUI and Using External Libraries
- Finalize GUI
- File Chooser and more complex GUI
components
- Playing MP3s and including “jars”
|
- More examples
of GUI and Event Handling
and JFileChooser, as well as
playing MP3s using jl1.0.jar
...here...
- Assignment 7: Build a basic
MP3 Player. It must read a
playlist file selected by the
user. The file has to be opened
with a File Chooser. Each
line in the file should be
the full path to an MP3 file.
A minimum interface should
have a button to select (open)
a
file that contains the songs to
be played (aka. the playlist),
a label that indicates the song
currently playing, a play and
a stop button. It would be
nice to have more labels that
indicate the playlist that has
been opened. The homework
asks you to basically stitch
together previous homeworks
and code reviewed in class.
The due date is Thursday Dec.
8th.
|
|
|
|
| 12/06 – 12/08 |
Review |
|
|
|
|
| 12/13 – 12/15 |
Final |
|
|
|
|
| |
| |
| |
| |
| |