Course detail

Computers and Programming 2

FEKT-BPC-PC2SAcad. year: 2023/2024

The subject is aimed at gaining the skills of algorithmization and structuring of the given task. Students also learn to choose a suitable environment for its implementation.

Students will gain the basics of programming in the C/C++ language, and students will gain practical experience in the implementation of tasks in the Dev C++ environment.

The second part of the course is focused on the philosophy of programming in the MATLAB environment, which is mainly aimed at the ability to independently create and debug a function for loading, processing, visualizing and saving data.

The third part of the course is devoted to visual programming in the LabView environment. The basic principles of implementing algorithms in this environment and linking to the user interface of the application are presented. 

Content:

The 1st part (weeks 1-4): C/C++ language - console application, commands, data types, variable, array, input and output, cycle commands, conditional commands, creating your own function, function libraries, passing parameters. 

2nd part (weeks 5-8): MATLAB - recapitulation of programming basics, overview of libraries for electrical engineering and power engineering, advanced programming, Simscape Power Systems.

3rd part (weeks 9-13): LabView – user interface, application creation, basic libraries, data structures, subprogram creation, use in energy. 

Language of instruction

Czech

Number of ECTS credits

5

Mode of study

Not applicable.

Entry knowledge

The subject knowledge on the secondary school level is required.

 Further the basic knowledge of working with files in the Microsoft Windows environment is desirable.

Rules for evaluation and completion of the course

Classified credit:

1st part: C/C++ language - max. 33 points. There are 4 individual assignments in the exercises with a maximum of 6 points each and 9 points from the final test. The student must submit 4 completed assignments and obtain at least 4 points from the final test.

2nd part: Matlab - max. 33 points,

3rd part: LabView - max. 34 points (min. 10). The scoring in this part is divided between separate tasks and a final test. There are 4 separate tasks in the exercises, with a maximum of 6 points each. The final test is rated for a maximum of 10 points. Completion of the test is mandatory for credit, and the minimum number of points from this part is 10. Separate tasks are focused on the application of the knowledge gained in the given computer exercise. The test is focused on orientation and knowledge in the field of LabVIEW programming environment, algorithmization of tasks and implementation of basic functions.

Each teacher will introduce students to the conditions for obtaining points at their first lecture/exercise. 

 

Aims

The aim of the course is to teach students general programming habits and algorithmization of tasks. Different programming languages and development environments are presented during the lesson, which can be used in further study. A graduate of the course should be able to choose a suitable tool according to the type of task being solved and implement basic algorithms.

1st part - C/C++ language: A graduate of the course is able to explain the function of C language commands, describe the properties of basic data types, use functions included in standard libraries, compile an algorithm working with one-dimensional and multi-dimensional arrays, create a program in a console application using custom functions.

2nd part - MATLAB: The student acquires the basic skills necessary to create a function/code that fulfills a specific goal. The mastered process includes the following basic phases: loading or generating input data, processing input data and their visualization using basic Matlab functions, saving and managing results in files. The result of learning will also be the ability to continuously verify and debug the developed code using the basic tools of the Matlab environment.

3rd part - LabView: The student obtain the basic knowledge of the environment of LabView and is able create a simple application.

 


Study aids

Not applicable.

Prerequisites and corequisites

Not applicable.

Basic literature

DOŇAR, B., ZAPLATÍLEK, K. MATLAB - tvorba uživatelských aplikací. BEN, 2004. (CS)
HAVLÍČEK, J., VLACH, J., VLACH, M., VLACHOVÁ, V. Začínáme s LabVIEW. BEN, 2008. (CS)
HEROUT, P. Učebnice jazyka C. KOPP, 2004. (CS)
KARBAB, P. Výpočty a simulace v programech Matlab a Simulink. COMPUTER PRESS, 2006. (CS)
PROKOP, J. Algoritmy v jazyku C a C++. Praha: Grada Publishing, 2008. (CS)
STROUSTRUP, B. The C++ Programming Language, 4th Edition, Addison-Wesley, 2013. (EN)

Recommended reading

Not applicable.

Elearning

Classification of course in study plans

  • Programme BPC-SEE Bachelor's 1 year of study, summer semester, compulsory

Type of course unit

 

Lecture

26 hod., optionally

Teacher / Lecturer

Syllabus

1. Algorithmization (extensions of basic knowledge from the previous semester). Definition of the task, the definition of inputs / outputs, expressing
an algorithm in meta-language, rewritting into programming language.
2. Introduction to C language. Basic types of variables, derived types, constants, arrays.
3. Expressions, arithmetic conversions, arithmetic operators, shift operators, relation operators, logical operators, bitwise operators, assignment
operators, operator priority.
4. Strings and their operators, library functions, standard library string.h.
5. Commands, compound statements, branching commands, cycles and control commands. Flowchart.
6. Function. Declaration of functions, methods of function calling, treatment events, recursion of functions.
7. Advanced data types. Union, enum, dynamic variable, pointer.
8. Objects. Lexical elements, constants and strings, classes, objects, object types.
9. User interface of Microsoft Visual C++ Studio. Graphical components.
10. Algorithms I. Finding maxima and minima, sorting.
11. Algorithms II. Programming with arrays, matrices operations.
12. Algorithms III. Programming with files in Windows.
13. Algorithms IV. Database systems. Records, sorting, searching, statistics. Linking of databases.

Exercise in computer lab

26 hod., compulsory

Teacher / Lecturer

Syllabus

1. Algorithmization (extensions of basic knowledge from the previous semester). Definition of the task, the definition of inputs / outputs, expressing
an algorithm in meta-language, rewritting into programming language.
2. Introduction to C language. Basic types of variables, derived types, constants, arrays.
3. Expressions, arithmetic conversions, arithmetic operators, shift operators, relation operators, logical operators, bitwise operators, assignment
operators, operator priority.
4. Strings and their operators, library functions, standard library string.h.
5. Commands, compound statements, branching commands, cycles and control commands. Flowchart.
6. Function. Declaration of functions, methods of function calling, treatment events, recursion of functions.
7. Advanced data types. Union, enum, dynamic variable, pointer.
8. Objects. Lexical elements, constants and strings, classes, objects, object types.
9. User interface of Microsoft Visual C++ Studio. Graphical components.
10. Algorithms I. Finding maxima and minima, sorting.
11. Algorithms II. Programming with arrays, matrices operations.
12. Algorithms III. Programming with files in Windows.
13. Algorithms IV. Database systems. Records, sorting, searching, statistics. Linking of databases.

Elearning