Object-oriented Java programming
This module teaches the fundamental ideas behind the object-oriented approach to programming through the widely-used Java programming language. Concentrating on aspects of Java that best demonstrate object-oriented principles and good practice, you’ll gain a solid basis for further study of the Java language and object-oriented software development. Some experience in writing computer programmes is essential - see the Am I ready? section.
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.
You need to be familiar with basic programming concepts – check if you’re ready for M250, with our self-assessed quiz.
You’d normally be prepared by completing OU level 1 study as part of one of our computing and IT qualifications. For this module, we recommend that you’ve passed Introduction to computing and technology 1 (TM111) and Introduction to computing and information technology 2 (TM112); or their predecessor TU100.
If you’re not sure you’re ready, talk to an adviser.
The module uses printed units and supplements together with some supplements that are available in PDF format only. There is a module website including electronic copies of printed materials, other documents, software, programming activities, student forums and a study planner.
A computing device with a browser and broadband internet access is required for this module. Any modern browser will be suitable for most computer activities. Functionality may be limited on mobile devices.
Any additional software will be provided, or is generally freely available. However, some activities may have more specific requirements. For this reason, you will need to be able to install and run additional software on a device that meets the requirements below.
A desktop or laptop computer with either:
- Windows 7 or higher
- Mac OS 10.7 or higher
- a modern Linux version
The screen of the device must have a resolution of at least 1024 pixels horizontally and 768 pixels vertically.
To participate in our online-discussion area you will need both a microphone and speakers/headphones.
Our Skills for OU study website has further information including computing skills for study, computer security, acquiring a computer and Microsoft software offers for students.