comp.lang.ada
 help / color / mirror / Atom feed
* has anyone ever used this book?
@ 2001-07-16 20:15 Beau
  2001-07-16 21:00 ` Beau
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Beau @ 2001-07-16 20:15 UTC (permalink / raw)


Ada 95  Problem Solving and Program Design? I am using it in class and we
are in ch 11. We have for a problem number 6. and I cannot understand for
the life of me why we would need to construct an ADT for the bank account
AND use the currency and Dates ADT packages. I am just asking for an
explanation respectively. thanks.
--
~Beau~
beau@hiwaay.net






^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: has anyone ever used this book?
  2001-07-16 20:15 has anyone ever used this book? Beau
@ 2001-07-16 21:00 ` Beau
  2001-07-16 21:48 ` Larry Kilgallen
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Beau @ 2001-07-16 21:00 UTC (permalink / raw)


I am sorry but I neglected to say that the book is the third edition.
--
~Beau~
beau@hiwaay.net

"Beau" <beau@hiwaay.net> wrote in message
news:tl6iu0c3v49b3b@corp.supernews.com...
> Ada 95  Problem Solving and Program Design? I am using it in class and we
> are in ch 11. We have for a problem number 6. and I cannot understand for
> the life of me why we would need to construct an ADT for the bank account
> AND use the currency and Dates ADT packages. I am just asking for an
> explanation respectively. thanks.
> --
> ~Beau~
> beau@hiwaay.net
>
>
>





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: has anyone ever used this book?
  2001-07-16 21:48 ` Larry Kilgallen
@ 2001-07-16 21:05   ` Ehud Lamm
  0 siblings, 0 replies; 8+ messages in thread
From: Ehud Lamm @ 2001-07-16 21:05 UTC (permalink / raw)



Larry Kilgallen <Kilgallen@eisner.decus.org.nospam> wrote in message
news:MWhRrgnaQKJk@eisner.encompasserve.org...
> In article <tl6iu0c3v49b3b@corp.supernews.com>, "Beau" <beau@hiwaay.net>
writes:
> > Ada 95  Problem Solving and Program Design? I am using it in class and
we
> > are in ch 11. We have for a problem number 6. and I cannot understand
for
> > the life of me why we would need to construct an ADT for the bank
account
> > AND use the currency and Dates ADT packages. I am just asking for an
> > explanation respectively. thanks.
>
> Without even looking at the book, I would say that textbook-sized
> examples are supposed to be small, so to illustrate using one ADT
> within another one has to do that for cases that are possibly
> quite a bit smaller than one would encounter in the real world.
>

I don't know the book.
What I do know from personal experience with many students  is that quite a
few seem to graps the idea of an ADT, but fail to realize how to create
layered designs, and modularize their programs.
I always try to show examples like building set ADT from a list package,
using various layering techniques (composition, using inheritance etc.).

Ehud Lamm





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: has anyone ever used this book?
  2001-07-16 20:15 has anyone ever used this book? Beau
  2001-07-16 21:00 ` Beau
@ 2001-07-16 21:48 ` Larry Kilgallen
  2001-07-16 21:05   ` Ehud Lamm
  2001-07-17  0:13 ` Ken Garlington
  2001-07-17  0:29 ` James Rogers
  3 siblings, 1 reply; 8+ messages in thread
From: Larry Kilgallen @ 2001-07-16 21:48 UTC (permalink / raw)


In article <tl6iu0c3v49b3b@corp.supernews.com>, "Beau" <beau@hiwaay.net> writes:
> Ada 95  Problem Solving and Program Design? I am using it in class and we
> are in ch 11. We have for a problem number 6. and I cannot understand for
> the life of me why we would need to construct an ADT for the bank account
> AND use the currency and Dates ADT packages. I am just asking for an
> explanation respectively. thanks.

Without even looking at the book, I would say that textbook-sized
examples are supposed to be small, so to illustrate using one ADT
within another one has to do that for cases that are possibly
quite a bit smaller than one would encounter in the real world.

It is a sign of forethought, however, to make the currency ADT
package when you only need it one place, anticipating that in
the future you may need it in other places.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: has anyone ever used this book?
  2001-07-16 20:15 has anyone ever used this book? Beau
  2001-07-16 21:00 ` Beau
  2001-07-16 21:48 ` Larry Kilgallen
