CE112 - PROCEDURAL AND OBJECT-ORIENTED PROGRAMMING

Introduction

This course covers an introduction to procedural programming in C in the first term, and to object-oriented programming with Java in the second term.  This page is unrestricted and is the homepage for the second part of the course.  For the first part see here.

During the course we'll learn to write fairly small but interesting Java programs where the code is organised into several classes, and makes good use of the Java platform API, such as Conway's game of life (shown below).

The lecture notes and lab scripts for this course will be made available during the course.  See links below.

Lectures

Introduction to Java

Java Types

Inheritance

Flow of Control and Memory Management

Event Handling

Collections - Part 1

Collections - Part 2

Generics (and shuffling)

Revision Slides and Solutions to Revision Programming Exercises

Labs

Lab1 and Introduction to Intellij

Java Types Lab

Inheritance

Input/Output Streams

Lab Exercises (do these while waiting for assignment 3 to be marked)

Event Handling

Collections

Demos

This section contains some demonstration code.  You should study this to practice your ability to read and understand Java code.

Clock Component

ClockComponent.java.  This example uses trig functions to draw the second-hand of a clock.  The calculations are similar to those needed to draw regular polygons (for assignment 3)

Mean Comparator

Example of writing a Comparator.  Sorts a set of numbers in order of closest to the average first:

Assignments

Java and Intellij

To run Java and Intellij on your own machine, you need to download a recent version of the Java SDK (Software Development Kit) and Intellij.  For Intellij you'll need the licence file, which is linked to below.  This licence is restricted to staff and students at the University of Essex).  Note that we're using Intellij 7 in the labs, so you may prefer to install this version rather than version 8.

Reading List

There are many Java texts, here are some suggestions.  Earlier versions of these books may be okay for this course, but check that they at least cover Java 5 (aka 1.5).  This involved a major change to the language to support generics.

Big Java, Third Edition, Cay Horstmann

Introduction to Java Programming, Sixth or Seventh Edition, Y. Daniel Liang.

Java in a Nutshell, Fifth Edition, David Flanagan, 2005, O'Reilly.

Past Papers

CE112 has a three hour exam consisting of 10 questions each worth 10% of the paper.  Candidates should answer all questions.  5 are from the C part of the course, 5 are from the Java part of the course.

The Java part of CE112 covers similar material to the old CC152.  Past papers for that course can be found here.  We shall work through solutions to some of those questions in the revision lectures.

People

Lecturer: Simon M. Lucas

Teaching Fellow: Roxana Turner

GTA: David Robles, Bashar Awwad Shiekh Hasan

 

 

end of page