a4_m2 - Nat Sci Lab CS II, II Jacobs University Bremen Dr....

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Nat Sci Lab CS II, II Course: 320112 Jacobs University Bremen March 28th, 2008 Dr. Heinrich Stamerjohanns . Assignment 4 - Inheritance 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 4.1 Inheritance (3 points) Build a hierarchy of classes for vehicles and implement these classes with some example proper- ties and methods. A vehicle color, maxspeed, move() water vehicle, air vehicle are vehicles Think of properties that are specific to water and air vehicles and implement these. Also implement at least one method for each inherited class. ship, plane, helicopter Implement at least two properties for each of these inherited classes. Each constructor, destructor and method should be implemented in such a way that each call is
Background image of page 1
This is the end of the preview. Sign up to access the rest of the 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.

Ask a homework question - tutors are online