@ 2001-07-17  0:13 ` Ken Garlington
  2001-07-17  0:29 ` James Rogers
  3 siblings, 0 replies; 8+ messages in thread
From: Ken Garlington @ 2001-07-17  0:13 UTC (permalink / raw)


"Beau" <beau@hiwaay.net> wrote in message
news:tl6iu0c3v49b3b@corp.supernews.com...
: Ada 95  Problem Solving and Program Design? I am using it in class and we
: are in ch 11. We have for a problem number 6. and I cannot understand for
: the life of me why we would need to construct an ADT for the bank account
: AND use the currency and Dates ADT packages. I am just asking for an
: explanation respectively. thanks.

Don't know the book, but I assume you're asking one or both of the following
questions:

1. "Why would I need an ADT for a bank account"?

A bank account sounds like a reasonable class, for which an ADT and
associated access functions would be useful to hide details of its
implementation

2. "Why would I need ADTs for currency and dates to create a bank account"?

It seems logical that an implementation of a bank account ADT would need to
be built on the concepts of currency and dates. Both concepts have
implementation aspects that would be useful to either hide from the user or
customize, therefore they too could qualify as ADTs.

: --
: ~Beau~
: beau@hiwaay.net
:
:
:





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: has anyone ever used this book?
  2001-07-16 20:15 has anyone ever used this book? Beau
                   ` (2 preceding siblings ...)
  2001-07-17  0:13 ` Ken Garlington
@ 2001-07-17  0:29 ` James Rogers
  2001-07-17  4:32   ` Beau
  3 siblings, 1 reply; 8+ messages in thread
From: James Rogers @ 2001-07-17  0:29 UTC (permalink / raw)


This textbook is by Feldman and Koffman.

I will quote from the homework assignment these people are attempting:

"Modify the bank account program given in Chapter 10, Programming
Project 6. By analogy with Programs 11.11 through 11.17, develop an ADT
for a bank transaction, a child package for input/output, and a data
base package to store transaction records. Use the dates packages
(Programs 11.3 through 11.5) and the currency packages (Programs 11.5
through 11.10) to represent the transaction date and amount
respectively."

This problem is at the end of the chapter on Abstract Data Types.
Clearly the purpose of this program is to both create new, and use
existing ADTs to build a working program.

There are two very good reasons to deal with all these ADTs.
First, that is the focus of the entire chapter. You need to practice
using the principles explained in the chapter. Second, that this is
what your professor requires.

The existing ADTs referenced in the problem statement include some
very clear examples of ADTs. It is now time for you and your 
colleagues to demonstrate that you understand to subject matter of
the chapter. I know the textbook comes with a CD containing all the
examples. This means that you need only copy the appropriate files
from the CD, add a few new packages, and you are done. 

This is neither a difficult nor unreasonable assignment.

Jim Rogers
Colorado Springs, Colorado USA

Beau wrote:
> 
> Ada 95  Problem Solving and Program Design? I am using it in class and we
> are in ch 11. We have for a problem number 6. and I cannot understand for
> the life of me why we would need to construct an ADT for the bank account
> AND use the currency and Dates ADT packages. I am just asking for an
> explanation respectively. thanks.
> --
> ~Beau~
> beau@hiwaay.net



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: has anyone ever used this book?
  2001-07-17  0:29 ` James Rogers
@ 2001-07-17  4:32   ` Beau
  2001-07-17 15:14     ` James Rogers
  0 siblings, 1 reply; 8+ messages in thread
From: Beau @ 2001-07-17  4:32 UTC (permalink / raw)


>This is neither a difficult nor unreasonable assignment.

I did not mean to imply that I thought that this was an unreasonable
assignment. I just was wondering if someone could shed some light on the
subject matter. To you this might not be difficult, but to someone who has
never seen ADTs this is a little overwelming. This is the first time I have
came into contact with ADTs and was just looking for some help.  as I said
in my first post, I was not looking for someone to do my work just an
explanation.
--
~Beau~
beau@hiwaay.net

"James Rogers" <jimmaureenrogers@worldnet.att.net> wrote in message
news:3B53878C.4F2F7CAA@worldnet.att.net...
> This textbook is by Feldman and Koffman.
>
> I will quote from the homework assignment these people are attempting:
>
> "Modify the bank account program given in Chapter 10, Programming
> Project 6. By analogy with Programs 11.11 through 11.17, develop an ADT
> for a bank transaction, a child package for input/output, and a data
> base package to store transaction records. Use the dates packages
> (Programs 11.3 through 11.5) and the currency packages (Programs 11.5
> through 11.10) to represent the transaction date and amount
> respectively."
>
> This problem is at the end of the chapter on Abstract Data Types.
> Clearly the purpose of this program is to both create new, and use
> existing ADTs to build a working program.
>
> There are two very good reasons to deal with all these ADTs.
> First, that is the focus of the entire chapter. You need to practice
> using the principles explained in the chapter. Second, that this is
> what your professor requires.
>
> The existing ADTs referenced in the problem statement include some
> very clear examples of ADTs. It is now time for you and your
> colleagues to demonstrate that you understand to subject matter of
> the chapter. I know the textbook comes with a CD containing all the
> examples. This means that you need only copy the appropriate files
> from the CD, add a few new packages, and you are done.
>
> This is neither a difficult nor unreasonable assignment.
>
> Jim Rogers
> Colorado Springs, Colorado USA
>
> Beau wrote:
> >
> > Ada 95  Problem Solving and Program Design? I am using it in class and
we
> > are in ch 11. We have for a problem number 6. and I cannot understand
for
> > the life of me why we would need to construct an ADT for the bank
account
> > AND use the currency and Dates ADT packages. I am just asking for an
> > explanation respectively. thanks.
> > --
> > ~Beau~
> > beau@hiwaay.net





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: has anyone ever used this book?
  2001-07-17  4:32   ` Beau
