comp.lang.ada
 help / color / mirror / Atom feed
From: "Liddle Feesh" <no_see_reply_address@spam.com>
Subject: Re: Can someone help me understand this queue package?
Date: Fri, 28 Dec 2001 22:57:23 -0000
Date: 2001-12-28T22:57:23+00:00	[thread overview]
Message-ID: <pN6X7.51803$US4.9178551@news2-win.server.ntlworld.com> (raw)
In-Reply-To: mailman.1009563122.26309.comp.lang.ada@ada.eu.org

"Michal Nowak" wrote:
> >Essentially, I have a spec, and I'm trying my damndest to write a body
for
> >it - and though I've tried (hence my previous two posts here), I'm still
> >quite stuck, with only a very basic stub compiling.
> >
> >Does anyone have any decent queue tutorials? I've tried looking for a few
> >on
> >the net - adapower, an ada program (console), and several books...
However
> >when it comes to queues I'm none-the-wiser...
>
> Look at John English's book "ADA 95: THE CRAFT OF OBJECT-ORIENTED
PROGRAMMING"
> at: http://www.it.bton.ac.uk/staff/je/adacraft/

I'll give it a shot - esp as it's online, and I won't have to take it out of
the library.

> Part Two - abstract data types is what you should read. Just drop writting
code
> for the moment, relax and read it carefully. Athough there is example
about
> a list, you should have trouble write a spec for your queue. If you are in
big
> hurry, start from chapter 11.
>
> You may look also at:
> http://burks.bton.ac.uk/burks/language/ada/
> "Object Oriented Software in Ada 95 Second Edition",
> by Michael Smith.

I'll do that one too ;)

> >Looking at the pointers - is this some sort of linked list?
>
> Linked list may be implemented using pointers.

True - but with reference to the spec - some sort of linked list?

> >Could someone be so kind as to convert the following package into
> >pseudo-code for me?
>
> No :-)).
> Solution 1.
> Treat a queue as a simple list (you may abandon Iterators idea for
> simplicity), with operations Add and Remove.
> Add is something like Insert at beginning,
> and Remove is like delete at the end.

Will do... What is Iterators idea?

> Solution 2.
> Take paper, pencil and draw what is happening with pointers (access
> types) during addition and removal (such as on pictures in chapter 11).
> Than implement it.

Yes, but what >IS< happening with pointers? I'll have a go.

> BTW it looks like a homework or something. Do you want to stay with Ada
> for a longer time, or just write the program, pass the subject, and
forget?

I like the principals of ADA - it'll probably be something I'll stick with
and have to learn. I'm trying to read it as part of my degree; of course ADA
is quite a good skill to learn; esp. with the industries in my local area.

> However, good luck and don't break down,

I think I'm about to cry...


--
Liddle Feesh
 '  O 0 o <"//><  ' o'^
(Remove UNDERPANTS to reply)







  reply	other threads:[~2001-12-28 22:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-28 17:14 Can someone help me understand this queue package? Liddle Feesh
2001-12-28 18:16 ` Michal Nowak
2001-12-28 22:57   ` Liddle Feesh [this message]
2001-12-29 11:35     ` Michal Nowak
2001-12-29 19:37       ` Liddle Feesh
2001-12-29 20:05         ` Michal Nowak
2001-12-29 20:44           ` Liddle Feesh
2001-12-29 22:02       ` Liddle Feesh
2001-12-30 13:14         ` Michal Nowak
2001-12-30 22:28           ` Liddle Feesh
2001-12-31 10:32             ` Michal Nowak
2001-12-29 17:13   ` Liddle Feesh
2001-12-29 18:42     ` martin.m.dowie
2001-12-29 19:09       ` Liddle Feesh
2001-12-29 17:13   ` Liddle Feesh
2001-12-29 17:13   ` Liddle Feesh
2001-12-29 17:14     ` Liddle Feesh
2001-12-29 17:39     ` Liddle Feesh
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox