12.05.2015 Views

type - David Vernon

type - David Vernon

type - David Vernon

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Object-Oriented Programming<br />

Polymorphism and Reusability<br />

/* TRIANGLE.H: adding a triangle (interface file) */<br />

/* Class triangle is derived from class element */<br />

class triangle: public element {<br />

public:<br />

triangle(point &P1, point &P2, point &P3,<br />

element *ptr);<br />

void print() const;<br />

private:<br />

point A, B, C;<br />

}<br />

Copyright © 2007 <strong>David</strong> <strong>Vernon</strong> (www.vernon.eu)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!