ITEC 120 - Principles of Computer Science 1 - Spring 2009


Weekly Notes Topics Reading Assignments
 Week 1
  • Tues: Lab 0 (01a): Compile, run, and modify a program with BlueJ
  • Wed: Syllabus and Survey and some notes on programs
  • Thurs: Lab 1 (01b): entering a program with BlueJ
    • Assignment statement: Remember, one of a computer's capabilities is to store and retrieve information. It uses variables and assignment statements to do this:
         int hours;                   // Declare hours as an int variable
         hours = 3;                   // Store 3 in hours (we say assign 3 to hours)
         System.out.println(hours);   // Retrieve the value of hours and print it
         int index = 1248;            // Declare index and asssign 1248 to it
         System.out.println(index);   // Retrieve the value of index and print it
                      
  • Fri: Notes from Chapter 1
Chapter 1  
Week 2
  • Mon: Review notes from last week. Kinds of errors. Type double. String methods. Java API.
  • Tues: Lab 2a (Problem 2.9) : Working with some String methods
  • Wed: More notes from Chapter 1 (on identifiers, capitalization, and comments) and some problems to solve
  • Thurs: Lab 2b (Riddle and Doughnuts): More with String methods
  • Fri: Subresults inline vs in vars; Conversions (Character, String, Integer, char, int), Quiz
See Dr. Barland's Page HW1 is here
Due Wed 1/29/09
Week 3
  • Mon: Creating objects, new, object reference, mutators and accessors (ie setters and getters), state + behavior
  • Tues:
    • For the homework: Input dialogs return strings, but we can't do arithmetic with strings, so use int Integer.parseInt(String arg);
    • For the lab: Constants: Calendar.JANUARY, ..., Calendar.MONTH, ...
    • Check off Lab 2b (Riddle and Doughnuts)
    • Today's Lab 3a: Project 2.1 (Gregorian Calendar) - Creating objects and using getters and setters
  • Wed: About yesterday's lab: Calendar objects represent days and are mutable; days are 1-7, months are 0-11 (go figure). Let's create a tester class for Rectangles.
  • Thurs: Lab 3b: More with Calendars:
  • Creating a class: Let's start by designing methods: How a client (ie user) would use the class, what methods need to be in the class, what would the signatures of the methods be? (What is a signature?)
See Dr. Barland's Page HW2 is here
Due Fri 2/6/09
Week 4
  • Mon: Continue with creating a class: create test class, write signatures, implement signatures (what vs how!)
  • Tues: Lab 4a Let's write a test class for a Bookmark class and write stubs for the methods in the Bookmark class.
  • Wed: Let's add fields and Dr. Barland's notes
  • Thur: Lab 4b Complete the implementation of the class from the previous lab, adding fields to the class and implementing the methods. If you finish, there are some extra tasks to test your understanding.
  • Fri: Class Account and a Tester: Flow of control and local variables in Tester, fields, 3 kinds of variables, implement a total number of deposits (methods: getter, reset), multiple instances, method balanceIfPenalized
See Dr. Barland's Page HW3 is Here
Due Fri 2/13/09
Week 5
  • Mon: Class Account: implement a total number of deposits (methods: getter, reset), multiple instances, method balanceIfPenalized
  • Tues: lab 5 is problem P3.10 from the text. See . In case it's not obvious, the moth only moves right or left on a straight line. In my section you are to to implement the "Further practice methods", and so you are to implement the following constructor and methods:
    • Moth(double initialPosition)
    • void moveToLight(double lightPosition)
    • double getPosition()
    • distanceToLight(...) - takes a position and returns the distance to the light
    • ... distanceToLight()
    • ... moveAgain()
  • Wed: Hints on the homework: your roach population should always be a whole number, never a fraction. Remember the difference between division of ints and doubles. You might want to use Math.Round and you might want to use a long instead of an int.
  • Thur: Nothing new today. You can finish Lab 5, work on the homework, submit old labs, ask questions.
  • Fri: Go over HW4. Exam review. Here is some information on the exam. Other items to know include basic operation of a computer; assignment statements; passing info to/from a method; mutators; diagrams of declarations, constructor calls, assignments; three kinds of variables and their scopes
See Dr. Barland's Page Exam 1: Mon, 2/23/09.
HW4 is here
Due Fri 2/20/09
Week 6 See Dr. Barland's Page  
Week 7
  • Mon: Enjoy the snow!
  • Tues: More if statements: Lab 7a - eBay
  • Wed: We are going to start using the dropboxes for labs and homeworks - more details available tomorrow. Some notes on if. Remember: use {}, indent correctly, only use fields for state. More on ifs. Comparing Strings.
  • Thur: Today you will finish lab 7. If you have time you can work on the homework.
    Important notice on the labs and homework:
    • For practice today you are to copy your lab6 (Donuts) .java files in Dropbox folder RU01 (Info on using the Dropbox) by 10:30 a.m. Please put your name in your file (in a comment, of course).
    • In addition to being checked off, lab 7 is to be submitted in Dropbox folder RU02 by Friday 3:00 p.m.

    • For Homework 5, the memory diagram is to be handed in at the beginning of class on Wednesday and the following five .java files are to be submitted in Dropbox Folder RU03 by Wednesday at 10:00 a.m.:
      • Employee.java
      • EmployeeTester.java
      • Card.java
      • CardPrinter.java
      • TresAmigos.java
  • Fri: Go over exam. Do the example in these notes which includes class Scanner and more if statements (let's check for an overdraft, too). Here is our solution (and prettified). The solution uses the code for Account.java. (We don't need it for this assignment, but for completeness, I'll include AccountTester.java as well.)
See Dr. Barland's Page   Homework 5 is here
Due Wednesday 3/18/09 (after break, but don't put it off!!)
Week 8
  • Enjoy the break!:
   
Week 9 See Dr. Barland's Page   Homework 5 is here
Due Wednesday 3/18/09
Week 10
  • Mon: Let's trace some helper methods.
  • Tues: Let's add some helpers to the ebay lab. Be prepared for a lab quiz on Thursday.
  • Wed: Homework comments, more on helpers
  • Thur: Lab quiz planned for today. Copy only the file Student.java to folder RU04 on the dropbox. (Remember, select: Start, Run. Then enter \\neelix then select Dropbox, ITEC, ITEC120, nokie, Submissions, ITEC120-03-Spring.)
  • Fri: Today we will start loops. A homework will be up soon.
See Dr. Barland's Page  
Week 11 See Dr. Barland's Page
Exam next week!
Week 12 See Dr. Barland's Page Homework 7
Due Wednesday 4/8/09 in class. Exam Friday of this week!
Week 13 See Dr. Barland's Page Homework 8
Due Wednesday 4/22/09, delivery method Dropbox.
Week 14 See Dr. Barland's Page Homework 8
Due Wednesday 4/22/09.
Week 15 See Dr. Barland's Page Homework 9 is due at 5:00 p.m. (bring to class or slide under office door)


--
Dr. Okie's Home Page
Last modified on