Skip to main content

Software and Programming II

Overview

Module description

This module is a continuation of Software and Programming I, focusing 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 interrelationships. Such systems can provide considerable potential for reusability, extensibility, and robustness, assisting in the process of programming-in-the-large.

Indicative syllabus

  • 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
  • Basics of Java Collections
  • Foundations of object-oriented analysis and design in Java: discovering classes, relationships between classes

Learning objectives

By the end of this module, you will be able to:

  • understand object-oriented programming concepts and their role in program design and implementation, viz. encapsulation, polymorphism, inheritance and message passing
  • use Java Collections
  • write object-oriented programs using an object-oriented programming language
  • demonstrate exception handling for debugging and to promote program robustness
  • use appropriate basic data structures such as arrays, linked lists
  • understand software testing and write simple unit tests
  • decompose a problem into appropriate objects and activities and understand how to embody these concepts in the construction of a program incorporating appropriate classes, data members and methods
  • manage time so as to design and implement a piece of software to a prescribed deadline.