Informatics 1: Object Oriented Programming

Welcome to the home page of Inf1OP. Here you will find all the information you need about the course.


Lecturer: Professor Perdita Stevens
TAs: Donal Stewart ( general, especially labs), Peter Stefanov (advanced programming exam)

News and change log

Course Description

Official course descriptor.

Summary: This course presents a conceptual and practical introduction to imperative and object oriented programming, exemplified by Java. As well as providing a grounding in the use of Java, the course will cover general principles of programming in an imperative object oriented paradigm. The course should enable you to develop programs that support experimentation, simulation and exploration in other parts of the Informatics curriculum (e.g. the capacity to implement, test and observe a particular algorithm).

Philosophy: Students on this course have a very wide range of backgrounds: some are already expert programmers, others near-beginners. Moreover students going on to an Informatics degree will all need far more Java expertise than a 10pt course can provide, and more expertise will make your lives easier! Therefore this course is designed to be very flexible, giving you the opportunity and responsibility to make optimal use of your time.

Introductory video (made a few years ago — in particular it talks about the labs being in Appleton Tower, whereas right now they're at Forrest Hill — but still a useful introduction to the course).


Each week you should normally:

Lab exercises for all weeks.

Week Topic and material
1 Introduction. Slides, handout and extra note.
Videos (some made for previous presentations so some "new this year" comments are out of date):
2 Conditionals and Loops. Slides, handout.
As soon as you can: do the junit task
For this course, you need to be able to run JUnit tests and interpret the results. Being able to write them is also really useful! This video is a very gentle introduction that covers that too.
3 Arrays. Slides, handout.
4 Functions aka Static Methods. Slides, handout.
5 Classes and Objects. Slides, handout.
Heap vs stack: blog post with video tutorial.
6 Creating Classes (includes digression on string formatting). Slides, handout.
Video on one of this week's lab exercises
7 Collections. Slides, handout.
8 Inheritance. Slides, handout.
Short supplementary video lecture on interfaces: Slides, handout.
9 Review. Slides, handout.
10 Revision week. No scheduled labs. Final tutorials.
11 Mock exam.
Video "mock for the mock" (made a couple of years ago).


Tutorials will start in Week 2. You must attend every week.

Scheduled labs

Allocation to lab groups.

Clicking the link above, you will see that you have been allocated to a two-hour scheduled lab. Scheduled labs take place in the Drill Hall, Forrest Hill. If you want to move to a different group, please ask the ITO. In Week 1 you must attend the lab session you're timetabled for, and see the demonstrator to have your attendance confirmed.

Provided you are making good progress, you may choose to work elsewhere, e.g. at home, rather than attending your scheduled lab. However, in the scheduled labs, help from demonstrators is available. If your progress gives cause for concern, you will be asked to sign in with the demonstrator in your scheduled lab, who can help you catch up. See under tutorials concerning the status of lab exercises: in brief, very strong students who already know the examinable material of this course may wish to omit them; everyone else should do them.

You are welcome to attend any lab where there is space, e.g. if you need extra time or can't make one particular session. However, if there were ever more people than seats, those not allocated to the lab would be asked to leave.

The Fundamental labs cover the core course material. Some (less developed) Advanced labs are also provided, as a suggested ingredient for Individual Learning Plans of stronger students - see below on tutorials.

You will need to keep track of your progress through the labs. To do this you might like to try using this Android app developed by Richard Schmoetten, a 2014-15 Inf1OP student! (No warranty, but a demonstration of what some students achieve in this course...) If you'd like to improve it, source code is also available.

Progress reporting

So that we can check that you are staying engaged with the course, and offer help if needed, you must, please, fill in the progress form every Friday/Saturday from week 2 to week 10 inclusive. If you have been unable to attend a tutorial, say so on there; there is no need to mail separately.


The course is assessed by an open-book Programming Exam. See the first and last lectures for more information on this. Be aware in particular that a file you submit will only get marks if it compiles without error and passes the basic JUnit tests provided.

Note This year, the exam will be 2 hours long, not 3 hours as previously. In anticipation of this change, the exams in 2014/15 were designed to fit in 2 hours, even though 3 were allowed, so they are a good guide. We do not aim to put you under time pressure: typically, a perfect solution can involve under 100 lines of code.

Note that, although the pass mark is 40% as usual, those getting a low pass in Inf1OP probably don't have enough object oriented programming skill to be comfortable with rest of an Informatics degree. Anyone planning to go on in Informatics should aim for 80% or more in the exam, and it will save you effort later if you go beyond the examinable material of Inf1OP.

There will be a mock exam, done on the same machines and under the same conditions as the real exam, in week 11. This is not for credit, but you are very strongly advised to attend.

Past papers are available on the university's site, and from the Informatics site (both sites are worth knowing about: in some cases the University site only has a paper from one sitting of an exam, while the Informatics site has both); files needed to do them, such as the provided JUnit tests, are here. For a few recent papers, a new experimental automarking service is available.

Put file:///group/examreadonly/index-java.html into your browser on a DICE machine to see the information you'll have access to from your browser in the exam; you may also take in any books, papers etc. you like, but nothing electronic.

For a few students who do exceptionally well on the mock exam, there will be an invitation-only, optional, unofficial, not-for-university-credit Advanced Programming Exam, provisionally in Revision Week just before the main diet exams. See Week 1 lecture. Last year's paper and notes.



You are strongly advised to join the Piazza forum for this course, where you can ask questions on anything you don't understand, and discuss anything related to object-oriented programming.


The recommended book for the course is The Java Tutorial: A Short Course on the Basics, Addison-Wesley. It's not all that short: it contains far more than is needed for this course, and would be a good resource for the rest of an Informatics degree, too. If you expect to go beyond the basic syllabus of this course, this book is strongly recommended. It is available in the library both on paper and electronically.

Book choice is very personal, however, and you may use any book you like, or none. The library has many, both on paper and electronically.


Some people find example code very helpful when learning a programming language; others don't. Remember that there are model solutions to all the lab exercises available: it's good practice to compare your solution with the model solution after you've finished. There's always more than one way to do it, though. If you are wondering why a model solution differs from yours and whether yours is as good, this is a suitable topic for discussion on Piazza or in tutorials.

Other good sources of example programs are and

We do not publish model solutions for past papers. The main reason for this is that many students find it impossible to avoid "peeking" at a model solution when there is one, so to do so would diminish the value of the past papers. If you want to know whether your solution is acceptable, use the automarking process.


Some of the lectures are supplemented by additional video segments, linked in the schedule above. These are part of the course material. Let me know if you have any technical difficulty watching them.

Additionally, videos of the ordinary in-person lectures should be available shortly after each one here (as are videos of some previous years' lectures). You may find these useful for revision or if you have to miss a lecture. In my experience the recordings fairly often fail to appear for technical reasons, though, so I don't recommend relying on them instead of coming to lectures.

This page is maintained by Perdita Stevens (

Home : Teaching : Courses : Inf1 

Informatics Forum, 10 Crichton Street, Edinburgh, EH8 9AB, Scotland, UK
Tel: +44 131 651 5661, Fax: +44 131 651 1426, E-mail:
Please contact our webadmin with any comments or corrections. Logging and Cookies
Unless explicitly stated otherwise, all material is copyright © The University of Edinburgh