|Time :|| Tuesday
11:15-14:00, 14:15-16:55, 17:05-19:40
|Place :||Laboratory 127L / C-3|
|Instructor :||Marek Piasecki|
|Tutor.hrs :||Thursday 13:00-15:00, room: 321/C-3|
Introduction, Simple console programs
|Overview of the program and the organization of the
laboratory classes. Workplace training in health and safety. Writing
algorithms using flowcharts language.
Setting up development environment (e.g. Windows / Falcon C++ / Visual Studio or Linux/Emacs/gcc). An example of a console program using simple variables, assignment statements, and console input output operations. Editing, compiling, running and debugging the program. Guidelines for the use of integrated office packages for creating the technical documentation and reports on the implementation of laboratory tasks.
|Lab.02 - Data types, math expressions, I/O streams, flow control: if/else|
|Representation of standard data types in C. Appropriate
selection of the data type for variables. Data representation
constraints. The dialogue with the user using standard printf and scanf
functions. Formatting data (construction of format strings containing
different control sequences). Calculating mathematical and boolean
expressions in C/C++.
Exercises with the creation of example programs illustrating the use of basic C/C++ constructs and concepts: assignment, conditional branching (if, if-else), selection (switch, case, break, default). Nesting branching instructions.
- Flow control: Loops, switch
|The concept of iterations. The role and selection of the
control variables for the loop. Loop breaking constructs (while,
do-while, for). The equivalence of the loop.
- The sum of these numbers exceeds 100,
- The number of reported negative numbers exceed 10,
- Two following numbers will have the same value (e.g. 3, 4, 2, 5, 5 )
|Continuation of exercises with programs illustrating the use
The idea of iterative algorithm: counting, summing, searching the maximum and minimum, calculation of the mathematical series, etc.
|Exercises with the creation of programs that illustrate the
use of the array data representation. Processing arrays using a loop.
Basic array processing algorithms (filling, comparing items, search,
move, delete, add items).
- Functions (1)
|Structured and procedural programming. Sub-division of tasks
into functions, the concept of program menu. Visibility range and
overriding the identifiers. Exercises with creating user-defined
functions. Parameterless functions. Local variables. Passing parameters
through global variables. The functions with explicit argument list.
Passing arguments by value, reference and address.
- Functions (2) and array algorithms
|Dynamically allocated arrays (array with a counter of used items). Selected
algorithms for processing arrays: linear and binary search, bubble sort
and insertion sort. Parameterization of algorithms. Appropriate
selection of the method for passing input/output parameters between the
- Text processing - Strings
|Text processing functions. Code analysis of the standard
functions from <string.h> library. User-defined functions for
character string processing.
- Strings, Pointers, Dynamic memory allocation
accessing the variables (the memory) through pointers.
Continuation of exercises with the creation of programs illustrating the processing of textual data, represented as an array of characters.
Dynamic allocation and reallocation of one-dimensional arrays on cheap.
Debugging and testing the correctness of the programs.
|Implementing simple in-memory database using representation
in the form of an array of structures (or array of pointers to dynamic
structures). Implementing the functionalities of: adding, updating, deleting, searching the database elements.
|Exercises with data storage in external memory using file
streams. Text and binary representation of numerical data. Error
detection during file stream input / output operations. Controlling the
location of the file position indicator. Basic algorithms for
sequential processing of text and raw binary files. Export/import of
numeric and text data in the format accepted by popular office spreadsheet environments (for example Excel).
- Complex data structures
|Completing the overdue / not elaborated parts of laboratories number 10 and 11:
Lab 10.c - options to display / update / filter the content of database (array of struct)
Lab 11.e - option to store the database in external disk file,
- option to load the database content from the external disk file.
The structural decomposition of large programs and complex data representation. Discussion and practice the representation of simple in-memory database (using an array of structures). User defined data type, enumeration. Encoding data using the dictionary.
- Dynamic data structures
User-defined implementation of selected dynamic data structure: the linked list, queue, priority queue or a tree. Exercises with creating programs using recursion.
- Automation of office suites
|Utilizing standard business office suites. Exercises with
formatting techniques of technical documents and performing engineering
calculations using spreadsheets. Automation of work by programming new
functions and macros.
- Repetition / Final Assessment
|Repetition and additional assessment for students who have
absences or overdue tasks