The course is focused on the understanding of object-oriented paradigm and the mastering of basic C++ constructions necessary for design and implementation of a simple object-oriented program.

Object oriented programming - full-time study

doc. Mgr. Miloš Kudělka, Ph.D.

Introduction:
organization, topics, tasks

PDF

Basic information on lectures, topics, and requirements for credit.

Example of a simple class as a building block of an object-oriented program.

Project assignment

PDF

Implementation of a simple program

A custom object design is assumed.

Modularity

PDF

History of programming paradigms focusing on software quality and scope. Modularity as an internal quality factor.

A simple class with composition and its usage focused on construction and destruction of objects.

Classes and Objects

PDF

General characteristics of object-oriented paradigm focused on object language, support of implementation and use of libraries.

A class containing a dynamic array of objects of another class, constructor and destructor.

Design of Program I

PDF

Design of an object-oriented program with three classes and simple compositions. Analysis of the problem, its design and declaration of classes.

Declaration of classes without definitions. The implementation will be done as individual work.

Object Decomposition
Class as Object

PDF

Relationship between functional and object decomposition of a program. Class as an object and examples of its use.

Implementation of simple examples in which the class behaves like an object.

Inheritance: Introduction

PDF

Reasons to use inheritance, an extension of behavior, substitution as a basic principle. A task to divide the class into parent and child.

Reimplementation of program using an extension.

Inheritance:
Change of Behavior

PDF

Class behavior change, the difference between overloading and overriding/shadowing. Substitution principle. Using "protected" to change implementation.

Reimplementation of program using shadowing.

Polymorphism

PDF

Extension of a class using polymorphism. The difference between shadowing and overriding, virtual methods. Virtuality and substitution principle, replacement of implementation.

Reimplementation of a program using overriding.

Abstract Class
Multiple Inheritance

PDF

Abstraction as a basic principle of inheritance. Pure virtual method, abstract and pure abstract class. Multiple inheritance.

Reimplementation of a program using abstract and pure abstract class.

Design of Program II

PDF

Design of program using techniques associated with inheritance. Deciding when to use inheritance.

Analysis of the task and projection into inheritance hierarchies of classes.

Genericity

PDF

Genericity as a tool using class (type) as a parameter. Generic parameter, generic class, specific class substituted for a generic parameter.

Implementation of a simple program with genericity.