• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Eeri 314 pec 2013
 

Eeri 314 pec 2013

on

  • 188 views

 

Statistics

Views

Total Views
188
Views on SlideShare
188
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft Word

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Eeri 314 pec 2013 Eeri 314 pec 2013 Document Transcript

    • ENGINEERING PROGRAMMING I STUDY GUIDE FOR EERI 314 PEC *EERI314PEC* FACULTY OF ENGINEERING
    • Study guide compiled by:ANDREAS ALBERTSEdited nn.+ Page layout by Elsabe Strydom, Graphikos.Printing arrangements and distribution by Department Logistics (Distribution Centre).Printed by Nashua Digidoc Centre 018 299 2827Copyright © 2013 edition. Date of revision 2012.North-West University, Potchefstroom Campus.No part of this book may be reproduced in any form or by any means without writtenpermission from the publisher.ii
    • MODULE CONTENTSWord of welcome................................................................................................................... ivParticulars of the lecturer.......................................................................................................ivPrerequisites.......................................................................................................................... vPrescribed study material.......................................................................................................vObjectives with this module....................................................................................................vStructure of the module......................................................................................................... viCourse administration........................................................................................................... viiEvaluation of the module......................................................................................................viiStudy icons.......................................................................................................................... viiiAction verbs........................................................................................................................... ixWarning against plagiarism....................................................................................................x1 Coding elements in a C++ program......................................................................................12 Object orientated design methodology.................................................................................33 C++ classes and objects......................................................................................................54 Graphical user interfaces.....................................................................................................75 Interface programming.........................................................................................................9 Practical sessions............................................................................................11 iii
    • WORD OF WELCOMEThis course builds on ITRW 119 (Programming for Engineers C++) and enables the studentto solve basic engineering problems by using programs with the necessary programmingskills.You will have a good understanding of the fundamental principles of software design afterthe completion of this course – including object orientated methodology and theimplementation of a design, in other words, coding. The emphasis of this course will be onusing C++ as a language of implementation, but it is important to have knowledge of thefundamental principles of software design since it is applicable to all computer programminglanguages.This course is included in the syllabus since engineers cannot perform well in their careerswithout a grounded knowledge and experience of good software design techniques.PARTICULARS OF THE LECTURERName: _______________________________Office: ___________________________Phone ________________________Fax ________________________e-mail __________________________________________________iv
    • PREREQUISITESITRW 119 Computer Science IPRESCRIBED STUDY MATERIAL• Object-Oriented Programming with C++ - Sourav Sahay – Oxford University PressOBJECTIVES WITH THIS MODULEThis course builds on ITRW 119 (Programming for Engineers C++) and enables the studentto solve basic engineering problems by using programs with the necessary programmingskills.Important principles form the centre of this course and are indicated by the learningoutcomes 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
    • • 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 MODULEThe module is divided in five logical units:• C++ coding• Object orientated design methodology• C++ classes and objects• Commercial object orientated technology• Applied design and codingvi
    • The learning activities consist of:• Lectures 44 hours• Tutorials 27 hours• Practical sessions 9 hours• Self-study 80 hours• Total 160 hoursCOURSE ADMINISTRATION• Duration 1 semester (12 weeks)• Presentation Four 50 minute lectures and one 3-hour practical or tutorial session per weekEVALUATION OF THE MODULEModule tests will be written according to the schedule provided centrally. Three tests will bewritten.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 theexamination.Module tests evaluate the students 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 practicalproblems. vii
    • 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
    • ACTION VERBSCertain keywords of action verbs will always be present in questions in tests or theexamination. You must know their meaning and what is expected of each one of theseverbs. Therefore the following list of action verbs and their meanings are provided.• DescribeCharacteristics, facts or results must be given in a logical, well-structured manner. Nocomment or discussion is required.• DefineReproduction of knowledge is required. This demands a clear, concise and authoritativedescription of a concept so that the meaning thereof is clear.• ExplainThe subject is stated clearly so that the reader will understand. Here you have to make useof illustrations, descriptions and examples, while also providing reasons for statements andresults.• CompareThis question must be approached carefully. Do not describe the one aspect first and thenmove on to the next. Facts, events and problems are contrasted against each other andsimilarities and differences highlighted.• DiscussThis type of question presumes insight and a discretionary / discriminatory ability when anapplication or evaluation has to be made. In this instance the various aspects of the matter orstatement are investigated and stated analytically.• AnalyseThe contents are divided into parts or elements and then discussed. Causes and results aredetermined and mutual relations established.• EvaluateEvaluation means that an aspect will be judged in terms of certain criteria. A value judgmentis expressed about the aspect and has to be motivated. ix
    • WARNING AGAINST PLAGIARISMASSIGNMENTS ARE INDIVIDUAL TASKS AND NOT GROUP ACTIVITIES. (UNLESSEXPLICITLY 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 areallowed and then only if indicated as such.You should reformulate existing text and use your own words to explain what you haveread. It is not acceptable to retype existing text and just acknowledge the source in afootnote – you should be able to relate the idea or concept, without repeating the originalauthor to the letter.The aim of the assignments is not the reproduction of existing material, but to ascertainwhether you have the ability to integrate existing texts, add your own interpretation and/orcritique 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 theassignment and disciplinary steps may be taken by the Faculty and/or University. It isalso unacceptable to do somebody else’s work, to lend your work to them or to makeyour work available to them to copy – be careful and do not make your work availableto anyone!x
    • Study unit 1 1 CODING ELEMENTS IN A C++ PROGRAMOn 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 Sahayclass and tutorial/practical sessions over a period of three weeks. 1
    • Study unit 12
    • Study unit 2 2 OBJECT ORIENTATED DESIGN METHODOLOGYOn 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 Sahayclass and tutorial/practical sessions over a period of two weeks. 3
    • Study unit 24
    • Study unit 3 3 C++ CLASSES AND OBJECTSOn 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 Sahayclass and tutorial/practical sessions over a period of two weeks. 5
    • Study unit 36
    • Study unit 4 4 GRAPHICAL USER INTERFACESOn 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 notesclass and tutorial/practical sessions over a period of two weeks 7
    • Study unit 48
    • Study unit 5 5 INTERFACE PROGRAMMINGOn 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
    • Study unit 510
    • Practical sessionsPRACTICAL SESSIONSArrangements regarding practical sessions will be made in class when the relevant studyunits are discussed. 11
    • Practical sessionsPRACTICAL SESSIONSArrangements regarding practical sessions will be made in class when the relevant studyunits are discussed. 11
    • Practical sessionsPRACTICAL SESSIONSArrangements regarding practical sessions will be made in class when the relevant studyunits are discussed. 11