WELCOME TO ALL STUDENTS IN MY CLASS: Hope You All Enjoyed C# Course Name: OBJECT ORIENTED PROGRAMMING Course Co-Ordinator : HIRA FARMAN
BOOK: The Complete Reference Book by: BJARNE STROUSTUP
LECTURE # 1 CHAPTER 1 TOPIC: BASIC INTRODUCTION TO C++
OBJECTIVE OF THE COURSE 1-Objective of this course is to make students familiar with the concepts of object-oriented programming. 2-Write Highly Quality Code. 3-Understand and recognize proper programming style and demonstrate making design decisions consistent with Object Oriented methodologies. 5/18/2019 BY:HIRA FARMAN
ONE RULE OF THE COURSE: LEARN BY DOING BY:HIRA FARMAN
The Creation of C++: BY:HIRA FARMAN
C++ Family Tree: C C++ C# Java 5/18/2019 BY:HIRA FARMAN
CREATION OF C-LANGUAGE: C was invented by Dennis Ritchie in the 1970s at Bells Laboratory. DEC PDP-11 that used the UNIX operating system. 5/18/2019 BY:HIRA FARMAN
CREATION OF C++: C++ was invented by Bjarne Stroustrap beginning in 1979 at bell laboratories in Murray hill, New Jersey. Initially called the new language “C with Classes.” In 1983 the name was changed to C++. C++ contains the entire C language that’s why “C with Class”. C++ runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. 5/18/2019 BY:HIRA FARMAN
5/18/2019
5/18/2019
5/18/2019
CREATION OF C#: C# was developed by Andres Hejlsberg and his team at Microsoft 5/18/2019
JAVA: Java, which was originally called Oak, began in june 1991 at Sun Microsystems. James Gosling Patrick Naughton Chris Warth Ed Frank Mike Sheridan 5/18/2019 BY:HIRA FARMAN
INTRODUCTION TO PROGRAMMING IN C++
Prerequisites: Before you start doing practice with various types of examples given in this reference, I'm making an assumption that you are already aware about what is a computer program and what is a computer programming language? 5/18/2019
INTRODUCTION: A program is a sequence of instructions for a computer to execute. Every program is written in some programming language. The C++(Pronounced “see-plus-plus”) language is one of the newest and most powerful programming languages available. It allows the programmer to write efficient ,structured, object oriented programs. 5/18/2019
Need for a New Language: Introduced C++ as a new programming language to address the problems posed by traditional languages. It is a completely new platform for developing the next generation of Console Application 5/18/2019 BY:HIRA FARMAN
The focus of Oop language is not on structure but on modeling data. 5/18/2019 BY:HIRA FARMAN
Programmers code using “blueprints” of data models called classes. 5/18/2019 BY:HIRA FARMAN
Use of C++: C++ is used by hundreds of thousands of programmers in essentially every application domain. C++ is being highly used to write device drivers and other software's that rely on direct manipulation of hardware under real-time constraints. Anyone who has used either an Apple Macintosh or a PC running Windows has indirectly used C++ because the primary user interfaces of these systems are written in C++. 5/18/2019
Standard Libraries: Standard C++ consists of three important parts: The core language giving all the building blocks including variables, data types and literals, etc. The C++ Standard Library giving a rich set of functions manipulating files, strings, etc. The Standard Template Library (STL) giving a rich set of methods manipulating data structures, etc. 5/18/2019
WHAT IS OOP: OOP allows decomposition of a problem into a number of entities called objects and then builds data and functions around these objects. The software is divided into a number of small units called objects. The data and functions are built around these objects. The data of the objects can be accessed only by the functions associated with that object. The functions of one object can access the functions of another object. 5/18/2019 BY:HIRA FARMAN
Where’s C++ used. C# is used across many applications Where’s C++ used? C# is used across many applications. Let’s look at the scope of the language in the industry today BY:HIRA FARMAN
Adobe system Game Engines:. Google Apple Image system Backend Service:. 5/18/2019 BY:HIRA FARMAN
DISCUSSION : BY:HIRA FARMAN
5/18/2019
What is Object-Orientation? A technique for system modeling. OO model consists of several interacting objects 5/18/2019 BY:HIRA FARMAN
What is a Model? A model is an abstraction of something. Purpose is to understand the product before developing it . 5/18/2019 BY:HIRA FARMAN
Examples –Model Highway maps Architectural models Mechanical models 5/18/2019 BY:HIRA FARMAN
5/18/2019 BY:HIRA FARMAN
Example – OO Model Interactions Objects Abu Bakar drives House Car Tree Interactions Abu Bakar lives in the house Abu Bakar drives the car 5/18/2019 BY:HIRA FARMAN
Object-Orientation – Advantages: People think in terms of objects. OO models map to reality. Therefore, OO models are : easy to develop easy to understand 5/18/2019 BY:HIRA FARMAN
What is an Object? An object has: State (attributes) Well-defined behaviour (operations) Unique identity 5/18/2019 BY:HIRA FARMAN
Example –Ali is a Tangible Object State (attributes) -Name -Age behaviour (operations) -Walks -Eats Identity -His name 5/18/2019
Example – Car is a Tangible Object: State (attributes) - Color -Model behaviour (operations) - Accelerate - Start Car Change Gear Identity - Its registration number 5/18/2019
In order to clearly understand the object orientation model: let’s take your “hand” as an example. The “hand” is a class. Your body has two objects of the type "hand", named "left hand" and "right hand". Their main functions are controlled or managed by a set of electrical signals sent through your shoulders (through an interface). So the shoulder is an interface that your body uses to interact with your hands. The hand is a well-architected class. The hand is being reused to create the left hand and the right hand by slightly changing the properties of it. 5/18/2019
5/18/2019 BY:HIRA FARMAN
REFERRENCES: http://www.developer.com/net/asp/article.php/922211/What-is- C.htm http://www.digit.in/software/learn-c-tutorial-c-sharp-basics- 28516.html 5/18/2019
SUMMARY # 1: Why OOP? Write 10 points on C#. 5/18/2019