Click to See Complete Forum and Search --> : I am stuck up in this problem.........I am stuck up in the project....Plz help...


nikhil_mech
April 10th, 2003, 12:51 AM
Define the classes to be able to construct a 'solid box' with 6 'planes'. No geometry at this point.

----SO I CREATED A CLASS TO STORE 6 VALUES. EACH CORRESPONDING TO 1 PLANE.


Define a class structure to implement a channel connection between the solid box and its planes. A ‘channel’ is a logical ‘connection’ between two objects. Simplest implementation of a channel is that each object stores a pointer to the other object in its instance data. This storage of mutual pointers should be viewed as a ‘connection’. If this implementation were to be abstracted then one could call it a logical ‘channel’ using which the two objects communicate with each other. The channel protocol should be externalized so that any object should be able to use it by embedding an object of the channel class in its own instance data.
The implementation should be such that the planes are not directly accessed after construction. They should be accessed only through the solid object via the channel.

-----NOW HERE I NEED TO CREATE A LINKED LIST BUT I AM NOT GETTING HOW TO CREATE CHANNEL CLASS THAT WHEN EMBEDDED CREATES THE LIST. AND ALSO THE PLANES ARE TO BE ACCESSED VIA CHANNEL CONNECTION. HOW CAN THIS BE DONE ?

Manish Malik
April 10th, 2003, 01:01 AM
Originally posted by nikhil_mech
NOW HERE I NEED TO CREATE A LINKED LIST

Curious. What would be the purpose of the linked list in this scenario?