Software and Programming II
This module is a continuation of the studies presented in Software and Programming I focussing on the use of object-oriented methods for problem solving. Object-oriented programming languages require a different approach to software design from the traditional functional decomposition approach of procedural languages. Object-oriented systems are described in terms of independent objects and their inter-relationships. Such systems can provide considerable potential for re-usability, extensibility, and robustness, assisting in the process of programming-in-the-large.
The Software and Programming I module has introduced students to the main concepts underlying object-oriented programming. The primary aim of the Software and Programming II module is to write maintainable object-oriented programs with an eye on the greater context of software development. On completion of the module, students should be able to design, document, implement, and test an object-oriented program consisting of several classes.
- Review of basic Java programming and the materials covered in Software and Programming I.
- Extended control structures: the switch statement, loops with break and continue.
- Basics of enumeration types.
- Arrays and ArrayLists. The enhanced for loop. Two-dimensional arrays.
- Inheritance and polymorphism. Overriding instance methods. The access modifier protected and the default access modifier. The type Object. Abstract classes. Interfaces and multiple inheritance. The instanceof operator and casting non-primitive types. Parametric and ad-hoc polymorphism.
- Input and Output.
- Test-Driven Development.
- Exceptions and exception handling with try and catch. Program correctness: throwing an exception. RuntimeExceptions and the throws clause. User-defined exception classes.
- Linked data structures: linking objects and self-referential structures. Linked-list implementation of stacks and queues and other operations on lists. Generic data structures. Binary Trees.
- Java Collections.
A pass in Software and Programming I.
Alternative qualifications, e.g., extensive industrial experience, need to be agreed with the module leader prior to taking the module.
By three hour written examination (75%) and practical coursework (25%).
- Primary course text: Horstmann, C. (2013), Java for Everyone. Wiley. ISBN 978-1-118-06331-6. eBook
- Further reading on selected topics will be made available during the course.