From sushil  Wed Sep 10 12:26:16 1997
>From sushil  Wed Sep 10 19:26:17 1997
Return-Path: <sushil@aspen.cs.unr.edu>
Received: from ivy.cs.unr.edu by aspen.cs.unr.edu (8.8.4/1.34-UNR-sd-ptp-1.00)
	id MAA08449; Wed, 10 Sep 1997 12:26:16 -0700 (PDT)
Received: (from sushil@localhost)
	by ivy.cs.unr.edu (8.8.6/8.8.6) id MAA04843;
	Wed, 10 Sep 1997 12:25:23 -0700
From: sushil
Message-Id: <199709101925.MAA04843@ivy.cs.unr.edu>
Subject: Re: Extra credit assignment in 202
To: keith@honors.unr.edu (The Man)
Date: Wed, 10 Sep 1997 12:25:23 -0700 (PDT)
Cc: sushil (), cs202, xuf
In-Reply-To: <3414A0A7.87F19EC8@honors.unr.edu> from "The Man" at Sep 8, 97 06:04:39 pm
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Status: RO

Hi,

you wrote:
} For the extra credit portion in which you want an implementation of a
} dynamically sized stack, do you want us to (for example) read input from
} stdin telling the module how big to make the stack at the beginning of
} the client's execution? Or did you have something in mind where the
} client programmer decides how big it should be? And if it can be resized

To test your implementation I am planning to replace  the line 

	Stack S; 

in my as2.cpp with the line

	Stack S(20);

So the client doesn't really read in the size. 

} as well, does it make any difference? Would it be better to have an
} initial size of 1 and dynamically resize all the time, or to start with
} some default value and resize only as the stack gets very large? In what

This is the usual approach that operating systems implement for the system
stack. Start with a size, of say X,  and resize as the need arises. On some
operating systems, of course, the resizing doesn't happen and the program
crashes with unpleasant consequences. I believe, DOS is an example.

} increments should it be resized? On my machine (Intel P6-266) I can't
} tell any differences in performance, but I'm willing to bet the

Nice machine!

} DECstations will react differently. Is there a preferred method of doing
} this? Sorry to ask so many questions, but you didn't give us much to go

I prefer my method as described above, but really, the answer is that it
depends on the application.As long as you have the ABILITY to declare

	Stack S(stackSize);

where stackSize is read-in or a client defined constant, you have designed a 
good stack implementation.

Finally, don't ever be sorry about asking questions. Questions are ALWAYS  
welcome. 

Best Regards
-- 
Sushil

Sushil J. Louis, Ph.D.			sushil@cs.unr.edu
Department of Computer Science/171	Fax: (702) 784-1877
University of Nevada 			Tel: (702) 784-4315
Reno, NV 89557-0148			URL: http://www.cs.unr.edu/~sushil

