OBJECT ORIENTED
PROGRAMMING
Ms. Munazza Mah Jabeen
Assistant Professor of Computer Science
Course objectives:
• To understand basic programming constructs and use the
newly acquired skills to solve extensive programming
problems.
• To understand the principles of the object-oriented model and
its implementation in the ‘C++' language.
• To build on the concepts learned in C language and use the
power of object oriented programming to develop software
applications.
• To enable the students to write and execute well structured
'C++' programs.
• To use problem solving and program design techniques
effectively to generate applications.
Course Contents:
• The Big Picture
• C++ Programming Basics
• Loops and Decisions
• Structures
• Functions
• Objects and Classes
• Arrays and Strings
• Operator Overloading
• Inheritance
• Pointers
• Virtual Functions
• Streams and Files
• Multi-file Programs
• Templates and Exceptions
• The StandardTemplate Library
• Object-Oriented Software
Development
Course Format:
• Lectures will be mostly interactive.You will be called on randomly to answer
questions.
• Prepare you own Notes.
• 10-minute fairly simple quiz according to the specified Schedule.
• Course Page will host lecture slides Links, quizzes, Lab assignments and
general announcements.
• Individual Login will be provided to you by the IT Department on
http://moodlecloud.com
Course Grading:
Breakdown:
• 15% - LabWork
• 10% - Quizzes
• 25% - Mid-Term
• Theory – 10%
• Practical – 15%
• 35% -Terminal
• 15% - Practical
• May share ideas for weekly Lab assignment but must be done up individually.
• May drop lowest quiz score.
Lab work Submission:
• Lab work due must be submitted online before midnight next class – No
explicit submission allowed.
• No extension in deadline is Allowed.
• Late assignments incur 10% per day penalty up to 3 days. After 3 days, no
credit.
• Under special circumstances, you may be excused from an assignment or
quiz. Must inform ahead of time.
• Only Original Work will be considered, copying is strictly disallowed.
Overview:
• Data
• Information
• Computer
• Hardware
• Software
• Computer Language
• Programming Language
• Low Level
• Intermediate Level
• High Level
• LanguageTranslators
• Interpreter
• Compiler
History of C++:
Features of C++:
• C++ is a general-purpose Object-Oriented Programming (OOP) language
• C++ is a middle-level programming language
• It is an extension of the C language and has Improved many of C's features
• C++ runs on different operating platforms such as Windows, Macintosh OS,
and different versions of UNIX.
• Increases software quality and reusability
• It was Developed by Bjarne Stroustrup at Bell Labs Called "C with classes“ an
enhanced version of C.
Problems with Structured Programming:
• Procedural Languages:
• Division into Functions
• Unrestricted Access
• Real-World Modeling
• Attributes
• Behavior
Global and local variables:
The procedural paradigm
The Object-Oriented Approach:
• The fundamental idea behind object-oriented languages is
to combine into a single unit both data and the functions
that operate on that data. Such a unit is called an object.
• An object’s functions, called member functions in C++,
typically provide the only way to access its data. If you
want to read a data item in an object, you call a member
function in the object. It will access the data and return
the value to you.You can’t access the data directly.
• The data is hidden, so it is safe from accidental alteration.
Data and its functions are said to be encapsulated into a
single entity. Data encapsulation and data hiding are key
terms in the description of object-oriented language
OOP: An Approach to Organization:
Characteristics of Object-Oriented Languages:
• Objects:
Objects are referred to as the basic run-time entities.
• Classes:
Class is a collection of objects of the similar type.
• Inheritance:
When the objects of one class acquire the properties of the
objects of another class, it is referred to as inheritance.
• Base Class:
The class in which the members are inherited (by objects
of another class) is called the Base class.
• Derived Class:
The class that inherits the members is called the Derived
class.
• Encapsulation:
Encapsulation means to “wrap up” the functions and data
into a single class.
…
• Abstraction:
Data abstraction means to show only required
information and hide the remaining information
• Reusability:
A class once written, created and debugged, it can
be distributed to other programmers for use in
their own programs
• Creating New DataTypes:
It is possible to construct new data types
• Polymorphism and Overloading:
Using operators or functions in different ways, is
called polymorphism. When an existing operator is
given the capability to operate on a new data type,
it is said to be overloaded.
Overloading is a kind of polymorphism; it is also an
important feature of OOP.
C++ and C
Integrated Development Environment – IDE:
• Editor
• Compilers
• Debugger
• Linkers
• Loaders
Program:
Compiler Download Link:
• https://sourceforge.net/projects/orwelldevcpp/

