3. MODULE CONTENTS
Word of welcome................................................................................................................... iv
Particulars of the lecturer.......................................................................................................iv
Prerequisites.......................................................................................................................... v
Prescribed study material.......................................................................................................v
Objectives with this module....................................................................................................v
Structure of the module......................................................................................................... vi
Course administration........................................................................................................... vii
Evaluation of the module......................................................................................................vii
Study icons.......................................................................................................................... viii
Action verbs........................................................................................................................... ix
Warning against plagiarism....................................................................................................x
1 Coding elements in a C++ program......................................................................................1
2 Object orientated design methodology.................................................................................3
3 C++ classes and objects......................................................................................................5
4 Graphical user interfaces.....................................................................................................7
5 Interface programming.........................................................................................................9
Practical sessions............................................................................................11
iii
4. WORD OF WELCOME
This course builds on ITRW 119 (Programming for Engineers C++) and enables the student
to solve basic engineering problems by using programs with the necessary programming
skills.
You will have a good understanding of the fundamental principles of software design after
the completion of this course – including object orientated methodology and the
implementation of a design, in other words, coding. The emphasis of this course will be on
using C++ as a language of implementation, but it is important to have knowledge of the
fundamental principles of software design since it is applicable to all computer programming
languages.
This course is included in the syllabus since engineers cannot perform well in their careers
without a grounded knowledge and experience of good software design techniques.
PARTICULARS OF THE LECTURER
Name: _______________________________
Office: ___________________________
Phone ________________________
Fax ________________________
e-mail __________________________________________________
iv
5. PREREQUISITES
ITRW 119 Computer Science I
PRESCRIBED STUDY MATERIAL
• Object-Oriented Programming with C++ - Sourav Sahay – Oxford University
Press
OBJECTIVES WITH THIS MODULE
This course builds on ITRW 119 (Programming for Engineers C++) and enables the student
to solve basic engineering problems by using programs with the necessary programming
skills.
Important principles form the centre of this course and are indicated by the learning
outcomes formulated in every study unit and practical assignment. You will be examined on,
amongst other, the following knowledge and skills:
Knowledge
• The main components of C++ programming language:
o constants
o variables
o pointers
o functions
o procedures
o loop statements
o classes and structures.
• Object orientated problem and system analysis:
o object models
o presentation of relations between classes
o UML and class diagrams
o use case analyses.
• Object oriented model synthesis.
• Methodology and simplification of systems.
v
6. • Principles of object oriented programming:
o objects
o data encapsulation
o attributes and methods
o interfaces
o association, aggregation and inclusion
o classes
o class compilations
o virtual base-classes, subclasses and super classes
o inheritance
o polymorphism
o Ansi C versus C++.
• Applications of object oriented programming technology.
• Problem solving techniques like simulations and modelling.
• Selected applied problems.
• Communication techniques that involve TCP/IP, RS-232 or USB.
Skills
• Analysis of systems and problems based on object oriented design methodology.
• Synthesis of system models based on object oriented design methodology.
• Solving of engineering problems by developing programmes in the C++ programming
language.
• The development of programs in congruence with good programming practice.
• The use of commercial object oriented technology to reduce development time and
optimise reconcilability.
• To use simulations as a technique in the research of problems and solutions.
STRUCTURE OF THE MODULE
The module is divided in five logical units:
• C++ coding
• Object orientated design methodology
• C++ classes and objects
• Commercial object orientated technology
• Applied design and coding
vi
7. The learning activities consist of:
• Lectures 44 hours
• Tutorials 27 hours
• Practical sessions 9 hours
• Self-study 80 hours
• Total 160 hours
COURSE ADMINISTRATION
• Duration 1 semester (12 weeks)
• Presentation Four 50 minute lectures and one 3-hour practical or
tutorial session per week
EVALUATION OF THE MODULE
Module tests will be written according to the schedule provided centrally. Three tests will be
written.
The final mark for the module is composed as follows:
• Module tests 25%
• Practicals/Assignments 25%
• Examination 50%
• Total 100%
The student must obtain a 40% participation mark in order to be allowed to write the
examination.
Module tests evaluate the student's understanding of learning material on a regular basis.
Tutorial sessions prepare the student to solve practical problems.
Practical sessions evaluate the ability of the student to apply his/her knowledge on practical
problems.
vii
8. STUDY ICONS
Important information. Personal exercises.
Introductory remarks. General overview.
Rewrite this theorem/
Individual PC assign-
concept in your own words in
ment / programming.
order to explain its meaning.
Study the indicated
material in die Outcomes.
textbook/article, etc.
Estimated study time.
viii
9. ACTION VERBS
Certain keywords of action verbs will always be present in questions in tests or the
examination. You must know their meaning and what is expected of each one of these
verbs. Therefore the following list of action verbs and their meanings are provided.
• Describe
Characteristics, facts or results must be given in a logical, well-structured manner. No
comment or discussion is required.
• Define
Reproduction of knowledge is required. This demands a clear, concise and authoritative
description of a concept so that the meaning thereof is clear.
• Explain
The subject is stated clearly so that the reader will understand. Here you have to make use
of illustrations, descriptions and examples, while also providing reasons for statements and
results.
• Compare
This question must be approached carefully. Do not describe the one aspect first and then
move on to the next. Facts, events and problems are contrasted against each other and
similarities and differences highlighted.
• Discuss
This type of question presumes insight and a discretionary / discriminatory ability when an
application or evaluation has to be made. In this instance the various aspects of the matter or
statement are investigated and stated analytically.
• Analyse
The contents are divided into parts or elements and then discussed. Causes and results are
determined and mutual relations established.
• Evaluate
Evaluation means that an aspect will be judged in terms of certain criteria. A value judgment
is expressed about the aspect and has to be motivated.
ix
10. WARNING AGAINST PLAGIARISM
ASSIGNMENTS ARE INDIVIDUAL TASKS AND NOT GROUP ACTIVITIES. (UNLESS
EXPLICITLY INDICATED AS GROUP ACTIVITIES)
Copying of text from other learners or from other sources (for instance the study guide,
prescribed material or directly from the internet) is not allowed – only brief quotations are
allowed and then only if indicated as such.
You should reformulate existing text and use your own words to explain what you have
read. It is not acceptable to retype existing text and just acknowledge the source in a
footnote – you should be able to relate the idea or concept, without repeating the original
author to the letter.
The aim of the assignments is not the reproduction of existing material, but to ascertain
whether you have the ability to integrate existing texts, add your own interpretation and/or
critique of the texts and offer a creative solution to existing problems.
Be warned: students who submit copied text will obtain a mark of zero for the
assignment and disciplinary steps may be taken by the Faculty and/or University. It is
also unacceptable to do somebody else’s work, to lend your work to them or to make
your work available to them to copy – be careful and do not make your work available
to anyone!
x
11. Study unit 1
1 CODING ELEMENTS IN A C++
PROGRAM
On successful completion of this study unit the student should be able to:
• Use the main elements of the C++ programming language to write programs including the
following coding elements:
o Constants
o Variables
o Pointers
o Functions
o Procedures
o Loop statements
o Classes and structures
• Object-Oriented Programming with C++ Sourav Sahay
class and tutorial/practical sessions over a period of three weeks.
1
13. Study unit 2
2 OBJECT ORIENTATED DESIGN
METHODOLOGY
On successful completion of this study unit the student should be able to:
• In the area of object orientated problem and system analysis
o Set up object models
o Indicate a representation of class relationships
o Use UML and class diagrams to represent objects
o Understand the term "use case analyses" and know where this technique is applied
• In the area of object orientated model synthesis
o Apply methodology of system simplification through object analysis
• Object-Oriented Programming with C++ Sourav Sahay
class and tutorial/practical sessions over a period of two weeks.
3
15. Study unit 3
3 C++ CLASSES AND OBJECTS
On successful completion of this study unit the student should be able to:
• In the area of the principles of object orientated programming
o Understand and use objects
o Understand the concept of data encapsulation and know the advantages of data
encapsulation
o Distinguish between attributes and methods
o Understand the use of interfaces
o Understand and apply the principles of association, aggregation and
comprehension
o Distinguish between classes and objects
o Understand and apply class sets
o Distinguish between virtual base classes, subclasses and super classes and
know where they can be used
o Understand and apply the concept of inheritance
o Understand and apply the concept of polymorphism
o Understand the relationship between Ansi C and C++
• Object-Oriented Programming with C++ Sourav Sahay
class and tutorial/practical sessions over a period of two weeks.
5
17. Study unit 4
4 GRAPHICAL USER INTERFACES
On successful completion of this study unit the student should be able to:
• Explain the functioning of an event loop;
• Define key terms regarding graphical user interfaces;
• Model elements of a graphical user interface using UML;
• Write programs using graphical user interfaces.
Class notes
class and tutorial/practical sessions over a period of two weeks
7
19. Study unit 5
5 INTERFACE PROGRAMMING
On successful completion of this study unit the student should be able to:
• Define key terms regarding interfaces;
• Explain programming aspects of network communication;
• Explain the working of RS-232 and USB communication from a software perspective;
• Write programs that implement interfaces.
• Object-Oriented Programming with C++ Sourav Sahay
• Class notes.
class and tutorial/practical sessions over a period of three weeks.
9