Interface for an Integer List
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   P_T
Posted On:   Tuesday, June 19, 2001 10:46 AM

I need help with the following program :-

interface IntList {
int getNext(); // gets an integer from the list
void putOnList(int i); // puts an integer on a list
}

Write an implementation for the interface. Iclude two variables, putIndex and getIndex, to count the number of integers going on the list, and also coming off it. Your constructor for the implementation should setup a storage variable called storage with 100 integer locations. Demo your program with a main() that puts 10 ints on the list using a loop and then displays them, also using a loop (to illustrate your method overriding).

Can anyone please help???

About | Sitemap | Contact