Sie sind auf Seite 1von 31

CSE202

Object Oriented
Programing
Lecture #0

Let’s explore and move


to “Better C”

© LPU :: CSE202 Object Oriented Programming


Course Details
• LTP – 0 0 5

© LPU :: CSE202 Object Oriented Programming


Text Book
OBJECT ORIENTED
PROGRAMMING IN C++
by Robert Lafore,
PEARSON, 4th Edition,
(2013)

© LPU :: CSE202 Object Oriented Programming


Course Assessment Model
Marks break up
• Attendance 5
• CA 30
• MTE 20
• ETE 45
Total 100

© LPU :: CSE202 Object Oriented Programming


Acknowledgements
• MIT OpenCourseware
• Stanford online
• Udemy
• Coursera
• learncpp.com
• Lynda.com
• Wikiversity
• Above all…

© LPU :: CSE202 Object Oriented Programming


Acknowledgements
The homepage of Bjarne Stroustrup, the inventor
of C++:http://www.research.att.com/~bs

A C++ online tutorial:


http://www.cplusplus.com/doc/tutorial/

The C++ FAQ:


http://www.parashift.com/c++-faq-lite

© LPU :: CSE202 C++ Programming


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.
© LPU :: CSE202 Object Oriented Programming
The hitch…
The BURNING questions in mind…

• Oh no… Why another Programming Language ?


• What would we do with it, we already know C?
• Will it really help improve my programming skills?

© LPU :: CSE202 Object Oriented Programming


A Better C
C++
Improves on many of C's features
Has object-oriented capabilities
•Increases software quality and reusability
Developed by Bjarne Stroustrup at Bell Labs
•Called "C with classes“ an enhanced version of C
Superset of C
•Can use a C++ compiler to compile C programs
•Gradually evolve the C programs to C++

Towards better programming….


© LPU :: CSE202 Object Oriented Programming
The course contents
Before MTE
• Unit I: Concepts and Basics of C++ Programming,
Functions and Input/output Streams, Array
• Unit II: Pointers, Reference Variables and String
Concepts
• Unit III: Structured Data Types and Classes, Operator
Overloading and Type Conversion

© LPU :: CSE202 Object Oriented Programming


The course contents
After MTE
• Unit IV: Inheritance and Aggregation, Dynamic
Memory Management
• Unit V : Polymorphism and Data File Operations
• Unit VI: Templates and Exception Handling, The
Standard Template Library

© LPU :: CSE202 Object Oriented Programming


As an electronics and communication engineering student, why should I
learn programming ?

• Electronics and communication deals broadly with


the following fields:
1. Analog Electronics
2. Digital Electronics
3. Communication
4. Digital signal processing
5. Miscellaneous( Control system etc.)

© LPU :: CSE202 Object Oriented Programming


• Apart from the first heading(Analog electronics)
where programming is limited to spice tools and
scripting for automation, all the other fields involve
extensive programming.
• Programming provides the means to implement the
ideas for practical applications.For e.g. : The digital
circuits are implemented using verilog, whereas the
signal processing algorithms are implemented on
various platforms according to the application

© LPU :: CSE202 Object Oriented Programming


• .Communication encompasses everything from
antenna design to data communication. Except for
the antenna and RF filters, every system is
programmed chiefly by the electronics engineers.
• Embedded systems are in use across all the
application areas of electronics, the programming
of which is a valuable skill for all electronics
engineers.

© LPU :: CSE202 Object Oriented Programming


Unit I:Console based Input/Output

Bring in through cin and Take out through cout


© LPU :: CSE202 Object Oriented Programming
Unit I (Continued): Function and Array

© LPU :: CSE202 Object Oriented Programming


Unit II:Pointers and Strings

© LPU :: CSE202 Object Oriented Programming


Unit III: SDT,Operator Overloading
& Type Conversion
Look around you and identify some objects

Everything is an OBJECT

© LPU :: CSE202 C++ Programming


Object ,Object and Object

A student, a professor
A desk, a chair, a classroom, a building
A university, a city, a country
A subjects such as Physics, Math, History, …

© LPU :: CSE202 C++ Programming


Let us explore about LPU
LPU is defined by the interactions among various objects:
Students
Professors inside LPU
Staff
Board governance
State governance outside LPU
… ...

© LPU :: CSE202 C++ Programming


Daily Analysis
• In real world, many objects are of same kind.

© LPU :: CSE202 C++ Programming


Encapsulation

© LPU :: CSE202 Object Oriented Programming


Hidden reality sometimes in daily analysis

• If you want to know about anything like places to


be visited in Jalandhar then what will you do?

You simply text that in Google search Box

© LPU :: CSE202 C++ Programming


Reuse, Reduce & Reliable !!!

Existing Features Existing Features + Additional Features

© LPU :: CSE202 C++ Programming


Hiding data

© LPU :: CSE202 C++ Programming


Hiding Details

© LPU :: CSE202 C++ Programming


Unit IV: Inheritance
But Mummy,
where did my
blue eyes
come from?

© LPU :: CSE202 C++ Programming


Unit V: Polymorphism

In front of father
In class

In CCD

One thing and many forms


© LPU :: CSE202 C++ Programming
Polymorphism (continued)

© LPU :: CSE202 Object Oriented Programming


Unit VI: Exception Handling

© LPU :: CSE202 Object Oriented Programming


Any Question?
Next Class: Concepts and Basics of C++ programming

© LPU :: CSE202 C++ Programming

Das könnte Ihnen auch gefallen