a3_m2 - Nat Sci Lab CS II, Module II Course: 320112 Jacobs...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Nat Sci Lab CS II, Module II Course: 320112 Jacobs University Bremen March 27th, 2008 Dr. Heinrich Stamerjohanns . Assignment 3 - Copy constructors, Class implementation This assignment must be solved in C++. Your programs should include proper declarations for all the variables needed. Insert suitable comments to explain what your program does. Also pay attention to proper indentation of your code. The TAs are supposed to take points off, if the code is not properly indented. Problem 3.1 Copyconstructor (1 point) Play with the examples, it is important to try them out. Based on copyconstructor.cpp (which you find at http://cantaloupe.eecs.jacobs-university.de/courses/320112/cpp/copyconstructor.cpp ) implement funcbyref() . Change all constructors (incl. copy constructor) so that you can clearly see when they are invoked. Then in your main program create objects, call funcbyval() , funcbyref() , and print the results. Then delete the object (by ending the block or program)....
View Full Document

Page1 / 2

a3_m2 - Nat Sci Lab CS II, Module II Course: 320112 Jacobs...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online