An abstract data type is a class in which you declare some of the members of
that class as pure virtual methods. A pure virtual method is a virtual
function that has been initialised to 0, e.g.
virtual bool IsMoving() = 0;
By having these pure virtual functions, as virtual functions that are
initialised to 0 are called, you can't create an object of that class type.
These classes that contain pure virtual members are known as abstract data
types. However, object orientated design breaks it down a little further.
It specifies an interface as being a class that contains only pure virtual
methods and no data members, and an abstract as having some non-virtual or
non-pure virtual methods, and or, some data members.
That should get you started. To find out more about abstract data types,
have a look at one of the C++ tutorials that are on the web, and Googling
for something like +"interface" +"abstract" +"object orientated", should
bring up a few results relating to the OO design side of things.
Will
----- Original Message -----
From: "Alvin David Morris" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 27, 2004 9:43 AM
Subject: [c-prog] ADT? need help... C++
>
>
>
> I'm new here and I need help... haha... I'm taking a C++ course in
> highschool and I need an example of an ADT (Abstract Data Types).
> I'm kinda lost about the whole thing.... haha...
>
> just an example of one would do for me... :D
>
> much thanks to any and all help recieved... :D
>
> Alvin,
>
>
>
>
>
>
>
>
>
> To unsubscribe, send a blank message to
<mailto:[EMAIL PROTECTED]>.
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/c-prog/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
