• Complain

Tatyana Sopronyuk - Object-oriented programming in C++

Here you can read online Tatyana Sopronyuk - Object-oriented programming in C++ full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2014, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Tatyana Sopronyuk Object-oriented programming in C++

Object-oriented programming in C++: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Object-oriented programming in C++" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

The textbook is intended to be used in the computer science course of Object-oriented programming in C++. It contains all the information needed for completing assignments and labs.
The textbook consists of 5 parts. At first we consider the possibilities of C++, which did not exist in the language C and which dont refer directly to the notion of classes, in particular, stream input/output, operators of dynamic allocation of memory and setting it free, overloading of functions, template functions. Further, we passed over from the notion of structure in the language C to the notion of the class. We described the operations of the construction of the class and its elimination, static members of the class, friendly functions, interface and realization of the class, overloading of operators for the objects of the given class, templates of classes and friendly ones.
We have also considered means of using created classes (aggregation and inheritance) for the extending possibilities of existing classes and the notion of the base and derivative classes, multiple inheritance, building of the hierarchy of classes, usage of virtual functions, abstract classes, polymorphic functions, virtual inheritance.
In every part of the textbook we have given examples of programs with comments, demonstrating suggested theoretical material. Every part ends with the questions for self-control and tasks for independent work with the demonstrated programs.
At the end of the textbook we have introduced the mandatory assignments for the course OOP in C++. In order to help the students the textbook demonstrates codes of similar programs for all the types of assignments.
Each of six topics of this manual contains 10 different tasks. Considerably more tasks can be found in the collection of the tasks 150 C++ Programming Assignments. Variants of tasks & Examples of the code (http://amzn.com/B012V8HFAG).
This textbook is intended for educational purposes.

Tatyana Sopronyuk: author's other books


Who wrote Object-oriented programming in C++? Find out the surname, the name of the author of the book and a list of all author's works by series.

Object-oriented programming in C++ — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Object-oriented programming in C++" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make

OBJECT-ORIENTED PROGRAMMING IN C++ ATYANA SOPRONYUK

Originally published in Ukraine, Chernivtsy, 2014
Translated by Nonna Shulga Copyright 2014 Tatyana Sopronyuk All rights reserved. ISBN-10: 1502520907 ISBN-13: 978-1502520906 Fragment of this book free TABLE OF CONTENTS FOREWORD Elements of object-oriented programming 1.1. Object. Class. Structure 1.2. Standard objects of the stream input/output 1.3.

Overloading operations for the types struct, union and enum 1.4. Overloading of functions 1.5. Example of operators overloading for two structural types 1.6. Templates of functions 1.7. Example of overloading functions and usage of function templates Questions for self-control Tasks for independent work 2. Work with the objects within one class 2.1.

Operating access to the members of the class 2.2. Constructors 2.3. Static members of the class 2.4. Destructors 2.5. Dynamic creation and deleting of objects 2.6. Friends of the class 2.7.

Overloading operations for classes 2.8. Binary and unary operations 2.9. Assignment operator 2.10. Operators of the call , indexing and type conversion 2.11. Overloading of the operator new and delete 2.12. Example of the elaboration of the class Set of the Integer Numbers Questions for self-control Tasks for the independent work 3.

Creation of new classes using the existing ones 3.1. Building classes with member-objects 3.2. The templates of the classes 3.3. Inheritance 3.4. Hierarchy of classes inheritance Unary inheritance 3.5. Transformation of the pointers on the objects from one hierarchy of classes 3.6.

Transformation of the types for the objects from one hierarchy of classes 3.7. Multiple inheritance Questions for self control Tasks for independent work 4. Elaboration of family classes. Abstraction 4.1. Static and dynamic polymorphism 4.2. Virtual functions 4.3.

Abstract classes 4.4. Projecting and building the class library with virtual functions 4.5. Polymorphic functions 4.6. Virtual inheritance Questions for self-control Tasks for the independent work 5. Assignments Assignment 1. Structures.

Outer functions and member-functions of the structure Assignment 2. Overloading of operations and functions. Functions templates Assignment 3. Structures and classes Assignment 4. Creation of classes Assignment 5. Creation of classes, implementing the existing classes.

Inheritance. Aggregation Assignment 6. Abstract classes LIST OF LITERATURE

FOREWORD
Object-oriented programming or OOP is methodology of programming, based on the concept that a program can be created as a collection of objects working together. This methodology focuses on the connections between objects rather than the details of their realization. All the OOP languages, especially C++, are based on three main ideas: encapsulation, polymorphism and inheritance [13, 18, 19, 22-26, 28]. Encapsulation is a mechanism linking in one construction the data and the code, which manipulates with these data.

Encapsulation also defends the part of the functions and data against the outer intrusion or wrong usage. In object-oriented programming, functions and the data with which they operate, can be linked into one whole. Such a union creates a class type. In C++ encapsulation is realized with the help of classes. Encapsulation insures the protected capsule against outer functions. Access to the code and data within the capsule is controlled by an interface which is given to the user.

Thus, class is a capsulated abstraction with the strictly defined rules of the access to the separate sections. Object is a variable of the class type (instance of the class). Object supports encapsulation. Within the object both codes and data can be private . Private codes or data are accessible only for other parts of these objects. Thus, private codes and data are not accessible for those functions existing outside the object.

If codes and data are open, then even if they exist within the object, they are accessible for other parts of the program. As a rule, the open part of the program is used in order to insure the controlled access to the private elements of the object. The object unites the codes and the data and is a variable of the class type, defined by the user. Polymorphism (from the Greek polymorphos) is a peculiarity which allows using the same words to denote several tasks, identical by the content but different as to their realization. The purpose of polymorphism, according to OOP, is the usage of one name for the task of the actions, general for the class. The exertion of every concrete action will be defined by the type of the data.

The types of the data, used as arguments at the calling of functions , denote how the concrete version of the function is really called. Thus, in C++ it is possible to use one name of the function for the realization of different actions. Such a possibility is called function overloading . The overloading of functions is one of the forms of polymorphism In more general sense the concept of polymorphism means that it is possible to create general interface for the groups, common by the content and not by the realization of actions. The advantage of polymorphism is the fact that it allows using one interface for the task of the only type of actions and makes it impossible lowering the complexity of programs. The choice of the concrete action, depending on the situation, is exerted by the compiler.

It is enough to use only the general interface. Polymorphism is also used for the operators. In fact polymorphism in the language C is used limited, in particular, in arithmetic operators. For example, the symbol + is used for the adding of integer, long integer and real numbers. In this case the compiler automatically defines which type of arithmetics is necessary. It is also possible in the language C++ to use this conception for other types of the data, put forward by the user.

So, the symbol + may be used for the exertion of the operation by adding complex numbers. For this it is necessary to define the corresponding operators function. This type of polymorphism is called overloading of operators . The main thing in polymorphism is the fact that it allows to manipulate with the objects of different complexity by means of creating for them general standard interface for the realization of identical actions. The inheritance is a process with the help of which one object acquires the peculiarities of the other one. To be more exact, the object can inherit the peculiarities of the other object and add to them features, characteristic only for its own.

Inheritance allows supporting a concept of the hierarchical classification . Without its usage for every object it would have been necessary to introduce all characteristics which would have defined it completely. By using inheritance it is possible to describe the object, indicating the general class (the family base or ancestor class) to which it belongs and those specific features that makes the object unique. The generated class inherits all the features, linked with the parent base and adds to them its own specifics characteristics. Inheritance plays the determining role in OOP. The textbook supplies the students with all the information needed in the course Object-oriented programming.

The textbook consists of 5 parts. At first we consider the possibilities of C++, which did not exist in the language C and which dont refer directly to the notion of classes, in particular, stream input/output, operators of dynamic allocation of memory and setting it free, overloading of functions, template functions. Further, we passed over from the notion of structure in the language C to the notion of the class. We described the operations of the construction of the class and its elimination, static members of the class, friendly functions, interface and realization of the class, overloading of operators for the objects of the given class, templates of classes and friendly ones. We have also considered means of using created classes (aggregation and inheritance) for the extending possibilities of existing classes and the notion of the base and derivative classes, multiple inheritance, building of the hierarchy of classes, usage of virtual functions, abstract classes, polymorphic functions, virtual inheritance. In every part of the textbook we have given examples of programs with comments, demonstrating suggested theoretical material.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Object-oriented programming in C++»

Look at similar books to Object-oriented programming in C++. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Object-oriented programming in C++»

Discussion, reviews of the book Object-oriented programming in C++ and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.