EEE1004: Project

C++ Programming Project

Module leader: Prof Alex Yakovlev

Modern version of this module EEE1008 is run by Dr Andrey Mokhov:

Course materials for EEE1008

Instructions on Using Windows 2000 and Various Applications (old)

Windows 2000 for Computing Science Induction


"Standard" C++ and C libraries of functions under Cygwin

These libraries can be found by typing (in your Cygwin bash shell)
cd /usr/include
cd /usr/include/g++-3
Alternatively, it should be reached (using the Windows Explorer) on your C: drive, in "Program Files/Cygwin/usr/include" and "Program Files/Cygwin/usr/include/g++-3"

Library of Programmer Defined Types (Array, Text ...)

The definitions of these types can be found on the "software on 'campus' (F:)" drive (look inside "My Computer"), in "compsci/cygwin/C++/include".

A WWW version of the PDT and built-in type interfaces is available here.


C++ Zipped Files

Includes template projects, design notation templates, CodeWarrior Programs

SUPPORTING SOFTWARE for those who would like to run C++ (Borland, Metrowerks, Microsoft Visual C++, Unix) on their own computers

Software for work at home

Link to Cygnus solutions software etc. can be found here
Be prepared for a long period of downloading!

How to print the contents of the Cygwin Bash window

Dr. K. Wright's document on printing Cygwin


Electricity Bill Example: C++ Code

document describing the design process (PDF)

source code


Examination Structure

This part refers to the previous (prior to 2006-07) module CSC601 in which C++ was taught to EEE and Marine Technology students. The examples of exam questions can however be very useful to students taking EEE1004 because they will test their proficiency in C++. I strongly recommend to use them for practice!

CSC601 has an OPEN BOOK examination (lectures notes and books are permitted). However I wouldn't recommend students to spend too much time browsing through the notes during the examination. The point is that the examination questions are essentially about solving particular problems - checking syntax, working out the meaning of the code, or designing algorithms - and not a book work!
The examination paper will consist of three sections A, B and C. Sections A and B are on testing your knowledge of C++ syntax and semantics. Section C is to test you ability to design and implement C++ programs. Students will be offered a mock test in the first week of December to have a flavour of what Sections A and B are.

Examination: Section B question samples

Understanding Boolean expressions and Answers

Understanding loops

Understanding functions

Examination: Section C samples

Sample 1

Sample 1 solution


Sample 2

Sample 2 solution


Sample 3

Sample 3 solution



Project Work Instructions

Submission Documentation Requirements and Deadline Policy


List of Upcoming Assignments


Plagiarism is an attempt to pass someone else's work as your own. This is a serious offence and may result in disciplinary measures being taken against anyone who is found to be plagiarising.
In particular, copying someone else's program code, algorithm design solutions, documentation etc. is seen as examples of plagiarism and will be treated as such with all appropriate consequences, from having a zero mark given for the relevant piece of submitted work to a case raised to the university disciplinary committee. More details on plagiarism can be found here.

Some solutions to Assignment 0 (Algorithm Designs)

Finding Max of temp readings with input inside loop

Finding Max of temp readings with separate input

Histogram data calculation

Checkerboard forming a cross of 1s surrounded by 0s

Useful code samples

Electricity Bill code (modified with repetitive action)

Illustration of scope and visibility (code and example)

Illustration of parameter passing mechanisms - by value and by reference (the swap example)

Safe input of int's, double's and char's

Safe input of int's (via value and reference parameter passing)

Cross of 1's on a 2-D board (same solution using a C++ built-in array)

Calculating Max and Min readings using Array (same solution using a C++ built-in array)

Calculating Max and Min readings using Array and File Input ( example of a data file (same solution using a C++ built-in array)

Printing a sequence of integers using a RECURSIVE function

Calculating Max and Min readings and Max reading by RECURSION

Calculating "Running Averages" for a set of readings, using Arrays and File Input and Output (same solution using a C++ built-in array)

Sorting readings in ascending order using the running Min calculation method (illustrates how a PDT array is passed as a parameter to a function) (same solution using a C++ built-in array)

Calculating a histogram of readings with arbitrary number of intervals (using built-in arrays)

How ...

To clear screen in C++ under Cygwin

Useful C++ related links

C++ Tutor by Michael Bruce-Lockhart

Teaching yourself C++ and Online C++ Tutorial

C++ compilers (including free ones!)

The Ultimate Computer Language Guide

Friedman/Koffman textbook Webpage

Quick Reference Sheet on C++ Syntax

Various Beginner's Guides to Programming Languages

A Beginner's Guide to Programming Languages

Beginner's Resources to Learn Programming Languages

Useful Unix related links

Introduction to UNIX (by Blaise Barney for the Maui High Performance Computing Center)


Alex.Yakovlev at
24 October 2007