Step 2


After Step 2, you will be able to solve relatively complex problems using the programming logic’s all basic “building blocks”. Your programs should thus be able to show a varied use of sequence, selection and iteration, to achieve Flow control, which is the main theme of the step. Your choice of control structures shall be motivated with respect to efficiency of program code, but also regarding readability and understanding of the same. Your solution methods must adhere to the recommended standard or syntax, in order to promote a good programming style.


The step includes the theory of the end of Chapter 3 (p. 50 – 55), but mainly the content of chapter 4 in the course book.

Concepts that are covered:

  • More on terms and operators (end of chap. 3):
  • Arithmetic terms
  • Comparison operators and logical operators
  • The data type bool
  • Type castings
  • Flow structures (Chapter 4):
  • Selection
    • if-statement
    • nested if-statements
    • switch-statement
  • Iteration
    • for-statement
    • while-statement
    • do while
  • Jump-statements continue and break

Practical applications

The step has 16 scored lab assignments, among which you make own choices (by difficulty level and areas of interest), to achieve at least 6 lab points, which is the requirement for passing the step. Assignment 1 and 2, the 0-pointers, i.e. have complete solutions with comments available. Use them as a guideline to how the application code should look like. All instructions can be found in the pdf document Laboratory tasks to the right.

You, who want a greater challenge, may (in all steps) design and program an assignment of your own, which may qualify for a maximum of 6 points. The teacher reserves the right to determine how many points the solution meets. A “specification of requirements” on such a task could be that your work in all areas should meet Contents and Objectives of this step.

Remember – you are welcome to solve all tasks but should only submit solutions to at least achieve 6p. (The teacher’s time available for assessment doesn’t allow for more!) Then choose the tasks of best software quality and those highly “weighted”, to get the best assessment results.

Welcome to CoursePress

en utav Linnéuniversitets lärplattformar. Som inloggad student kan du kommunicera, hålla koll på dina kurser och mycket mer. Du som är gäst kan nå de flesta kurser och dess innehåll utan att logga in.

Läs mer lärplattformar vid Linnéuniversitetet

Student account

To log in you need a student account at Linnaeus University.

Read more about collecting your account

Log in LNU