The purpose of these c++ projects is to get introduced into OOP. We are allowed to use standard c++17.
- code must be coiled with
c++and the flags-Wall -Werror -Wextra. - there must be a Makefile for each exercise.
- Class names and corresponding filenames must be written in UpperCamelCase format.
- The
using namespace <ns_name>andfriendkeywords are forbidden. - There must be no memory leaks.
- Classes must be designed in the Orthodox Canonical Form.
- There can be no function implementations in headerfiles.
- Headers must be able to be used independently from others.
- Use of STL in the Module 08 and 09 only->no containers / Algorithm header
cd ex00
make
./zombie
- Easy introduction to the difference between a stack allocated and heap allocated object. Also the
newanddeletekeyword used for the first time.
cd ex01
make
./horde
- First Contact with the array operator
[]and how to delete an arraray ;
cd ex02
make
./ptr
- It took me a little bit to understand the concept of a reference, coming from c programming. i didnt get it fully why you would need it when you have pointers also. But now, some months later im very happy they exist, and use thm all the time.
Ojective: Understanding private and public attributes, making getters and setters. Also deepening the usage of references vs pointers.
cd ex03
make
./violence
- Interesting first trial to test if i actually understood references.
Ojective: Write a program that will open the file and copies its content into a new file .replace, replacing every occurrence of s1 with s2.
cd ex04
make
./sed
- The first time working with file I/O operations in c++. They are quite different than in C. The fstreamobj is actually convenitent.
cd ex05
make
./harl
- The syntax of function pointers is quite confusing but interesting, also i used a switch statement for the first time, since if/else conditions were forbidden.
cd ex06
make
./harlFilter
- the leveling property of the switch statement is really cool, you can make some noce logic with this concept.