Docsity

Introduction-Programming For Engineers II-Lecture Slides, Slides of Programming for Engineers

Partial preview of the text

Download Introduction-Programming For Engineers II-Lecture Slides and more Slides Programming for Engineers in PDF only on Docsity!

Programming for Engineers II

(EE 112 )

WELCOME STUDENTS

Course Objectives

 As a second course on programming the emphasis would be that students should be able to write a program of reasonable size and complexity.  Upon successful completion of this course the student will have in depth knowledge of Object Oriented Programming (OOP). Devising a solution of a problem will be encouraged and converting design to a computer program would be stressed upon.  Object oriented programming has been accepted as industrial standard and majority of the tools/application have been and are being written in OO programming language (C++).  Therefore, C++ would be used as the tool/language for the course.

Assessment

 Grading Plan:

Mid 1 10%

Mid 2 10%

Quizzes 10%

Assignments 10%

Projects 10%

Final 50%

Note: We may have slight modifications

Academic Honesty

 All parties involved in any kind of cheating in any exam will get zero in that exam

 Habitual cheaters will get zero in all assignments/projects. This may lead to a course failure.

 Cheating punishment may become more strict

Any Queries

 Attending Class

 Assessment

 Plagiarism

 Timetable

Programming

 Programming is like writing

 If you can write good script you can write

good programs

 So Programming is Easy

Programming Techniques

 Un-Structured Programming

 Procedural Programming

 Modular & Structured Programming

 Object Oriented Programming

Un-Structured Programming

 Only one ‘main’ program

 Data can be accessed and

modified throughout main

Procedural Programming

 Pascal, C, BASIC, Fortran, and similar traditional programming languages are procedural languages.  That is, each statement in the language tells the computer to do something.  A program in a procedural language is a list of instructions.

Procedure Program View

Benefits

 With parameters and sub-procedures (procedures of procedures), programs can now be written more structured and error free.

 For example, if a procedure is correct, every time it is used it produces correct results.

 Consequently, in cases of errors you can narrow your search to those places which are not proven to be correct.

Modular Programming

 With modular programming, procedures of

common functionality are grouped together into separate modules.

 A program therefore is now divided into several

smaller parts

 The parts interact through procedure calls

 Each module can have its own data.

 This allows each module to manage an internal

state which is modified by calls to procedures of this module.

 However, there is only one state per module and

each module exists at most once in the whole program.

Object Oriented Programming

 OOP offers new and powerful way to cope with

complexity, instead of viewing a program as a series of steps

 It views it as a group of objects that have certain

properties and can take certain actions

 It results in programs are clearer, more reliable

and more easily maintained