View Notes – Opp’s Notes(1).doc from CSE at Anna University Chennai – Regional Office, Coimbatore. CS OBJECT ORIENTED PROGRAMMING 3 0 . Anna University CS Object Oriented Programming Department of Computer Science Engineering and Information Technology (Regulation. Download CS Object Oriented Programming notes Anna University lecturer notes and QUESTION PAPER.
|Published (Last):||15 January 2012|
|PDF File Size:||5.57 Mb|
|ePub File Size:||2.59 Mb|
|Price:||Free* [*Free Regsitration Required]|
We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system.
CS2203-OBJECT ORIENTED PROGRAMMING
Share buttons are a little bit lower. Published by Rosa Ryan Modified 6 months ago. Unit I Object oriented programming concepts — objects — classes — methods and messages — abstraction and encapsulation — inheritance — abstract classes — polymorphism. Unit IV Inheritance — public, private, and protected derivations — multiple inheritance — virtual base class — abstract class — composite objects Runtime polymorphism — virtual functions — pure virtual functions — RTTI — typeid — dynamic casting — RTTI and templates — cross casting — down casting.
Lippman, Josee Lajoie, Barbara E. Objects have State have a value at a particular time Objects have Operations associated set of operations called methods that describe how to carry out operations behavior Objects have Messages request an object to carry out one of its operations by sending it a message messages are the means by which we exchange data between objects.
Whatever we can see in this world all the things are a object. And all the objects are categorized in a special group. That oriened is termed as a class. Class has many other features like creation and implementation of the object, Inheritance etc.
Tells the object what to do with itself Example: To change the channel on TV — We use the channel selection buttons ,This sends a message that we want to select a new channel — The TV responds to the message by selecting and executing a method. Combining data structure with actions Objcet structure: Process of making certain data inaccessible Inheritance: Ability for different objects to interpret functions differently.
Both data and member functions treated as single unit 2. Abstract focuses on behavior of object, encapsulation focuses on actual implementation 3. Orkented achieved through data hiding 4. For abstractions to work, implementations must be encapsulated. Data Encapsulation or Information Hiding is the concealing of the implementation details of a data object from the outside world. Data Abstraction is the separation between the specification of a data object and its implementation.
A data type is a collection of objects and a set of operations that act on those objects. An abstract data type ADT is a data type that is organized in such a way that the specification of the objects and the specification of the operations on the objects is separated from the representation of the objects and the implementation of the operation.
By use of inheritance, an object need only define all of its characteristics that make it unique within its class, it can inherit its general attributes from its parent. Public Private Protected Public: Defining function members outside class very simple progrmming define functions outside class If the functions are big—define outside Static data members of class Static members are stored at a location where they are retained throughout the execution of the program and are not stored with class objects.
Stored only as a single copy— similar to member functions. All the static data members are initialized to zero at the time of declaration. SetMarks Xmarks ; Programing. SetMarks Ymarks ; X. Once an argument is defaulted in a function call, all the remaining arguments must be defaulted. A friend function is used prograkming accessing the non-public members of a class. A class can allow non-member functions and other classes to access its own private data, by making them friends.
Thus, a friend function is an ordinary function or oject member of another class. The friend function is written as obhect other normal function, except the objdct declaration of these functions is preceded with the keyword friend. The friend function must have the class to which it is declared as friend passed to it cs2230 argument.
Some important points The keyword friend is placed only in the function declaration of the friend function and not in the function definition. It is possible to declare a function as friend in any number of classes. When a class is declared as a friend, the friend class has access to the private data of the class that made this a friend. It is possible to declare the friend function as either private or public.
The orientsd can be invoked without the use of an object. If the body of the const function contains progamming statement that modifies the invoking object, the program does not compile. One exception here is the mutable member. A mutable data member can be modified by const function.
Declare a member function with the volatile specifier to ensure that it can be called programing for a volatile object: Calling a non-volatile member function from this object is unsafe, because b’s state might have been changed by a different thread in the meantime. To ensure that f can be called safely for a volatile object, it’s declared volatile too.
CS OBJECT ORIENTED PROGRAMMING| – cse studies
Line 1 — x is an integer, give it value 10 Line 3 — p gets the address of x. But you have to think about pointers. Object pointers are useful in creating objects at run time. We can also create priented array of objects using pointers. A constant object can call only constant member functions. From this we can understand that an object can be collection of many other objects, that is a class can contain objects of other classes as its members.
CS OBJECT ORIENTED PROGRAMMING – ppt download
This kind of relationship is called containership or nesting. Such classes are called local classes.
Enclosing function cannot access the private member of a local class. In OOP, programmers see the execution of the program as a collection of dialoging objects.
The main characteristics of OOPL include encapsulation, inheritance, and polymorphism.
CS2203 OBJECT ORIENTED PROGRAMMING
My presentations Profile Feedback Log out. Auth with social network: Registration Forgot your password?