EERI 314 PEC

glintplainvilleΛογισμικό & κατασκευή λογ/κού

18 Νοε 2013 (πριν από 3 χρόνια και 7 μήνες)

85 εμφανίσεις

ENGINEERING PROGRAMM
ING I

STUDY GUIDE FOR

EERI 314 PEC

*EERI314PEC*

FACULTY OF ENGINEERING





ii
























Study guide compiled by:

ANDREAS ALBERTS




Edited
nn
.

+
Page layout by
Elsabe Strydom
,
Graphikos.

Printing arrangements and distributi
on by Department Logistics (Distribution Centre).

Printed by Nashua Digidoc Centre 018 299 2827

Copyright


20
1
3

edition. Date of revision 20
1
2
.

North
-
West University, Potchefstroom Campus.

No part of this book may be reproduced in any form or by any means

without written
permission from the publisher.




iii

MODULE CONTENTS

Word of welcome

................................
................................
................................
...................

iv

Particulars of the lecturer

................................
................................
................................
.......

iv

Prerequ
isites

................................
................................
................................
..........................

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

Study unit 1

Coding elements in

a C++ program

................................
....................

1

Study unit 2

Object orientated design methodology

................................
..............

3

Study unit 3

C++ classes and objects

................................
................................
.....

5

Study unit 4

Graphical user interfaces

................................
................................
....

7

Study unit 5

Interface programming

................................
................................
........

9

Practical sessions


................................
................................
................................
............

11



iv

WORD OF WELCOME

This course builds on ITRW 119 (Programming for Engineers C++) and enables the student
to solve basic en
gineering 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
implementa
tion 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 progra
mming
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 L
ECTURER

Name: _____________________________
__

Office: ___________________________


Phone

________________________

Fax

________________________

e
-
mail

__________________________________________________



v

PREREQUISITES

ITRW 119 Computer Science I

PRESCRIBED STUDY MAT
ERIAL



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
skill
s
.

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 compon
ents 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 ca
se analyses.



Object oriented model synthesis.



Methodology and simplification of systems.


vi



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 compilatio
ns

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 te
chniques 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 programm
es 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 MOD
ULE

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



vii

The learnin
g activities consist of:



Lectures

44 hours



Tutorials

27 hours



Practical sessions

9 hours



Self
-
study

80 hours



Total

160 hours

COURSE ADMINISTRATIO
N



Duration


1 semester (12 weeks)



Presentation

Four 50 minute lectures and one 3
-
hour practical or




tutorial

session per week

EVALUATION OF THE MO
DULE

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%



Examin
ation


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 sol
ve practical problems.


Practical sessions evaluate the ability of the student to apply his/her knowledge on practical
problems.


viii

STUDY ICONS


Important information.


Personal exercises.


Introductory remarks.


General overview.


Individual PC assi
gn
-
ment / programming.


Rewrite this theorem/
concept in your own words in
order to explain its meaning.


Study the indicated
material in die
textbook/article, etc.


Outcomes.


Estimated study time.






ix

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 o
r 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 / discrimin
atory 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 an
d 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.


x

WARNING AGAINST PLAG
IARISM


ASSIGNME
NTS 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 Uni
versity. 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!



Study unit 1


1


1

CODING ELEMENTS IN A

C++
PROGRAM





On successful compl
etion 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 structure
s




Object
-
Oriented Programming with C++ Sourav Sahay


class and tutorial/practical sessions over a period of three weeks.

Study unit 1


2



Study unit 2


3


2

OBJECT ORIENTATED DE
SIGN
METHODOLOGY





On successful completion of this study unit the student should be able to:



In the a
rea 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 t
he 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.

Study unit 2


4



Study unit 3


5


3

C++ CLASSES AND
OBJECTS







On successful completion of this study unit the student should be able to:



I渠t桥 ar敡 of t桥 pri湣n灬敳f 潢je捴 潲楥湴nt敤 pr潧r慭mi湧

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

Distingui
sh 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
-
Ori
ented Programming with C++ Sourav Sahay


class and tutorial/practical sessions over a period of two weeks.


Study unit 3


6



Study unit 4


7


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

Study unit 4


8



Study unit 5


9


5

INTER
FACE 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 softw
are 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.

Study unit 5


10



Practical sessions


11

PRACTICAL SESSIONS

Arrangements regarding practical sessio
ns will be made in class when the relevant study
units are discussed.