go to start Ex W13
|home |print view |recent changes |changed December 12, 2016 |
exact
|You are 54.81.59.211 <- set your identity!

Sections: Introductory Questions | Array dimension deduction | Managing Objects on the Heap | Shared Pointer to '''this''' | Reverse Echo | Filename arguments | Topological Sort | NOTE |

Introductory Questions ^

Array dimension deduction ^

Which C++ mechanism can you use to deduce a dimension of an array passed as function parameter?

Managing Objects on the Heap ^

How do you create an instance of the default-constructible type Block on the heap?

How do you delete the instance created on the heap?

What problem arises if you have loops in your object structure and how do you solve this?

Shared Pointer to this ^

How can you access to a shared pointer from within the this object?

Reverse Echo ^

Write a C++ program echor that produces a list of its program arguments in reverse order without using a hand-written loop or recursion.

$ echor zero one two three
three
two
one
zero

Filename arguments ^

Take some of your example programs(ExW5, ExW8) that read all of standard input and process it to take an optional argument for your program giving it the filename to be processed. If no name is given your program should work with standard input as before. If more than one filename is given, your program should work on all files given.

For example:

$ wcount wcount.cpp word.h word.cpp
should read the three files and output the number of words in these three files combined.

Topological Sort ^

Solve the exercise from the OO module in C++ using (smart) pointers to build the graph of objects.

output:

1: Math OO
2: DB1 AD1 CPI
3: DB2 SE1 UI1
4: SE2 UI2
5: Thesis

NOTE ^

Optional:

see also skripte server: https://skripte.hsr.ch/Informatik/Fachbereich/Objektorientierte_Programmierung/OO/%c3%9cbungen/08_Collections_TESTAT2/


|home |print view |recent changes |changed December 12, 2016 |
exact
|You are 54.81.59.211 <- set your identity!

Ex W13
go to start