CECS-174: Programming & Problem Solving I

This site contains information about the activities carried out in the first CECS course on programming and problem solving, CECS-174, during Fall-2008. Here you'll find the most recent activities in each of the different categories and you'll also find announcements. Be sure you have the class syllabus (Mon/Wed section syllabus in PDF and Tue/Thu section syllabus also in PDF) to get more administrative details about the class for Fall-2008.

Resources

  1. CECS 174 Getting Started Guide. The guide provides information about how to configure your CECS account in the CECS Windows Lab computers. Information is now available on how to configure a personal computer.
  2. In the DrJava website, you can download DrJava to install on your own computer. The most recent stable release is from September 4th 2008.
  3. To work from home, you'll also need to download the bookClasses directory (ZIP archive) that has the code from the textbook and also the download the mediasources directory (ZIP archive) that has the multimedia files (images, sounds, etc) used by the authors. Expand each of these ZIP archives in the directory where you will do your work for CECS 174.
  4. Code Examples: Updated November 17 2008. I added student solutions to Javabat problems.
  5. A collection of photos:
  6. Java Errors Explained!: This document provides good quality explanations to Java errors. It is written by Mordechai (Moti) Ben-Ari and it has a licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 2.5 License.
  7. (NEW) Collaborative Web Space (CoWeb) for CECS-174 is ready! Use this web space to post to picture galleries and to ask questions about assignments.
  8. Using Eclipse. This web page describes how to use Eclipse in the CECS labs
  9. Instructions on how to submit assignments via e-mail.

Readings and Lectures

Following is a brief description of the concepts introduced during each of the fifteen weeks of the course. These will be updated each week.

  1. Introduction to CS, programming, problem solving, program, algorithm, binary number system, Java. Chapter 1 and 2. Check out this YouTube video titled Binary Numbers in 60 seconds. You can also look over lecture notes on chapter 1 (an 8-page PDF document with 45 slides) provided by one of the authors of the book. How bits and bytes work from HowStuffWorks.com.
  2. Introduction to programming: Binary Numbers, encodings: ASCII and 2's complement, math operators, relational operators, type casting, primitive types, String object, variables and memory. Read Chapter 2 and Barbara Ericson's lecture notes on chapter 2 (a 7-page PDF document with 39 slides). Here is a useful page describing what happens in an expression that has mixed data types.
  3. Creating objects and invoking methods on objects, working with Turtle objects. Read Chapter 3 and Barbara Ericson's lecture notes on chapter 3: Programming with Turtles (55 slides, 3 per page). Here are the slides 6 to a page.
  4. Complete Chapter 3 on programming with turtles, creating new Turtle behavior by defining new methods, working with media objects. You can download the HatchTurtle.java file for an example of a Java program with a main method that uses a Turtle object to draw on a Picture object. There is also a second version of HatchTurtle.java that improves the program by using variables and calling on drawSquare methods. To run this, you will need to create drawSquare methods in Turtle.java that match the methods being called from main(). Start Chapter 4: The Picture class, simple modification of Picture elements.
  5. Chapter 4 on Modifying Pictures. Manipulating Pictures using arrays and loops. Modifying a picture by changing RGB values of pixels, Java arrays and loops. Lecture notes on Variables and a set of notes Introducing Media Computation with Pictures. Java loops: for-each and while. Sections 4.1, 4.2, 4.3. Java loops: for loop. Lecture notes on manipulating Picture objects using arrays and loops.
  6. Complete Chapter 4 (See lecture notes on while loops, Java's for-each loop, negate and grascale methods) and start on Chapter 5 -- Using a matrix (2D arrays) to manipulate the pixels of a Picture, nested loops, mirroring pictures. Complete set of lecture notes on chapter 4(PDF).
  7. Continue chapter 5 on 2D arrays and nested loops: mirroring part of a picture, copying and transforming pictures. Complete set of lecture notes on chapter 5(PDF).
  8. Complete Chapter 5. Methods to rotate and scale pictures, creating picture collages. Boolean expressions with two or more conditions: the boolean connectors.
  9. Complete Chapter 5, review. Midterm.
  10. Continue Chapter 6 on conditional statements. lecture notes on Conditional Statements (Chapter 6)(PDF), includes truth table for three conditional operators, and also DeMorgan's Law of boolean expressions (not in the book).
  11. Complete Chapter 6 on conditional statements. Start Chapter 7. lecture notes on drawing with the java.awt package
  12. Complete Chapter 7. Start on Chapter 11. Lecture notes from Ch. 11 on creating Classes, constructors, inheritance, etc.. Also, check out the section on Classes and Objects in The Java Tutorial
  13. [Week of Nov 24]: Continue Chapter 11: Creating our own Java classes, constructors, inheritance. Introduction to the Eclipse IDE.
  14. Chapter 15: Speed, compilers vs. interpreters, algorithms
  15. Speed: insertion sort and search. Review topics for final exam.

Activities

Date Activity Notes
Week of 11/24 Lab Activity #10: Creating Java classes using the Eclipse IDE CECS Students are required to use Eclipse. It's optional for those students whose major is not CECS.
Week of 11/17 Lab Activity #9: Mon/Wed: Problems 7.9 and 7.21 (star shape) Due on Monday Nov 24. Tue/Thu: Problems 7.10 and 7.21 (pentagram shape) Tuesday Nov 25 in lab.
Quiz #4: conditional statements and nested loops.
For Lab Activity, work in pairs. Write Picture methods for each. You will demonstrate your work in lab.
List of all assignments

Programming Resources