CS 207 Programming II

This couse will provide programming skills that go beyond the basics into object oriented programming as well as to provide you with standard techniques to solve common programming problems that arise in everyday programs such as sorting, working with files and the web, etc. At the end of the couse you should be able to use these techniques effectively as well as to be proficient in researching solutions to other, more complex, programming challenges.

Meetings:
Tuesdays and Thursdays from 10:50am – 12:05pm
At:
CBM 158
Website:
http://www.fid.cl/courses/cs207
Textbook:
Starting Out with Java From Control Structures through Data Structures by Tony Gaddis and Godfrey Muganda, Pearson/Addison Wesley, First Edition, 2007.
Syllabus:
Get the syllabus as a PDF here.



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 1Code:
  • 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

  1. Bubble, Insertion and Selection Sort: Sections 16.1

  1. Slides
  2. 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

  1. Sequential Search: Section 8.8
  2. Binary Search: Section 16.2
  3. Sorting and Searching Strings

Slides and Code1 and Challenge




9/27 – 9/29

Review and Midterm I




10/4 – 10/6

the String class

  1. Comparing Strings
  2. String arrays/ Strings as arrays
  3. 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

  1. Rows, Columns
  2. Spreadsheets (Grade Sheet)
  3. Graphs
  4. 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

  1. Data Abstraction
  2. Fields, Methods
  3. Constructors
  4. Polymorphism, Inheritance
  5. 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

  1. Linked Lists
  2. Stack
  3. Queue

Video Games keynote speaker at the auditorium

Slides are here.




11/01 – 11/03

MIDTERM II




11/08 – 11/10

GUIs

  1. Swing, AWT
  2. JFrame, Components
  3. 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

  1. More GUI. Events
  2. Clicks and Text Input Events
  3. Inner classes for Listeners




11/22 – 11/24

More on GUI.

  1. Using the Java API documentation
  2. Listening to multiple events in a Window
  3. Extending Swing classes




11/29 – 12/01

More GUI and Using External Libraries

  1. Finalize GUI
  2. File Chooser and more complex GUI components
  3. 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




The fine print

This syllabus is a living document. It is subject to change. If you want to look at the syllabus always download the latest copy from the website.

Every Class

Come prepared, google the topics, read the book and, of course, do the homework on your own.

Grading

All assignments are worth the same. Midterms and Final are worth 65% of your grade. Assignments are worth 35%

Late Work Policy

Each day that your work is late the maximum possible grade decreases by one letter point.

Academic Integrity

Students are required to abide by Northeastern Illinois University’s academic integrity policy. Failure to adhere to this policy will likely result in a failing grade in the class and / or expulsion from the University.