* Need Help!!!!
@ 1997-02-18 0:00 Richard Pearce
1997-02-19 0:00 ` Richard Pearce
0 siblings, 1 reply; 4+ messages in thread
From: Richard Pearce @ 1997-02-18 0:00 UTC (permalink / raw)
Heres my Problem.....
I have an accounts class called class_accounts, and I need to add a
function or procedure to allow an overdraft facillity. The class is on
web page http://www.brighton.ac.uk/ada95/programs/home.html
I would be very greatful if anyone could add the overdraft facility to
the class, including a method set_overdraft_limit. It should allow for
the customer to overdraw up to the overdraft limit set.
Thanks for your assistance.
Please e-mail me any attempts. Most greatful
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Need Help!!!!
1997-02-18 0:00 Need Help!!!! Richard Pearce
@ 1997-02-19 0:00 ` Richard Pearce
1997-02-19 0:00 ` Richard Pearce
0 siblings, 1 reply; 4+ messages in thread
From: Richard Pearce @ 1997-02-19 0:00 UTC (permalink / raw)
No Its not homework, just something I'd read in a books exercise, but
couldn't manage to do it. The books mentioned on the page as listed on
my last message.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Need Help!!!!
1997-02-19 0:00 ` Richard Pearce
@ 1997-02-19 0:00 ` Richard Pearce
0 siblings, 0 replies; 4+ messages in thread
From: Richard Pearce @ 1997-02-19 0:00 UTC (permalink / raw)
The ada Package is at:
http://www.brighton.ac.uk/ada95/programs/x09_acc2.html
and the exrcise os at:
http://www.bton.ac.uk/ada95/exercise/ch5.html
Thanks for any help.
^ permalink raw reply [flat|nested] 4+ messages in thread
* NEED HELP!!!
@ 1997-10-03 0:00 Scott Barrish
0 siblings, 0 replies; 4+ messages in thread
From: Scott Barrish @ 1997-10-03 0:00 UTC (permalink / raw)
Here is my Stack.ads file:
generic
type Element_Type is private; -- The stack element
package Stack is
-- This package implements a stack, a data structure in which elements are
added
-- and removed from only one end; a "last in, first out" (LIFO) structure.
type Stack_Type (Max_Size : Positive) is limited private; -- The stack
class
UNDERFLOW : exception;
OVERFLOW : exception;
procedure Clear (Stack : in out Stack_Type);
-- Remove all elements from the stack
-- Preconditions: None
-- Postconditions: Stack is empty; it contains no elements
function Empty (Stack : in Stack_Type) return Boolean;
-- Tests whether a stack is empty (contains no elements)
-- Preconditions: None
-- Postconditions: Empty = (stack is empty)
function Full (Stack : in Stack_Type) return Boolean;
-- Tests whether a stack is full (no more elements can be pushed on it)
-- Preconditions: None
-- Postconditions: Full = (stack is full)
procedure Push (Stack : in out Stack_Type;
New_Element : in Element_Type);
-- Adds New_Element to the top of Stack
-- Preconditions: None
-- Postconditions: Stack = original Stack with New_Element added on
top
-- Exceptions: OVERFLOW Raised on attempt to Push a new element
onto a
-- full stack. Stack is unchanged
procedure Pop (Stack : in out Stack_Type;
Popped_Element : out Element_Type);
-- Removes top element from Stack and returns it in Popped_Element
-- Preconditions: None
-- Postconditions: Stack = original Stack with top element
removed
-- Popped_Element = top element of original Stack
-- Exceptions: UNDERFLOW Raised on attempt to Pop an element from
an
-- empty stack. Stack remains empty.
private
type Stack_Array is array (Positive range <>) of Element_Type;
type Stack_Type (Max_Size : Positive) is
record
Top : Natural := 0;
Elements : Stack_Array (1..Max_Size);
end record;
end Stack;
I need to know how to declare a stack of type element and max size.
Sincerely,
Scott Barrish
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1997-10-03 0:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-03 0:00 NEED HELP!!! Scott Barrish
-- strict thread matches above, loose matches on Subject: below --
1997-02-18 0:00 Need Help!!!! Richard Pearce
1997-02-19 0:00 ` Richard Pearce
1997-02-19 0:00 ` Richard Pearce
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox