Time : | Wednesday 16:30; Thursday 11:15; 13:45, 16:15 |
Place : | Laboratory L2.3/C-16 |
Instructor : | Marek Piasecki |
Tutor.hrs : | will be announced in the second week of the semester |
Lecture : | https://marek.piasecki.staff.iiar.pwr.wroc.pl/dydaktyka/itp |
Lab.00 / .01
-
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. 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. Laboratory tasks:
|
Lab.03
- 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. Laboratory tasks:
- 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 ) |
Lab.04
- Iteration |
Continuation of exercises with programs illustrating
the use
of loops. The idea of iterative algorithm: counting, summing, searching the maximum and minimum, calculation of the mathematical series, etc. Laboratory tasks:
|
Lab.05
- Arrays |
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). Laboratory tasks:
|
Lab.06
- 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. Laboratory tasks:
|
Lab.07
- 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
functions. Laboratory tasks:
|
Lab.08
- Text processing - Strings |
Text processing functions. Code analysis of the
standard
functions from <string.h> library. User-defined functions
for
character string processing. Laboratory tasks:
|
Lab.10
- Dynamic data structures (Pointers
and begin of
Dynamic memory allocation) |
Exercises with
accessing the variables (the memory) through pointers. Dynamic allocation and reallocation of one-dimensional arrays on cheap. Debugging and testing the correctness of the programs. Laboratory tasks:
|
Lab.11
- Structures |
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. Laboratory tasks:
|
Lab.12
- Files |
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). Laboratory tasks:
|
Lab.13
- Complex data structures |
Lab 12.e - option to store the database in external disk file, - option to load the database content from the external disk file. User-defined implementation of selected dynamic data structure: the linked list, queue, priority queue or a tree. Exercises with creating programs using recursion.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. |
Lab.14
- Automation of office suites |
Utilizing standard business office suites. Exercises
with
advanced
formatting techniques of technical documents and performing engineering
calculations using spreadsheets. Automation of work by programming new
functions and macros. |
Lab.15
- Repetition / Final Assessment |
Repetition and additional assessment for students who
have
absences or overdue tasks |