• Complain

Tatyana Sopronyuk - 150 C++ Programming Assignments. Variants of tasks & Examples of Code

Here you can read online Tatyana Sopronyuk - 150 C++ Programming Assignments. Variants of tasks & Examples of Code full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2015, 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 150 C++ Programming Assignments. Variants of tasks & Examples of Code

150 C++ Programming Assignments. Variants of tasks & Examples of Code: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "150 C++ Programming Assignments. Variants of tasks & Examples of Code" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

The collection of tasks is an appendix to the teaching guidance (http://amzn.com/B00NZ6M7L6) Object-oriented programming in C++. It contains problems and samples of their solutions using C++ programming language.
Object-oriented programming is 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 are based on three main ideas: encapsulation, polymorphism and inheritance.
In C++ encapsulation is realized with the help of classes. Access to the code and data within the capsule is controlled by an interface which is given to the user.
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. 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 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.
The textbook consists of 6 parts. Every part contains variants of assignments, referring to the particular theme, and the examples of the code, meant to assist the student while writing the program. Codes contain the commentaries and the results of the work.
Themes, considered in the given collection, include overloading of functions and operators, template functions, work with the structural types, creation of classes (data-member, functions-member, constructions, destructor and itc.). We also suggest creating 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 the textbook we have introduced the assignments for the course OOP in C++.
This textbook is intended for educational purposes.

Tatyana Sopronyuk: author's other books


Who wrote 150 C++ Programming Assignments. Variants of tasks & Examples of Code? Find out the surname, the name of the author of the book and a list of all author's works by series.

150 C++ Programming Assignments. Variants of tasks & Examples of Code — 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 "150 C++ Programming Assignments. Variants of tasks & Examples of Code" 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

150 C++ Programming Assignments. Variants of tasks & Examples of the code ATYANA SOPRONYUK Originally published in Ukraine, Chernivtsy, 2014 Translated by Nonna Shulga Copyright 2015 Tatyana Sopronyuk All rights reserved. ISBN-13: 978-1515254065 ISBN-10: 1515254062
The collection of tasks is an appendix to the teaching guidance Object-oriented programming in C++ ( http://amzn.com/B00NZ6M7L6 ). It contains problems and samples of their solutions using C++ programming language. The textbook is intended to be used in the computer science course of Object-oriented programming in C++. The tasks, presented in the collection, covers fundamental concepts in object-oriented programming: objects, classes, and inheritance.

The purpose of the given collection is to teach how objects are instantiated from a class, and how new classes are inherited. It introduces constructors, public and private methods, abstract, base and inherited classes, hierarchy of classes, method overloading. In order to help the students the textbook demonstrates codes of similar programs for all the types of assignments. This textbook is intended for educational purposes. Sopronyuk T. N., 2015 150 C++ Programming Assignments.

Variants of tasks & Examples of the code : Textbook / Authored by Tatyana Sopronyuk, Translated by Nonna Shulga: CreateSpace, 2015. 73 p. ISBN-13: 978-1515254065 (CreateSpace-Assigned) ISBN-10: 1515254062 Picture 1 TABLE OF CONTENTS FOREWORD Assignment 1. Overloading of operations and functions. Functions templates Variants of the tasks Examples of the code Assignment 2. Structures.

Outer functions and member-functions of the structure Variants of tasks Examples of the code Assignment 3. Structures and classes Variants of the tasks Examples of the code Assignment 4. Creation of classes Variants of the tasks Examples of the code Assignment 5. Creation of classes, implementing the existing classes. Inheritance. Aggregation Variants of the tasks Examples of the code Assignment 6.

Abstract classes Variants of the tasks Examples of the code LIST OF LITERATURE

FOREWORD
Object-oriented programming is 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 are based on three main ideas: encapsulation, polymorphism and inheritance [13, 18, 19, 22-30]. In C++ encapsulation is realized with the help of classes. Access to the code and data within the capsule is controlled by an interface which is given to the user. 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. 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 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. The collection of tasks is an appendix to the teaching guidance [22] ( http://amzn.com/B00NZ6M7L6 ) Object-oriented programming in C++.

It contains problems and samples of their solutions using C++ programming language. The textbook consists of 6 parts. Every part contains variants of assignments, referring to the particular theme, and the examples of the code, meant to assist the student while writing the program. Codes contain the commentaries and the results of the work. Themes, considered in the given collection, include overloading of functions and operators, template functions, work with the structural types, creation of classes (data-member, functions-member, constructions, destructor and itc.). We also suggest creating 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 the textbook we have introduced the assignments for the course OOP in C++. Some assignments ( 2, 3 and 6) are based on the ideas from [11, 27]. Other assignments belong to the author [22, 23].

Assignment 1 . Overloading of operations and functions.
Variants of the tasks
To create the function, receiving the text (type char *) at the output and transforming it by creating: rejects the repeated spaces.
Variants of the tasks
To create the function, receiving the text (type char *) at the output and transforming it by creating: rejects the repeated spaces.

The function must return the number of rejected white spaces. To convey the text into the function by reference. To overload the operation "<<" the output of the changed string, in which to call the created function. To create the structure, defining the triangle on the surface. To overload the operations:

  • ++ shift of the triangle by 10 pixels to the right;
  • -- shift of the triangle by 10 pixels to the left;
  • < comparison of two triangles areas.
  1. To create the structure, defining the vector on the plane. To overload the operations:
  • ! calculation of the vector, received from the assigned by the turn to 90 degrees counter clockwise;
  • - calculation of the vector, contrary to the assigned and having the same length with it;
  • ++ normalization of vector.
To create the functions, inverting the arrays, consisting of the elements of the type int , double , and as well the function, inverting the words in the sentence in the reversed order.

To use the overloading of functions and create the template. To create the functions, comparing integers, strings of symbols, vectors norms and return.

  • , if the data is equal;
  • , if the first is more/longer, than the second ;
  • - , if the first is less/shorter, than the second .
To use the overloading of functions. To create the functions, printing the square roots from the real and complex number, the norm of the vector. To use functions overriding. To create the functions, finding the maximal array element, consisting of the elements of the type int , double , and as well the function, finding the maximal word length in the string (type char *).

To use functions overloading and create the function template. To define the operations "++", calculating the determinant of the matrix by Gauss method and vector norm. Overloading the operations <<, >> for the matrixes input and the output of the matrixes, transposed to them. Matrixes, rectangular in size nm with the integer and real elements. To use the templates. To define the operation of the logical subtraction of two lines of symbols S3=S1 - S2 .

Line S3 consists of the symbols, belonging to string S1 and not belonging to S2 . To take into account the number of identical symbols in both strings. To use the operators overloading. To define operations "+", "-", "*", "/" for a complex number. Test each operation separately. Calculate the expression z =( x+y )/( x - y )+ xy /( x+y ).

To use the operators overloading. To define operations "+", "-", "*" for the matrixes (nxn). Test each operation separately, compared with the results, obtained in the environment MathCad. Calculate the expression D=A*B+C*A - A*C . To use the operators overloading. To define operations "+", "-", "*" for the vectors of dimension n.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «150 C++ Programming Assignments. Variants of tasks & Examples of Code»

Look at similar books to 150 C++ Programming Assignments. Variants of tasks & Examples of Code. 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 «150 C++ Programming Assignments. Variants of tasks & Examples of Code»

Discussion, reviews of the book 150 C++ Programming Assignments. Variants of tasks & Examples of Code 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.