CS 101 Algorithms and Programming I

    2008-2009 SPRINGSEMESTER

Announcements

  1. No lab work in the first week.
  2. You have to attend the labs every week.
  3. You will have in class quizzes.
  4. You must enroll to the moodle course CS 101 (Sections 1-7) to see the lab assignments, and upload your solutions. Your lab grades will be posted in Moodle also. See http://goto.bilkent.edu.tr/bits/Moodle2008StepByStep/students/index.html for details.
  5. The midterm is on April 4th, 2009 Saturday between 10:00 and 12:30.
  6. The exam is on May 23rd, 2009 Saturday between 15:30 and 18:00 in classes

    EB- 101, 102, 103, 104, 201, 202, 203, 204; EE- 03, 04, 05

Click here to send me e-mail.

Textbook

Absolute Java, Third Edition, Walter Savitch, 2008, Pearson Education Inc.

Grading criteria:

 

WEEKLY SCHEDULE

  Mon. Tue Wed Thu Fri
08:40   CS 101-002 BZ08 CS 101-001 BZ08   CS 101-005 BZ02
09:40   CS 101-002 BZ08 CS 101-001 BZ08   CS 101-005 BZ02
10:40   CS 101-005 BZ02

Office hour

CS 101-002 BZ08 CS 101-001 BZ08
11:40   CS 101-005 BZ02

Office hour

CS 101-002 BZ08 CS 101-001 BZ08
12:40          
13:40 CS 101-002 B303,       CS 101-001 FF207
CS 101-005 FF207
14:40 CS 101-002 B304,       CS 101-001 FF207
CS 101-005 FF207
15:40 CS 101-002 B303,       CS 101-001 FF207
CS 101-005 FF207
16:40 CS 101-002 B304,       CS 101-001 FF207
CS 101-005 FF207

The cells highlighted in yellow color indicate lab work sessions.

Note that you can take office hour appointments for other available time either by e-mail or in class.

Lecture Notes/Examples

computer hardware and software
sample pseudocode
OOP
Arrays and ArrayLists
Sorting and Order

 

Textbook's Slides
(Click
here to get all in zipped form with examples)
Chp.01
Chp.02
Chp.03
Chp.04
Chp.05
Chp.06
Chp.07

 

My lecture notes and samples on various subjects

Introduction to Java

char data type and the String Object

methods using char and String

Using Packages and formatting output lecture notes

 

If-statement

Zipped If Samples 

Nested if statements and the switch statement

 

loops

Loop Samples (zipped)

while, do-while, and for loops for the same example (printAsciiTable) in zipped form

 

methods

a method sample (static and non-static)

zipped method samples

methods using char and String

zipped file for char/String methods

 

Writing your own classes

StringTokenizer class

 

Arrays

ArrayList

A sample application for enumerated type (also examine the equals and compareTo methods): Card.java and usesCard1.java

A sample application for ragged arrays : Pascal's triangle, RaggedArrays.java
A sample application for using variable number of arguments of the same type, testvarargs.java
A sample application for using arrays of a class, Point1 as a parameter in a static method in the MyMethodsArray class, and using these classes to find the nearest point among three points to the point (100,100) in the tester class, TestMyPointsArray