@ 2001-07-17 15:14     ` James Rogers
  0 siblings, 0 replies; 8+ messages in thread
From: James Rogers @ 2001-07-17 15:14 UTC (permalink / raw)


Beau wrote:
> 
> >This is neither a difficult nor unreasonable assignment.
> 
> I did not mean to imply that I thought that this was an unreasonable
> assignment. I just was wondering if someone could shed some light on the
> subject matter. To you this might not be difficult, but to someone who has
> never seen ADTs this is a little overwelming. This is the first time I have
> came into contact with ADTs and was just looking for some help.  as I said
> in my first post, I was not looking for someone to do my work just an
> explanation.
> --

Abstract Data Types (ADTs) are an important concept in modern software
development. This concept leads directly into the concept of Object
Oriented Programming.

The idea behind an ADT is that you are defining your own data type
including all the behaviors of that data type. Once the ADT is defined
you only need to use that definition whenever you want to deal with
the concept modeled by the ADT.

Ada provides a number of ADTs for you. For instance the Ada.Calendar
package provides all the fundamental date and time activities you
need to determine the absolute date and time as well as the 
differences between two date/time values. Dr. Feldman creates an
additional ADT called Dates in Chapter 11 of your text book. That
ADT uses the ADT Ada.Calendar and expands on its capabilities
by defining a new data type (Date) and several subprograms dealing
with the Date data type.

One of the differences between the Ada.Calendar ADT and the Dates
ADT is that the Dates ADT expresses months as a month label which
is an English abbreviation of the month name. The Ada.Calendar
ADT expresses months only as a number from 1 through 12.

The Date ADT allows you to express dates in a format common to
USA English usage. In your program, whenever you want to express
dates in that format it is easy to simply create a Date object and
uses its functions and procedures. You do not need to recode the
problem every time.

One of the goals behind the concept of ADTs is the reuse of proven
software. By encapsulating the definition of a data type with the
definition of its behaviors (its funcitons a procedures) you have
created a software module or package. That module can then be used
over and over again, wherever it is needed. This is similar to the
concept of designing hardware components, then using them in
new situations. A hardware example is the design of a screw. You 
would not want to invent screws every time you want to assemble
some mechanical structure. You want to use the screws designed in
the past and proven to be useful. Similarly, you want to be able
to design software components that can be easily and reliably
reused. You also want to be able to reuse software modules already
developed by others. These are the goals of developing using ADTs.

Jim Rogers
Colorado Springs, Colorado USA



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-07-17 15:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-16 20:15 has anyone ever used this book? Beau
2001-07-16 21:00 ` Beau
2001-07-16 21:48 ` Larry Kilgallen
2001-07-16 21:05   ` Ehud Lamm
2001-07-17  0:13 ` Ken Garlington
2001-07-17  0:29 ` James Rogers
2001-07-17  4:32   ` Beau
2001-07-17 15:14     ` James Rogers

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