go to start Ex W5
|home |print view |recent changes |changed January 16, 2016 |
exact
|You are 54.81.88.93 <- set your identity!

Sections: Catch Up | Extra Exercises | Class Design for Retro-Calculator | Experiment: Understand Move instead of Copy | Experiment: Deterministic Object destruction in case of temporaries and Exceptions |

Catch Up ^

Chances are high that you haven't been able to solve all exercises from last week. So first complete the remaining non-extra exercises from ExW4

Extra Exercises ^

Class Design for Retro-Calculator ^

Create classes for the different functional units of last weeks' exercises with 7-segment display and calculation. Can you implement the "accumulator" that keeps the displayed value around as first operand for further computations?

Where does it make sense to combine functions as member functions into a class, and where not. Document your judgement in SolW5.

Experiment: Understand Move instead of Copy ^

Take the following program and vary it, so that instead of defining a copy constructor define a move constructor. Within the move constructor change the parameter object's name to name+"moved from" and define the name of the moved-to object to be the other's original name.

Experiment: Deterministic Object destruction in case of temporaries and Exceptions ^

Take the Tracer program from above and experiment what happens when an inner block throws exceptions. Can you figure out, when individual objects are destroyed.

What happens with temporary objects of type Tracer?

    Tracer{"temp"};


|home |print view |recent changes |changed January 16, 2016 |
exact
|You are 54.81.88.93 <- set your identity!

Ex W5
go to start