From PLSwiki

Revision as of 12:15, 15 January 2008 by Birkedal (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search


Object-oriented Programming, Introduction (OPI), Spring 2008

This is the course page for Object-Oriented Programming, Introduction.

Practical and administrative matters

  • Newsgroup: see below.
  • NOTE: first week (Mon 28 Jan + Wed 30 Jan) lectures are 16:00 - 18:00 and three are no labs. Mon 28 Jan and Wed 30 Jan we are in Aud. 4.
  • Lectures: Monday 13:30-15:30 (Aud 4), Wednesday 13:30-15:30 (Aud. 4).
  • Exercise labs: Monday 16-18(Rooms 4A56 + 4A58), Wednesday 16:00-18:30 (Rooms 4A56 + 4A58).
  • The course period is 16 weeks half time (15 ects). The course will consist of approximately 12 weeks of lectures and four weeks project work.
  • 12 out of 15 mandatory exercises must be handed and passed satisfactorily to attend the exam. The project work counts for 4 mandatory exercises (so you must hand in the project work to attend the exam). You are allowed to work in groups to solve the excercises, but each individual student must write his/her solution up individually and hand it in by him/herself.
  • Students are expected to attend the lectures and make use of the labs.
  • Exam: 4 hours written exam, paper and pencil, date 2008-06-02.
  • Last years exam can be found [here]

Topics and tentative plan

  • Below is a tentative plan.

Week Date Teacher Topic Materials Labs
35 Mon 27 Aug LB Intro + Blue J ch. 1

[slides] [HelloPrinter.java]

No labs
35 Wed 29 Jan LB Using Objects ch. 2 (- 2.8, 2.11, 2.12, 2.13)

[slides] [examples]

No labs
36 Mon 03 Sep LB Impl. Classes ch. 3 (- 3.6, 3.9)

[slides] [examples]

Exercises: P1.1, P1.5, P1.6, R2.3, R2.5, P2.3, P2.4, P2.10
36 Wed 05 Sep JS Data Types ch. 4

[slides], [examples]

Exercises: R3.5, R3.6, R3.8, P3.1, P3.2, P3.3, P3.4, P3.6, P3.11
37 Mon 10 Sep LB Decisions ch. 5 (- 5.5)

[slides], [examples]

Exercises: R4.4, R4.6, R4.8, P4.1, P4.4, P4.6, P4.11, P4.14, R4.9, R4.11, R4.16, R4.13,
37 Wed 12 Sep LB Iteration ch. 6 (- 6.6, 6.7)

[slides], [examples]

Exercises: P5.2, P5.3, P5.8, P5.9, R5.1, R5.6, R5.8, R5.13,
38 Mon 17 Sep LB Array and Array Lists ch. 7 (- 7.8)

[slides], [examples]

Exercises: R6.2, R6.3, R6.5, P6.2, P6.4, P6.5, P6.7, P6.8
38 Wed 19 Sep LB reserved N/A Exercises: catch up with earlier exercises
39 Mon 24 Sep LB Recursion ch. 13

[slides], [examples]

Exercises: R7.1, R7.2, R7.3, R7.4, R7.11, R7.17, P7.1, P7.2, P7.3, P7.4, P7.5, P7.6
39 Wed 26 Sep JS Sorting ch. 14: 14.1 - 14.5


Exercises: R13.2, R13.4, R13.8, P13.1, P13.4, P13.6, P13.7, P13.13
40 Mon 01 Oct LB Searching ch. 14: 14.6 - 14:8

[slides] [examples]

Exercises: P14.1, P14.3, P14.4, P14.12, P14.13, P14.14
40 Wed 03 Oct LB Data Structures Intro ch. 15

[slides] [examples]

Exercises: continue with the earlier ones
41 Mon 08 Oct LB Generics ch. 17 (- advanced topic 17.1)

[slides] [examples]

Exercises: R15.1, R15.2, R15.3, R15.4, R15.5, R15.8, P15.2, P15.4, P15.5, P15.11, P15.14
41 Wed 10 Oct LB Review


Exercises: continue with the earlier ones
43 Mon 22 Oct CS Designing Classes ch. 8 (- 8.10)

[slides] [examples]

Exercises: R17.1, R17.2, R17.3, P17.1, P17.2, P17.3, P17.7, P17.8
43 Wed 24 Oct CS Interfaces ch. 9 (- 9.5)

[slides] [examples]

Exercises: R8.1, R8.4, R8.19, P8.1, P8.2, P8.3, P8.5, P8.8, P8.11
44 Mon 29 Oct CS Inner Classes ch. 9 (9.6)


Exercises: R9.3, P9.5, P9.6, P9.7
44 Wed 31 Oct AP Inheritance ch. 10 (- 10.9, 10.10, 10.11)

[slides] [examples] [super.super]

Exercises: R9.13, R9.18, P9.13, P9.16
45 Mon 05 Nov CS Exceptions ch. 11

[slides] [examples]

Exercises: R10.3, R10.4, R10.8, P10.4, P10.5
45 Wed 07 Nov AP Graphics 2.11, 2.12, 2.13, 3.9, 9.6-9.10, 10.9-10.11

[slides] [slides(6-per-page)] [Example removing an Inner Class]

Exercises: R11.8, R11.15, R11.19, P11.4, P11.7, P11.11
46 Mon 12 Nov CS Object-Oriented Design ch. 12

[slides] [examples]

Exercises: R2.11, P2.13, P3.18, R9.22*(optional), P9.21, R10.18, P10.16, P10.17
46 Wed 14 Nov AP Graphics ch. 18

[slides] [examples]

Exercises: catch up
47 Mon 19 Nov CS Threads ch. 20

[slides] [examples]

Exercises: R18.3, R18.14, P18.1, P18.3, P18.7, P18.9
47 Wed 21 Nov CS Reflection

[tutorial] [slides] [examples]

Exercises: R20.2, R 20.8, P20.1, P20.4, P20.7
48 Mon 26 Nov CS Project Intro see below Project
49 Mon 03 Dec JS Game Trees see below Project

In weeks 49-51, students work on the project (more info to come).


The project is about implementing a Connect 4 program. In the [project description] you find three homework problems, that you are expected to hand in. See schedule below. The player interface is available from [here] (or [Player.java] )For simplicity, this version of the referee does not take time. The code for the [NIM game] that we discussed in class is also available.

Important: We have changed the time limit pro move to 18 seconds...

Here's the version of the referee that we will be using. [ref.java].

--- Groups ---

  1. BoGThomsenPlayer, XiangGe (Bo)
  2. MaiSun, PeterRaahauge (MaiSun)
  3. NaderSalas,EsbenBirkebaekLarsen (Espen)
  4. Marguerite, ChristianFoli (Christian)
  5. SemBlaksmark, LawrenceJohnson (Lawrence)
  6. Dajana, JanusBrunkOlsen (Janus)
  7. MagnusKoch, KimOlsen (Magnus)
  8. Garry, Jesper (Gary)

--- Quarter Final ---

  1. Bo, MaiSun (MaiSun)
  2. Espen, Christian (Christian)
  3. Lawrence, Janus (Janus)
  4. Magnus, Garry (Garry)

--- Semi Final ---

  1. MaiSun, Christian (MaiSun)
  2. Janus, Garry (Garry)

--- Final ---

  1. MaiSun, Garry (tie)

Congratulations MaiSun and Garry. If you are interested, the code of all of the participants is now [online].


There is a newsgroup for this course, where students can post and answer questions to each other. The teaching assistent will also read and answer questions once or twice every week. You can subscribe via your email program (for example Mozilla Mail), there is a folder called news.itu.dk, and the newsgroup is called it-c.courses.SOPI.

Literature and materials

  • Cay Horstmann: Big Java, 3rd Ed., Wiley

Exercise Labs

At the exercise labs you should work on solving problems from the course material and ask questions to the teaching assistant.

Mandatory Assignments

Mandatory assignments are posted on this home page in week n. You should work on the assignments in week n+1 and hand in the assignment by 13:30 in the pidgeon hole outside wing 1C on Monday in week n+2. Assignments are handed in on paper. You don't have to typeset your answers, but you should have tested all the code you submit. The hand-in should contain: a title page with the name of the course, and your name and a “report” with comments to your solution and program code. All pages including the title page should be stabled together. The assignment will be evaluated as either pass or fail. If it fails, you can revise it and hand it in again within one week.

  • 1. Hand-in on Monday Sep. 10 at 13:30: P2.3
  • 2. Hand-in on Monday Sep. 17 at 13:30: P3.6, P4.11
  • 3. Hand-in on Monday Sep. 24 at 13:30: P5.9, P6.4
  • 4. Hand-in on Monday Oct. 01 at 13:30: R7.3, P7.3
  • 5. Hand-in on Monday Oct. 08 at 13:30: P13.4, P14.13
  • 6. Hand-in on Monday Oct. 22 at 13:30: R15.5, P15.2
  • 7. Hand-in on Monday Oct. 29 at 13:30: R17.9, P17.3
  • 8. Hand-in on Monday Nov. 5 at 13:30: R8.19, P8.8
  • 9. Hand-in on Monday Nov. 12 at 13:30: R9.13, P9.16
  • 10. Hand-in on Monday Nov. 19 at 13:30: R10.4, P10.4
  • 11. Hand-in on Monday Nov. 26 at 13:30: R11.15, P18.9
  • 12. Hand-in on Monday Dec. 03 at 13:30: R20.8, P20.1
  • 13. Hand-in on Monday Dec. 10 at 13:30: Part 1 of Connect 4
  • 14. Hand-in on Monday Dec. 17 at 13:30: Part 2 of Connect 4


Teaching Assistant

  • Lilian Juma (lilian.juma@yahoo.com)

Personal tools