Basics of Programming 2
VIAUAA01 | Electrical Engineering BSc | Credit: 6 | Official course details
Objectives, learning outcomes and obtained knowledge
This course, as a basic BSc course based on the previous term, continues the exposition of methods and tools of computational problems. The main goal is an introduction of object-oriented programming. Based on the C programming language skills, the object-oriented techniques are introduced with the help of C++ programming language. The curriculum of computer laboratories continuously follows the lectures
Synopsis
1. C++ as a Revised Version of C
Recapitulation of curriculum provided in the previous term. Reference type.Function name overload. Default function parameters. Inline functions instead of macros. Constants and constant parameters.2. Fundamentals of the Object-Oriented Programming in C++
Principles of object-oriented programming, the concept of the object. Concepts of class, encapsulation, visibility, and information hiding.Constructors and destructors. Dynamic memory management: new, new[], delete, delete[]. Maintaining dynamic attributes.Attribute initialization. Constants and static members. Mitigation of visibility: friend mechanism. Namespaces. Introduction into C++ I/O.Concept of operator overloading. Realizing operator overloading with local operations and global operations. Restrictions.The role of the inheritance in object-oriented programming. Inheritance, derived class, base class. Influence of inheritance on visibility. Constructors and inheritance.Replacement possibilities. Virtual functions, abstract classes. Restricting inheritance. Virtual destructors.Multiple inheritance, virtual base classes. Automatic tasks of constructors and destructors.Type conversion. C++ conversion operators. Casting.Exception handling.The role of the generic data structures. Function and class templates.Standard Template Library (STL): containers and algorithms. Complexity considerations.