Course detail

Basics of Programming in C++

FEKT-BPC-PPCAcad. year: 2023/2024

Learn basic constructs of programming in C ++ and practice them. Constructs for program construction in C ++ will be introduced and explained: Non-object properties, objects (access rights, member data and functions, this, constructors, destructors, operators), inheritance, templates, streams. Basic work with standard libraries.

Language of instruction

Czech

Number of ECTS credits

6

Mode of study

Not applicable.

Entry knowledge

Attend BPC-UDP course and pass BPC-ALD course or similar.

Rules for evaluation and completion of the course

Based on activities in exercises - tests - up to 40b.
Credit is awarded for achieving 17 or more points from the exercises.
Final exam - up to 60b.


The content and forms of instruction in the evaluated course are specified by a regulation issued by the lecturer responsible for the course and updated for every academic year

Aims

The aim is to learn basic programming skills in the field of object-oriented programming and programming practices in C ++.
The graduate is able to:
- use non-object C language extensions
- design a program using basics of object-oriented programming
- design and use the objects
- basic orientation in object-written programs,
- write an object-oriented program with basic use of inheritance, including virtual functions,
- use streams for I / O operations,
- create simple templates, use exceptions.

Study aids

Not applicable.

Prerequisites and corequisites

Basic literature

RICHTER, Miloslav, PETYOVSKÝ, Petr, HORÁK Karel a KALOVÁ Ilona. Praktické programování v CPP SL. Elektronické texty. Brno: 2004. (CS)
STROUSTRUP, B.: A Tour of C++, Addison Wesley, 2018, ISBN 9780134997834 (EN)
STROUSTRUP, B.: The C++ Programming Language. Addison-Wesley,2013. 1368 s. ISBN-13: 978-0321563842. (EN)
VIRIUS, M.: Jazyky C a C++. 2. , aktualizované vydání. Praha: Grada Publishing, 2011. 368 s. ISBN 9788024739175. (CS)
VIRIUS, M.: Programování v C++ od základů k profesionálnímu použití, Grada publishing, 2018, ISBN: 978-80-271-0502-1 (CS)

Recommended reading

Not applicable.

Elearning

Classification of course in study plans

  • Programme BPC-AMT Bachelor's 3 year of study, winter semester, compulsory
  • Programme BPC-ECT Bachelor's 3 year of study, winter semester, compulsory-optional

Type of course unit

 

Lecture

26 hod., optionally

Teacher / Lecturer

Syllabus

1. Introduction to C ++, basic characteristics, comparison with C, overview of object programming properties
2. Object, class properties and its design. Namespaces. Working with memory.
3. Reference, const, constexpr, function call. Function overloading, default arguments.
4. this, methods, access specifiers.
5. Inline functions and member functions. Constructors and destructors. Life cycle of objects. The concept of visibility and reachability of a objects.
6. Operators.
7. Move semantics. Static members. Friend declarations.
8. Exceptions. Templates. auto type deduction. Decltype.
9. C ++ libraries for standard inputs and outputs; streams.
10. Inheritance and its properties.
11. Polymorphism. Abstract class and its use in object design.
12. RTTI. Smart pointers. Multiple inheritance. Modules.
13. Lambda function. Concepts. Coroutines. Threads. STL library. 

Exercise in computer lab

39 hod., compulsory

Teacher / Lecturer

Syllabus

Practicing the material covered in lectures in the form of examples.
1. Object basics. STL.
2. Object basics. STL.
3. Creating classes and methods. Overloading functions, working with references. Basics of inputs and outputs.
4. Constructors and destructors.
5. Operators.
6. Test 1.
7. Working with memory, using namespaces in programs. Exceptions.
8. Templates.
9. Standard inputs and outputs
10. Inheritance
11. Polymorphism
12. Lambda functions.
13. Test 2.

Elearning