[The University of Leicester]

Department of Mathematics & Computer Science



Next: MC206 Software Engineering and System Development Up: Year 2 Previous: MC204 Design and Analysis of Algorithms

MC205 Object-Oriented Programming Using C++


MC205 Object-Oriented Programming Using C++

Credits: 10 Convenor: Dr. G. Laycock Semester: 2

Prerequisites: essential: MC103, MC104, MC111, MC206
Assessment: Continuous assessment: 50% Two hour exam in May/June: 50%
Lectures: 18 Problem Classes: 6
Tutorials: none Private Study: 21
Labs: 24 Seminars: none
Project: none Other: none
Surgeries: 6 Total: 75

Explanation of Pre-requisites

It is essential that students should have a thorough grasp of imperative programming before attempting this module. It is assumed that all students have a good working knowledge of Java, up to and including the use of inheritance, interfaces and exceptions.

It is assumed that students taking this module have an understanding of the object-oriented design philosophy, and are familiar with the fundamental concepts of the object-oriented paradigm.

Students should also be familiar with the basics of ``formal methods''. In particular students should be familiar with the concept of representing data structures in terms of the fundamental abstract data types (set, sequence and map).

Course Description

Through the 1990's C++ has become one of the world's most popular programming languages, due to its potential for producing efficient and compact code taking direct advantage of the powerful object-oriented philosophy. As such today's computer scientists and software engineers should be familiar with the use of its central features. This module is intended to give the student a basic grasp of its use for object-oriented programming.

The vast majority of programming projects involve the organised storage of a large number of pieces of information. This module covers a wide range of well known abstract data types that can be used as containers for volumes of data. Each structure will be covered abstractly, by examining the formal VDM notation, and concretely, by studying the implementation in C++ and the Standard Template Library.

Aims

To present C++ as an alternative object-oriented programming language to Java.

To build on the students' knowledge of object-oriented design, data abstraction and algorithms by introducing the language support in C++ for these ideas.

To present the common abstract data structures as containers for data, both as abstractions using the formal notation of VDM, and as concrete implementations in C++ and the Standard Template Library.

Objectives

By the end of this module, students should be able to:
  1. convert Java programs (to the level encountered in first year programming modules) to equivalent C++ code;
  2. understand the object-oriented features of C++ and how they relate to concepts from object-oriented design;
  3. use the object-oriented features of C++ to efficiently implement abstract data-structures with clean and simple interfaces;
  4. use the facilities provided by C++ to divide source code logically between multiple files, and to take advantage of this with partial compilation;
  5. use the object-oriented features of C++ to implement object-oriented designs of reasonable size and complexity (such as those encountered in the second year software engineering module);
  6. use VDM notation to describe abstract data structures, concrete data structures and the relationship between them;
  7. use the Standard Template Library versions of the basic abstract data types to implement abstract descriptions of complex data structures with the required properties;
  8. understand the basic principles used to implement the abstract data structures in C++.

Transferable Skills

Syllabus

Converting Java to C++. Overview of C++ and comparison with Java, highlighting the differences (differences in type system, inheritance, dynamic and static method invocations, exceptions). Memory management issues.

Data Structures. Presentation of the basic abstract data types (set, sequence and mapping). Use of the basic abstract data types to model real world data structures.

Implementation issues. The Standard Template Library of C++, and the basic structures in it (vector, list, set, map). Use of iterators and algorithms. Low level implementation issues when creating new structures from scratch.

Reading list

Essential:

Timothy Budd, Data Structures in C++, using the Standard Template Library, Addison Wesley, 1998.

Background:

Timothy Budd, C++ for Java Programmers, Addison Wesley Longman 1999.

Bjarne Stroustrup, The C++ Programming Language, 3rd edition, Addison-Wesley, 1997.

C. B. Jones, Software Development using VDM, Prentice-Hall, 1989. Available on the Web from ftp://ftp.ncl.ac.uk/pub/users/ncbj/ssdvdm.ps.gz.

Details of Assessment

The assessed coursework for this module is divided between programming and written exercises.

The first two exercises consist of problem sheets requiring a number of relatively simple programs to be written to illustrate basic understanding of the basic features of C++. These will be assessed by demonstrators during the practical laboratory sessions.

The later exercises will require the student to write larger pieces of code to implement various object-oriented classes suitable for incorporation in larger object-oriented designs. Generally, a framework of code will be provided and the student has to implement some missing sections to produce a complete working program. These exercises will be submitted electronically.


Next: MC206 Software Engineering and System Development Up: Year 2 Previous: MC204 Design and Analysis of Algorithms

[University Home] [MCS Home] [University Index A-Z] [University Search] [University Help]

Author: S. J. Ambler, tel: +44 (0)116 252 3884
Last updated: 2001-09-20
MCS Web Maintainer
This document has been approved by the Head of Department.
© University of Leicester.