7 |
XPro User Group News
(Con’t from Page 6)
recognized the danger of such short-sighted
thinking. He said, “Toasters don’t just turn bread
into toast, they are also used to warm frozen
waffles. What you see before you is really a break-
fast food cooker. As the subjects of your kingdom
become more sophisticated, they will demand
more capabilities. They will need a breakfast food
cooker that can also cook sausage, fry bacon, and
make scrambled eggs. A toaster that only makes
toast will soon be obsolete. If we don’t look to the
future, we will have to completely redesign the
toaster in just a few years.”
“With this in mind, we can formulate a more intelli-
gent solution to the problem. First, create a class
of breakfast foods. Specialize this class into sub-
classes: grains, pork, and poultry. The specializa-
tion process should be repeated with grains di-
vided into toast, muffins, pancakes, and waffles;
pork divided into sausage, links, and bacon; and
poultry divided into scrambled eggs, hard- boiled
eggs, poached eggs, fried eggs, and various
omelet classes.”
“The ham and cheese omelet class is worth spe-
cial attention because it must inherit characteristics
from the pork, dairy, and poultry classes. Thus, we
see that the problem cannot be properly solved
without multiple inheritance. At run time, the
program must create the proper object and send a
message to the object that says, 'Cook yourself.’
The semantics of this message depend, of course,
on the kind of object, so they have a different
meaning to a piece of toast than to scrambled
eggs.”
“Reviewing the process so far, we see that the
analysis phase has revealed that the primary
requirement is to cook any kind of breakfast food.
In the design phase, we have discovered some
derived requirements. Specifically, we need an
object-oriented language with multiple inheritance.
Of course, users don’t want the eggs to get cold
while the bacon is frying, so concurrent processing
is required, too.”
“We must not forget the user interface. The lever
that lowers the food lacks versatility, and the
darkness knob is confusing. Users won’t buy the
product unless it has a user-friendly, graphical
interface. When the breakfast cooker is plugged in,
users should see a cowboy boot on the screen. Users
click on it, and the message ‘Booting UNIX v.8.3’
appears on the screen. (UNIX 8.3 should be out by
the time the product gets to the market.) Users can
pull down a menu and click on the foods they want to
cook.”
“Having made the wise decision of specifying the
software first in the design phase, all that remains is to
pick an adequate hardware platform for the implemen-
tation phase. An Intel 80486 with 16MB of memory, a
300MB hard disk, and a VGA monitor should be
sufficient. If you select a multitasking, object oriented
language that supports multiple inheritance and has a
built-in GUI, writing the program will be a snap. (Imag-
ine the difficulty we would have had if we had foolishly
allowed a hardware-first design strategy to lock us into
a four-bit microcontroller!).”
The king wisely had the computer scientist beheaded,
and they all lived happily ever after.
FoxFinder v2.14
by Barry R. Lee
FoxFinder Version 2.14 was recently uploaded to the
FoxForum on CompuServe by author Michael Bolser.
If you are not familiar with FoxFinder you may want to
give it a try. This freeware utility is a search and/or
replace utility that runs within FoxPro. It can search
and replace text in screens, menus, reports, labels,
databases and any ASCII file including queries.
Some of the features of FoxFinder are:
Search mode lists file that contains the specified
search text. This includes a description of where the
text was found and the number of occurences. Plus
you can double click any of the file names and
FoxFinder will open an edit window on that file.
Reverse mode for a listing of files that do not include
specified text. Searches all code snippets and memo
fields. User can designate search directories by file
type. Option to save and restore settings. User-
definable File Types
This great little utility is well designed and easy to use
It supports both DOS and Windows with an interface
customized for each enviomment. If you ever needed
to search and replace across a project, this little utility
will do it.
Page 7
|
7 |