The Big Picture

  • 1.
    OBJECT ORIENTED PROGRAMMING Ms. MunazzaMah Jabeen Assistant Professor of Computer Science
  • 2.
    Course objectives: • Tounderstand basic programming constructs and use the newly acquired skills to solve extensive programming problems. • To understand the principles of the object-oriented model and its implementation in the ‘C++' language. • To build on the concepts learned in C language and use the power of object oriented programming to develop software applications. • To enable the students to write and execute well structured 'C++' programs. • To use problem solving and program design techniques effectively to generate applications.
  • 3.
    Course Contents: • TheBig Picture • C++ Programming Basics • Loops and Decisions • Structures • Functions • Objects and Classes • Arrays and Strings • Operator Overloading • Inheritance • Pointers • Virtual Functions • Streams and Files • Multi-file Programs • Templates and Exceptions • The StandardTemplate Library • Object-Oriented Software Development
  • 4.
    Course Format: • Lectureswill be mostly interactive.You will be called on randomly to answer questions. • Prepare you own Notes. • 10-minute fairly simple quiz according to the specified Schedule. • Course Page will host lecture slides Links, quizzes, Lab assignments and general announcements. • Individual Login will be provided to you by the IT Department on http://moodlecloud.com
  • 5.
    Course Grading: Breakdown: • 15%- LabWork • 10% - Quizzes • 25% - Mid-Term • Theory – 10% • Practical – 15% • 35% -Terminal • 15% - Practical • May share ideas for weekly Lab assignment but must be done up individually. • May drop lowest quiz score.
  • 6.
    Lab work Submission: •Lab work due must be submitted online before midnight next class – No explicit submission allowed. • No extension in deadline is Allowed. • Late assignments incur 10% per day penalty up to 3 days. After 3 days, no credit. • Under special circumstances, you may be excused from an assignment or quiz. Must inform ahead of time. • Only Original Work will be considered, copying is strictly disallowed.
  • 7.
    Overview: • Data • Information •Computer • Hardware • Software • Computer Language • Programming Language • Low Level • Intermediate Level • High Level • LanguageTranslators • Interpreter • Compiler
  • 8.
  • 9.
    Features of C++: •C++ is a general-purpose Object-Oriented Programming (OOP) language • C++ is a middle-level programming language • It is an extension of the C language and has Improved many of C's features • C++ runs on different operating platforms such as Windows, Macintosh OS, and different versions of UNIX. • Increases software quality and reusability • It was Developed by Bjarne Stroustrup at Bell Labs Called "C with classes“ an enhanced version of C.
  • 10.
    Problems with StructuredProgramming: • Procedural Languages: • Division into Functions • Unrestricted Access • Real-World Modeling • Attributes • Behavior Global and local variables: The procedural paradigm
  • 11.
    The Object-Oriented Approach: •The fundamental idea behind object-oriented languages is to combine into a single unit both data and the functions that operate on that data. Such a unit is called an object. • An object’s functions, called member functions in C++, typically provide the only way to access its data. If you want to read a data item in an object, you call a member function in the object. It will access the data and return the value to you.You can’t access the data directly. • The data is hidden, so it is safe from accidental alteration. Data and its functions are said to be encapsulated into a single entity. Data encapsulation and data hiding are key terms in the description of object-oriented language
  • 12.
    OOP: An Approachto Organization:
  • 13.
    Characteristics of Object-OrientedLanguages: • Objects: Objects are referred to as the basic run-time entities. • Classes: Class is a collection of objects of the similar type. • Inheritance: When the objects of one class acquire the properties of the objects of another class, it is referred to as inheritance. • Base Class: The class in which the members are inherited (by objects of another class) is called the Base class. • Derived Class: The class that inherits the members is called the Derived class. • Encapsulation: Encapsulation means to “wrap up” the functions and data into a single class.
  • 14.
    … • Abstraction: Data abstractionmeans to show only required information and hide the remaining information • Reusability: A class once written, created and debugged, it can be distributed to other programmers for use in their own programs • Creating New DataTypes: It is possible to construct new data types • Polymorphism and Overloading: Using operators or functions in different ways, is called polymorphism. When an existing operator is given the capability to operate on a new data type, it is said to be overloaded. Overloading is a kind of polymorphism; it is also an important feature of OOP.
  • 15.
  • 16.
    Integrated Development Environment– IDE: • Editor • Compilers • Debugger • Linkers • Loaders
  • 17.
  • 18.
    Compiler Download Link: •https://sourceforge.net/projects/orwelldevcpp/