Вы находитесь на странице: 1из 20

Engr.

Asif Jamal
Prerequisites: Programming Fundamentals

Lecture Duration: 3 hours per week for the 16 week semester


Lab Duration: 3 hours per week for the 16 week semester

Reference Materials:
◦ C++: How to Programme, Deitel and Deitel, 8/e, Pearson
◦ Object Oriented Programming in C++, 4rth Edition, Robert Lafore
◦ https://www.tutorialspoint.com/cplusplus/cpp_object_oriented.htm
 Instructor:
◦ Engr. Asif Jamal
 Block A ,Office A102

 Lab Engineer:
◦ Mr. Shahzad Adil
◦ Block A, 2nd Floor
 This course provides an introduction to the concepts and
methodology of Object-Oriented Programming. The concepts
of this paradigm will be strengthened through programming
language C++.

 The main objective of the course is to introduce students to


the concepts of Object oriented programming. Students will
learn to build reusable objects, making use of encapsulation,
polymorphism and inheritance in the C++ programming
language. Throughout the subject, the emphasis will be on
using object-oriented approaches to solving problems.
Classification Topics

Enhance the knowledge and skills of students in OO design and


Knowledge and
program development
Comprehension

 Implement object-oriented design.

 Use member data and member functions.

 Use the C++ syntax to declare objects (classes).


Application and Skills
 Write software that uses constructors and destructors.

 Use operator overloads and function overloads/overrides to


generate complete functionality for custom objects.

 Use inheritance and explain how this promotes code reuse.

Analysis and Synthesis  Able to solve problems using object-oriented approach.


Lectures:
 Lectures seek to make accessible to students the module and
program aims in addition to crucial background and factual
knowledge.
 Interactive Lectures will introduce the concepts, theories, and
application of the subject using relevant examples.
 The lectures will also be used to discuss the problems of object
oriented programming and the relevant problem solving theories.
 Students will be asked questions, often in the form of short
activities and are expected to discuss material from previous
weeks.
 Students would be free to ask any question related to the subject
matter during and after lectures.
Labs
◦ Programming labs will be conducted with focus on hands-on
computer programming.
Assessments:
Assignments
◦ Weekly assignments will be given to the students related to topics
discussed in class.
Quizzes
◦ Short quizzes of 10 to 15 mins duration will be conducted to evaluate
the performance of students and to help them identify their problem
areas.
Project
◦ Students will implement a point of sale terminal using object oriented
design.
Assignments + Quizzes : 10%
Mid Term Paper : 20%
Class Participation : 05%

Final Term Project (Project + Viva) : 10%


Final Paper : 40%
Lab : 15%
Total : 100

This criteria may be changed by the teacher.


 History
◦ C++ is a middle-level programming language developed by
Bjarne Stroustrup starting in 1979 at Bell Labs.
◦ C++ runs on a variety of platforms, such as Windows, Mac OS,
and the various versions of UNIX.

 Purpose of C++
◦ Adding feature of OOP to C programming language
◦ Basic unit of OOP is Object
An algorithm is a step-by-step process.

A computer program is a step-by-step set of instructions for a computer.

Every computer program is an algorithm.

Pseudo-code Actions to directions

is more of a method to represent an algorithm. No specific syntax is required and


thus it can not be directly executed by the computer. Pseudocodes are often written
by programmers for their own convenience and thus no standard syntax is followed.

11
 Programming languages allow programmers to develop software.
 The three major families of languages are:
◦ Machine languages
◦ Assembly languages
◦ High-Level languages
 Comprised of 1s and 0s
 The “native” language of a computer
 Difficult to program – one misplaced 1 or 0 will cause the
program to fail.
 Example of code:
1110100010101 111010101110
10111010110100 10100011110111
 Assembly languages are a step towards easier
programming.
 Assembly languages are comprised of a set of elemental
commands which are tied to a specific processor.
 Assembly language code needs to be translated to machine
language before the computer processes it.
 Example:
ADD 1001010, 1011010
 High-level languages represent a giant leap towards easier
programming.
 The syntax of HL languages is similar to English.
 Example:
grossPay = basePay + overTimePay

 Historically, we divide HL languages into two groups:


◦ Procedural languages
◦ Object-Oriented languages (OOP)
 Early high-level languages are typically called procedural languages.
 Procedural languages are characterized by sequential sets of linear
commands. The focus of such languages is on structure.
 Examples include C, COBOL, Fortran, LISP, Perl, HTML, VBScript
 The focus of OOP languages is not on structure, but on modeling
data.
 Programmers code using “ blueprints/prototypes ” of data models
called classes.
 Examples of OOP languages include C++, Visual Basic.NET and Java.
Key idea in object-oriented:

The real world can be “accurately” described as a collection of objects


that interact.
Structural Programming Object Oriented Programming

In Structured Programming, Programs are In Object Oriented Programming, Programs


divided into small self contained functions are divided into small entities
(procedures). called objects.

Structured Programming is less secure as Object Oriented Programming is more


there is no way of data hiding. secure as having data hiding feature

e.g. Fortran, COBOL and C e.g. C++, C#, Java, Perl and Python
1. Functions
2. Arrays
3. Pointers
4. Structures

Вам также может понравиться