This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Nat Sci Lab CS II, Module II Course: 320112 Jacobs University Bremen April 4th, 2008 Dr. Heinrich Stamerjohanns . Assignment 6 - Operator overloading 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 6.1 Inserter operator (2 points) Use the files of assignment 5 and add support for the inserter << operator. Print the same as the printdata() function. Your test program should test the new operator. Name the files testrectangle61.cpp , figure61.h , rectangle61.h and rectangle61.cpp . Problem 6.2 Reading and writing a Rectangle (2 points) Write a function that writes an array of rectangles to a text file and a corresponding function that reads an array of rectangles from a file. You can add friend functions as you need. The formatfunctions as you need....
View Full Document
This note was uploaded on 05/04/2010 for the course CS 320142 taught by Professor Stamerjohans during the Spring '10 term at Jacobs University Bremen.
- Spring '10
- C++ Programming