cs Oct 30
CppDoc
Create an API from your code
JavaDoc for Java
Shape -- Circle
-- openPolyline
-- closedPolyline
-- Polygon
-- Triangle
Later rewrite Triangle to inherit directly from Polygon rather than inheriting from Shape.
Polygon P;
P.add(Point(100.200));
function overloading means same name different parameter list.. could take a different number or different type or both.
function overriding -- same name, same parameter list. This can only occur in an inheritance hierarchy. (there is a hidden parameter passed which is pointer to the object type)
protected : keeps it in the family. (inheritance hierarchy). access is ok within the family ie. classes derived derived from it but not outside..
but is the same as private if the class is standalone.
struct Triangle : Polygon
For square just add 4 points instead of 3.
inherit only the protected and public but not the private data members... by the derived from the base class
editor ../.ash to check the history and copy from there.
create a shell file
https://en.wikipedia.org/wiki/Class_diagram

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home