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: Dr. Timothy Hospedales
TA: Natalia Zon (

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. The main way to learn programming is by doing it. For this reason there is only one lecture per week, so you can spend more time practicing.

An old Introductory video still provides a useful introduction to the course.


Each week you should normally:

Week Topic and material
1 Introduction. Slides, handout.
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.
- Innovative Learning week
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.
Notes on the 2015/16 main diet exam.
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

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.

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 tutorials).

You will need to keep track of your progress through the labs. To do this use the lab record. You might also 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. So make sure you can do the JUnit task.

The exam will be 2 hours long, not 3 hours as in some previous years. Past exams 2015/16 and 2014/15 were designed to fit in 2 hours, 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.

In the exam you will be provided not only with the exam paper and any files required, but also with a sheet of Instructions in electronic form. Here is an example of the instruction sheet, which gives you a few more details about how the exam is run. The one you get will be slightly different, but you would be told about any major changes.



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, its good practice to write JUnit tests to validate the question criteria. You can also use the automarking process.


We aim to post the lecture videos online to assist review. You should be able to see them under INF1OP entry on LEARN.

This page is maintained by Timothy Hospedales (

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