comp.lang.ada
 help / color / mirror / Atom feed
From: James Rogers <jimmaureenrogers@worldnet.att.net>
Subject: Re: has anyone ever used this book?
Date: Tue, 17 Jul 2001 15:14:31 GMT
Date: 2001-07-17T15:14:31+00:00	[thread overview]
Message-ID: <3B5456EF.67FD5691@worldnet.att.net> (raw)
In-Reply-To: tl7g13c397j0a9@corp.supernews.com

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



      reply	other threads:[~2001-07-17 15:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]
replies disabled

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