Hide menu

TDDE79 Imperative programming in C++

Individual assignments


During the second study period of the semester you will be working on individual assignments. The purpose of these is to get you more comfortable with problem solving by solving weekly sets of small problems. This part of the course correspond to the UPG1 module in Ladok.

In total there are five sets of problems for you to solve, each consisting of three problems. Each week you are expected to solve each week's associated set of assignments. You will then present your solutions to these during the presentation sessions on Fridays.

Working on the assignments

The problems are solved individually. This means that you are not allowed to discuss the solution of the problems, however you are allowed to discuss the interpretation of the problems. In no way are you allowed to discuss how to solve the problems with other students until both of you have passed that problem set. You are also not allowed to copy code from any soruce, including generative AI. If you need help with the assignments, you are welcome to attend the lab sessions.

The only C++ language features required to solve these assignments are those presented during the lectures and in the lab assignments. With that said, you are allowed to use features of C++ outside of those. But if you do so, you are expected to be able to explain why you have opted to use them and how they work.

Presentation

At the end of each week there are presentation sessions booked. During these you will demonstrate one or more of your solutions to that week's problem set. The assistants will choose which solution you are to present, so it is crucial that you have finished all three assignments of that week's set. The week's problem set is specified in TimeEdit for each presentation session.

After passing a demonstration, you will then hand in your submissions through Sendlab. However, these solutions will not be assessed, so the demonstration is the examination.

The presentation sessions are solely dedicated to demonstrations. This means that you cannot expect to get any help with the assignments during these sessions.

Please note that the presentations are a form of examination. Therefore it is crucial that you attend these. If you are unable to attend a session, reach out to us well in advance.

The problem sets

As said previously, each problem set consists of three assignments. In general, each problem has three sections:

  1. Background: A background of the problem is given.
  2. The assignment: Describes what the program you are supposed to write will actually do. Sometimes, non-functional requirements are given as well, i.e. requirements on the code quality or how you implement your solution.
  3. Expected behavior of the program: A few examples of how the program is supposed to behave while executing. Program output and user input is shown. While your program's behavior must match these, your programs should of course also work in the general case.

All problems can be found in the TDDE79 Problem set compendium (last modified 2026-10-15 at 16:28).

Problem set 1

  • Age reckoning
  • Nervous messages (given files)
  • Crosshair

Problem set 2

  • Read line of tokens
  • Sisyphean snail
  • Matrix operators

Problem set 3

Problem set 4

  • Ticket to Ride
  • Dental notation translation
  • Binary trees

Problem set 5

  • Convergence clues
  • Sprinklers and roses (given files)
  • Chain of command

Requirements and expectations

The requirements of these assignments are more relaxed than the labs. You are expected to make an honest attempt at solving each assignment. You must be able to explain your reasoning and argue why your solution is in line with your interpretation of the assignment.

The purpose of these assignments are for you to practice programming and problem solving. The assignments are designed in such a way that you will have to practice solving many kinds of problems using various tools. Your aim should therefore be to try different tools and strategies while also thinking about the problems themselves.

Typically, the most difficult part of these assignments should be understanding the problem. So if you are short on time, that is where you should put your main focus. Once you understand the problem, you should be able to explain how to solve it using pen and paper. The code should be the last step of solving the assignment. The important part during the presentation is that you can explain what the problem is, how it is solved and what C++ tools you applied to implement that solution.

What happens if I fail or miss a demonstration

If you for some reason fail or miss a demonstration, you will have the opportunity redo the demonstration at a later date (typically at a lab session the following week). It is your responsibility to contact the teachers for booking a new date for demonstration. If they have time, the teachers may be able to take your demonstrations during lab sessions, but you should not count on that working without first talking to them.

The final presentation session does not have an associated problem set. This session is intended as an opportunity for you to demonstrate any problem set that you failed or missed. Note that we cannot guarantee that we can take any more demonstrations after this session. If you still haven't passed all demonstrations after this point, you will have to try again next year.


Page responsible: Jacob Törnberg Zeinetz
Last updated: 2026-10-15