Unformatted text preview: structor for each instance.
Remember what a LinkedList was?
LinkedList struct Cust; // forward reference
typedef Cust* CustPtr;
}; Not suitable for a supermarket queue. Applied Programming Applied Programming W e want to be able to create such abstract data
types as linked lists but be able to put any data
we desire into these linked lists.
we Let's look at another example to illustrate how we
can define our own abstract datatypes.
datatypes We do that with arrays (built into C++). Let's create a time type. Why can't we do it with our own?
We can. What will we call it?
How about TimeType.
TimeType We construct generalised classes called
We'll see these soon. What will it store?
time of day in hours, minutes & seconds Applied Programming W hat operations do we want to be able to do with
View Full Document
- Spring '14
- Object-Oriented Programming, Subroutine, Programming constructs, TimeType