Labs

1. Introduction

Introduction

Extended lab description: open here

2. Conditionals

Conditionals

Extended lab description: open here

Homework:

In class:

3. Loops

Loops

Extended lab description: open here

Homework:

  • Expand and improve the food scale program
    • Menu has to have 2 levels
      • First level chooses the product category (e.g. vegetables, fruits, …). Have at least 3 categories!
      • Second level chooses the product from that category. Each category has to have at least 3 products!
    • Show error messages for invalid input! Must support the following:
      • No product on scale / negative weight
      • Unknown category / category does not exist
      • Unknown product / product does not exist

In class:

4. Arrays

Arrays

Extended lab description: open here

Homework: Create a UML diagram that matches your week 3 lab task 2 behavior (cash register with loops).

  • Emphasis on correct modelling of loops
  • Code and UML must be logically identical, including order of operations
  • Turn extra attention to modelling the loop logic correctly – initializations, conditions, loop body etc.

In class:

5. Arrays continued

Arrays 2

Extended lab description: open here

Homework: Write a program based on the task description: Age classifier

In class:

  • Lab tasks are given under the extended lab description!
6. Sorting

Sorting

Extended lab description: open here

Home task:

  • Take the provided code here: post.c
  • The code is based on [algortm(8)].
  • Translate the algorithm from the code to UML in its entirety.
  • Each statement must have a worded out explanation what is being done!

In class:

7. Matrices

Matrices

Extended lab description

In class:

  • Slides: matrices
  • Starter codes and examples of the expected programs are in the extended lab description
8. Functions

Functions

Extended lab description

In class:

9. Functions 2

Functions 2

Extended lab description

In class:

10. Standard streams and stream redirection

Standard streams and stream redirection

Extended lab description

In class:

11. TEST
12. Linux CLI

Linux CLI

In class:

14. Command line arguments

Command line arguments

Extended lab description: open here

In class:

15. Files

Files

Extended lab description: open here

In class:

16. Assessment

No normal lab on this week.

During this class, it’s possible to

  • Write the assessment. You need to register to attend for it. Read more: assesment.
  • Write a re-test for the test.