From: "Samuel T. Harris" <samuel_t_harris@Raytheon.com>
Subject: Re: Ada programming with Equality, Copy and Print Functions
Date: 2000/09/26
Date: 2000-09-26T00:00:00+00:00 [thread overview]
Message-ID: <39D0B434.9B17CDA7@Raytheon.com> (raw)
In-Reply-To: 8qp93j$e9k$1@nnrp1.deja.com
wolfpack69@my-deja.com wrote:
>
> Hey, I was recommended to come here for some help with this problem i face.
> Here it is:
>
> The stack pacakges, Static and Dynamic, provide Stack_Type as limited private
> type. Therefore i cannot use assignment or test for equality/inequality on
> objects of type stack_type in the application program. The procedures i have
> worked out below, can only operate on stack objects through the operations
> provided by the ADT package.
>
> PROCEDURES: procedure Equal(Stack_1 : in out Stack_Type, Stack_2 : in out
> Stack_Type, Stacks_equal : out Boolean);
>
> procedure Copy(Target_Stack : in out Stack_Type, Source_Stack : in out
> Stack_Type);
>
> procedure Print_Stack(A_Stack : in out Stack_Type);
>
> I believe these procedures are correct. I am also told that they are to work
> with both static and dynamic stacks, but only test with dynamic stack ADT.
>
> The procedures will nned to change the state of stack(I believe this can be
> done using Pop to remove a stack item). There will also be a temporary stack
> that will be needed, where appropriate, so that the stack data can be stored
> and ensure that the stacks are returned to original state.
>
> I hope the information is sufficient enough for you to help me with.
A classic case of a reusable component missing something.
Instead of simply adding these facilities to the component
itself, one must manhandle objects outside the component!
Oh the humanity!
--
Samuel T. Harris, Principal Engineer
Raytheon, Aerospace Engineering Services
"If you can make it, We can fake it!"
next prev parent reply other threads:[~2000-09-26 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-26 4:36 Ada programming with Equality, Copy and Print Functions wolfpack69
2000-09-26 0:00 ` Samuel T. Harris [this message]
2000-09-26 0:00 ` Ted Dennison
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox