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
- Objects and classes - Creating and manipulating objects. access modifiers: data hiding. Constructor methods and object creation. Static fields and methods.
- Passing objects and call-by-reference. Scope and the reference this. The qualifier final and class constants.
- Arrays, The Enhanced for Loop, Common Array Algorithms, Using Arrays with Methods, Two-Dimensional Arrays, and Array Lists
- Inheritance, polymorphism, and abstract classes - Overriding instance methods. The access modifier protected. The type Object. Inheritance and design. 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 - Exception handling with try and catch. Program correctness: throwing an exception. RuntimeExceptions and the throws clause. User defined exception classes.
- Object-Oriented Design - Discovering Classes, Relationships Between Classes, Cohesion and Coupling, Side Effects, Abstract Classes, Packages
- Linked data structures and recursion - Linking objects. Self-referential structures. Stacks and queues. Linked list implementation of stacks and queues. Other operations on lists. Generic data structures. Binary Trees.
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.
All dates and timetables are listed in the programme handbooks of individual programmes.
By three hour written examination (75%) and practical coursework (25%).
Java for Everyone: Compatible with Java 5, 6, and 7, 2nd Edition by Cay Horstmann 2012 published by John Wiley is the primary course text. Further reading on selected topics will be made available during the course.