What you will study
In the Object-oriented view of software, programs are considered to be collections of objects that interact by sending messages to one another and reacting to the answers to those messages. These ideas are at the forefront of modern software development.
The module takes an ‘objects first’ approach to teaching; you start seeing and interacting with graphical objects right from the very start. This is achieved by working within innovative and engaging micro worlds that allow you to learn basic object-oriented principles, before you attempt Java syntax or source code.
Throughout the module you will use BlueJ, an integrated development environment (IDE) specifically developed for teaching and learning object-oriented programming. BlueJ is used worldwide and is easy to use. It places special emphasis on visualisation and interaction techniques to provide a highly interactive environment that encourages experimentation and exploration.
In the first part of the module you will interact with micro-worlds of graphical objects to explore basic object-oriented ideas. You will soon start using Java code and syntax to write your own simple object-oriented code using the BlueJ IDE. Basic object-oriented concepts such as attribute, state, protocol, class and subclass are introduced, initially through interaction with the micro world, and then in the context of writing Java code. You will be expected to write short methods (the smallest units of code in Java) to specification.
The module continues the teaching about fundamental object-oriented ideas by investigating:
- inheritance hierarchies
- overriding methods
- abstract classes
- re-use of code
- static methods and variables.
Along the way, you’ll learn about creating your own classes, about the facilities of Java for selection and iteration, and more about some of the core, provided Java classes. Different kinds of errors are discussed together with techniques for error handling, program design and debugging. After discussion of the need to design code, you will be expected to be able to implement to specification a class along with its methods.
You will then be introduced to a subset of the Java collection classes, and related issues such as ordering and sorting. You are guided to apply the knowledge you gained from the first parts of the module, along with the new classes being introduced, to increasingly complex programming exercises. The skill of appropriately utilising a provided library of classes (searching for a useful class and method, for example) is explicitly developed in this context, and re-use by composition is discussed.
The last part of the module begins by investigating how data is written to and from files in Java and how objects can be made persistent by writing them to file. Both of these techniques are useful in larger scale programs.
If you are considering progressing to Algorithms, data structures and computability (M269), normally you should have completed or be studying this module. M250 also provides the level of knowledge of Java required for Software development with Java (M256).
This module provides you with a basis for further study of Java programming and introduces you to many (but not all) concepts that are tested by Java Certified Programmer and Java Certified Associate exams.