Programming Logic And Design Comprehensive 7th Edition Joyce Farrell
1. Programming Logic And Design Comprehensive 7th
Edition Joyce Farrell download
https://ebookbell.com/product/programming-logic-and-design-
comprehensive-7th-edition-joyce-farrell-4054238
Explore and download more ebooks at ebookbell.com
2. Here are some recommended products that we believe you will be
interested in. You can click the link to download.
Programming Logic And Design Comprehensive 6th Edition 6th Edition
Joyce Farrell
https://ebookbell.com/product/programming-logic-and-design-
comprehensive-6th-edition-6th-edition-joyce-farrell-2422158
Programming Logic And Design Comprehensive 9th Edition 9th Edition
Joyce Farrell
https://ebookbell.com/product/programming-logic-and-design-
comprehensive-9th-edition-9th-edition-joyce-farrell-37513870
Programming Logic And Design Comprehensive 8th Edition Joyce Farrell
https://ebookbell.com/product/programming-logic-and-design-
comprehensive-8th-edition-joyce-farrell-4950652
Programming Logic And Design Comprehensive 8th Joyce Farrell
https://ebookbell.com/product/programming-logic-and-design-
comprehensive-8th-joyce-farrell-5551838
3. Programming Logic And Design Comprehensive 6th Edition Joyce Farrell
https://ebookbell.com/product/programming-logic-and-design-
comprehensive-6th-edition-joyce-farrell-4586394
Starting Out With Programming Logic And Design 6e 6th Tony Gaddis
https://ebookbell.com/product/starting-out-with-programming-logic-and-
design-6e-6th-tony-gaddis-54522858
C Programs To Accompany Programming Logic And Design 1st Edition Jo
Ann Smith
https://ebookbell.com/product/c-programs-to-accompany-programming-
logic-and-design-1st-edition-jo-ann-smith-2371708
Just Enough Programming Logic And Design 1st Edition Joyce Farrell
https://ebookbell.com/product/just-enough-programming-logic-and-
design-1st-edition-joyce-farrell-2454550
Starting Out With Programming Logic And Design 3rd Edition Tony Gaddis
https://ebookbell.com/product/starting-out-with-programming-logic-and-
design-3rd-edition-tony-gaddis-4577402
6. This is an electronic version of the print textbook. Due to electronic rights restrictions,
some third party content may be suppressed. Editorial review has deemed that any suppressed
content does not materially affect the overall learning experience. The publisher reserves the right
to remove content from this title at any time if subsequent rights restrictions require it. For
valuable information on pricing, previous editions, changes to current editions, and alternate
formats, please visit www.cengage.com/highered to search by ISBN#, author, title, or keyword for
materials in your areas of interest.
7. P R O G R A M M I N G L O G I C
A N D D E S I G N
COMPREHENSIVE VERSION
9. PROGRAMMING LOGIC
AND DESIGN
COMPREHENSIVE VERSION
JOYCE FARRELL
Australia • Brazil • Japan • Korea • Mexico • Singapore • Spain • United Kingdom • United States
S E V E N T H E D I T I O N
12. APPENDIX E Creating Print Charts . . . . . . . . . . . 624
APPENDIX F Two Variations on the Basic
Structures—case and do-while . . . 626
Glossary . . . . . . . . . . . . . . . . . 633
Index . . . . . . . . . . . . . . . . . . . 653
B R I E F C O N T E N T S
vi
24. Preface
Programming Logic and Design, Comprehensive, Seventh Edition provides the beginning
programmer with a guide to developing structured program logic. This textbook assumes no
programming language experience. The writing is nontechnical and emphasizes good
programming practices. The examples are business examples; they do not assume
mathematical background beyond high school business math. Additionally, the examples
illustrate one or two major points; they do not contain so many features that students become
lost following irrelevant and extraneous details.
The examples in this book have been created to provide students with a sound background in
logic, no matter what programming languages they eventually use to write programs. This
book can be used in a stand-alone logic course that students take as a prerequisite to a
programming course, or as a companion book to an introductory programming text using
any programming language.
Organization and Coverage
Programming Logic and Design, Comprehensive, Seventh Edition introduces students to
programming concepts and enforces good style and logical thinking. General programming
concepts are introduced in Chapter 1. Chapter 2 discusses using data and introduces two
important concepts: modularization and creating high-quality programs. It is important to
emphasize these topics early so that students start thinking in a modular way and concentrate
on making their programs efficient, robust, easy to read, and easy to maintain.
Chapter 3 covers the key concepts of structure, including what structure is, how to recognize
it, and most importantly, the advantages to writing structured programs. This chapter’s
content is unique among programming texts. The early overview of structure presented here
gives students a solid foundation in thinking in a structured way.
Chapters 4, 5, and 6 explore the intricacies of decision making, looping, and array
manipulation. Chapter 7 provides details of file handling so students can create programs that
process a significant amount of data.
In Chapters 8 and 9, students learn more advanced techniques in array manipulation and
modularization. Chapters 10 and 11 provide a thorough yet accessible introduction to
concepts and terminology used in object-oriented programming. Students learn about
classes, objects, instance and static class members, constructors, destructors, inheritance, and
the advantages of object-oriented thinking.
xviii
25. Chapter 12 explores additional object-oriented programming issues: event-driven GUI
programming, multithreading, and animation. Chapter 13 discusses system design issues and
details the features of the Unified Modeling Language. Chapter 14 is a thorough introduction
to important database concepts that business programmers should understand.
The first three appendices give students summaries of numbering systems, flowchart
symbols, and structures. Additional appendices allow students to gain extra experience with
structuring large unstructured programs, creating print charts, and understanding posttest
loops and case structures.
Programming Logic and Design combines text explanation with flowcharts and pseudocode
examples to provide students with alternative means of expressing structured logic.
Numerous detailed, full-program exercises at the end of each chapter illustrate the concepts
explained within the chapter, and reinforce understanding and retention of the material
presented.
Programming Logic and Design distinguishes itself from other programming logic books in
the following ways:
l It is written and designed to be non-language specific. The logic used in this book can be
applied to any programming language.
l The examples are everyday business examples; no special knowledge of mathematics,
accounting, or other disciplines is assumed.
l The concept of structure is covered earlier than in many other texts. Students are
exposed to structure naturally, so they will automatically create properly designed
programs.
l Text explanation is interspersed with both flowcharts and pseudocode so students can
become comfortable with these logic development tools and understand their
interrelationship. Screen shots of running programs also are included, providing students
with a clear and concrete image of the programs’ execution.
l Complex programs are built through the use of complete business examples. Students see
how an application is constructed from start to finish instead of studying only segments of
programs.
Organization and Coverage
xix
26. Features
This text focuses on helping students become better programmers and
understand the big picture in program development through a variety of
key features. In addition to chapter Objectives, Summaries, and Key Terms,
these useful features will help students regardless of their learning style.
The use of flowcharts is excellent. This is a must-have
book for learning programming logic before tackling
the various languages.
—Lori Selby, University of Arkansas at Monticello
FLOWCHARTS, figures,
and illustrations provide
learning experience.
the reader with a visual
VIDEO LESSONS help
explain important chapter
concepts. Videos are part
of the text’s enhanced
CourseMate site.
NOTES provide
additional information—
for example, another
location in the book that
expands on a topic, or a
common error to watch
out for.
xx
27. TWO TRUTHS & A LIE mini quizzes
appear after each chapter section, with
answers provided. The quiz contains
three statements based on the preceding
section of text—two statements are
true and one is false. Answers give
immediate feedback without “giving away”
answers to the multiple-choice questions
and programming problems later in
the chapter. Students also have the option
to take these quizzes electronically
through the enhanced CourseMate site.
THE DON’T DO IT ICON illustrates
how NOT to do something—for
example, having a dead code
path in a program. This icon
provides a visual jolt to the student,
are NOT to be emulated and making
students more careful to recognize
problems in existing code.
xxi
28. Assessment
The material is very well written, clearly
presented, and up to date. All explanations
are very solid, and Farrell’s language is clean,
cogent, and easy to follow.
—Judy Woodruff, Indiana
University-Purdue University Indianapolis
EXERCISES provide opportunities to
practice concepts. These exercises
to explore logical programming
concepts. Each exercise can
pseudocode, or both. In addition,
instructors can assign the exercises as
programming problems to be coded and
executed in a particular programming
language.
REVIEW QUESTIONS test
student comprehension of the
major ideas and techniques
presented. Twenty questions
follow each chapter.
xxii
29. DEBUGGING EXERCISES are
included with each chapter because
examining programs critically and
closely is a crucial programming skill.
Students can download these exercises
at www.cengagebrain.com and through
the CourseMate available for this text.
These files are also available to
instructors through the Instructor
Resources CD and login.cengage.com.
GAME ZONE EXERCISES are included
at the end of each chapter. Students can
create games as an additional entertaining
way to understand key programming
concepts.
ESSAY QUESTIONS present
personal and ethical issues that
programmers must consider. These
questions can be used for written
assignments or as a starting point
for classroom discussion.
xxiii
30. Other Features of the Text
This edition of the text includes many features to help students become better
programmers and understand the big picture in program development. In this edition, all
explanations have been carefully reviewed to provide the clearest possible instruction.
Material that previously was included in margin notes has most frequently been
incorporated into the main text, giving the pages a more streamlined appearance. All the
chapters in this edition contain new programming exercises. All Sixth Edition exercises
that have been replaced are available on the Instructor Resources CD and through login.
cengage.com so instructors can use them as additional assigned exercises or as topics for
class discussions.
l Clear explanations. The language and explanations in this book have been
refined over seven editions, providing the clearest possible explanations of difficult
concepts.
l Emphasis on structure. More than its competitors, this book emphasizes structure.
Chapter 3 provides an early picture of the major concepts of structured programming,
giving students an overview of the principles before they are required to consider program
details.
l Emphasis on modularity. From the second chapter, students are encouraged to write
code in concise, easily manageable, and reusable modules. Instructors have found that
modularization should be encouraged early to instill good habits and a clearer
understanding of structure. This edition uses modularization early, using global variables
instead of local passed and returned values, and saves parameter passing for later when
the student has become more adept.
l Methods as black boxes. The use of methods is consistent with the languages in which
the student is likely to have first programming experiences. In particular, this book
emphasizes using methods as black boxes, declaring all variables and constants as local to
methods, and passing arguments to and receiving returned values from methods as
needed.
l Objectives. Each chapter begins with a list of objectives so the student knows the topics
that will be presented in the chapter. In addition to providing a quick reference to topics
covered, this feature provides a useful study aid.
l Pseudocode. This book includes numerous examples of pseudocode, which illustrate
correct usage of the programming logic and design concepts being taught.
l Chapter summaries. Following each chapter is a summary that recaps the
programming concepts and techniques covered in the chapter. This feature provides a
concise means for students to review and check their understanding of the main points
in each chapter.
l Key terms. Each chapter lists key terms and their definitions; the list appears in the
order the terms are encountered in the chapter. Along with the chapter summary, the
xxiv
P R E F A C E Other Features of the Text
31. list of key terms provides a snapshot overview of a chapter’s main ideas. A glossary at
the end of the book lists all the key terms in alphabetical order, along with working
definitions.
CourseMate
The more you study, the better the results. Make the most of your study time by accessing
everything you need to succeed in one place. Read your textbook, review flashcards, watch
videos, and take practice quizzes online. CourseMate goes beyond the book to deliver what
you need! Learn more at www.cengage.com/coursemate.
The Programming Logic and Design CourseMate includes:
l Video Lessons. Designed and narrated by the author, videos in each chapter explain and
enrich important concepts.
l Two Truths & A Lie and Debugging Exercises. Complete popular exercises from the
text online!
l An interactive eBook with highlighting and note-taking, flashcards, quizzing, study games,
and more!
Instructors may add CourseMate to the textbook package, or students may purchase
CourseMate directly at www.cengagebrain.com.
Instructor Resources
The following teaching tools are available to the instructor on a single CD-ROM. Many are
also available for download through our Instructor Companion Site at login.cengage.com.
l Electronic Instructor’s Manual. The Instructor’s Manual follows the text chapter
by chapter to assist in planning and organizing an effective, engaging course. The
manual includes learning objectives, chapter overviews, lecture notes, ideas for
classroom activities, and abundant additional resources. A sample course syllabus is
also available.
l PowerPoint Presentations. This text provides PowerPoint slides to accompany each
chapter. Slides are included to guide classroom presentation, to make available to
students for chapter review, or to print as classroom handouts. Instructors may
customize the slides, which include the complete figure files from the text, to best
suit their courses.
l Solutions. Solutions to review questions and exercises are provided to assist with
grading.
xxv
Instructor Resources
32. l ExamViewÒ
. This textbook is accompanied by ExamView, a powerful testing software
package that allows instructors to create and administer printed, LAN-based, and Internet
exams. ExamView includes hundreds of questions that correspond to the text, enabling
students to generate detailed study guides that include page references for further review.
The computer-based and Internet testing components allow students to take exams at
their computers, and the components save the instructor time by grading each exam
automatically. These test banks are also available in Blackboard and Angel compatible
formats.
Additional Offerings
You have the option to bundle software with your text. Please contact your Cengage Learning
sales representative for more information.
l PAL Guides. Together with Programming Logic and Design, these brief books, or
PAL guides, provide an excellent opportunity to learn the fundamentals of programming
while gaining exposure to a programming language. Readers will discover how real code
behaves within the context of the traditionally language-independent logic and design
course. PAL guides are available for C++, Java, and Visual Basic; please contact your sales
rep for more information on how to add the PAL guides to your course.
l MicrosoftÒ
Office VisioÒ
Professional 2010, 60-day version. Visio 2010 is a
diagramming program that allows users to create flowcharts and diagrams easily
while working through the text, enabling them to visualize concepts and learn more
effectively.
l Visual LogicTM
software. Visual Logic is a simple but powerful tool for teaching
programming logic and design without traditional high-level programming language
syntax. Visual Logic uses flowcharts to explain the essential programming concepts
discussed in this book, including variables, input, assignment, output, conditions,
loops, procedures, graphics, arrays, and files. Visual Logic also interprets and
executes flowcharts, providing students with immediate and accurate feedback. Visual
Logic combines the power of a high-level language with the ease and simplicity of
flowcharts.
Acknowledgments
I would like to thank all of the people who helped to make this book a reality, especially
Dan Seiter, Development Editor. After seven editions, Dan still finds ways to improve my
explanations so that we can create a book of the highest possible quality. Thanks also to
Alyssa Pratt, Senior Product Manager; Brandi Shailer, Acquisitions Editor; Catherine DiMassa,
Senior Content Project Manager; and Green Pen QA, Technical Editors. I am grateful to be able
to work with so many fine people who are dedicated to producing quality instructional
materials.
xxvi
P R E F A C E Acknowledgments
33. I am indebted to the many reviewers who provided helpful and insightful comments during
the development of this book, including Linda Cohen, Forsyth Tech; Andrew Hurd, Hudson
Valley Community College; George Reynolds, Strayer University; Lori Selby, University of
Arkansas at Monticello; and Judy Woodruff, Indiana University–Purdue University
Indianapolis.
Thanks, too, to my husband, Geoff, and our daughters, Andrea and Audrey, for their support.
This book, as were all its previous editions, is dedicated to them.
–Joyce Farrell
xxvii
Acknowledgments
35. C H A P T E R 1
An Overview
of Computers
and Programming
In this chapter, you will learn about:
Computer systems
Simple program logic
The steps involved in the program development cycle
Pseudocode statements and flowchart symbols
Using a sentinel value to end a program
Programming and user environments
The evolution of programming models
36. Understanding Computer Systems
A computer system is a combination of all the components required to process and store
data using a computer. Every computer system is composed of multiple pieces of hardware
and software.
l Hardware is the equipment, or the physical devices, associated with a computer. For
example, keyboards, mice, speakers, and printers are all hardware. The devices are
manufactured differently for large mainframe computers, laptops, and even smaller
computers that are embedded into products such as cars and thermostats, but the types of
operations performed by different-sized computers are very similar. When you think of a
computer, you often think of its physical components first, but for a computer to be
useful, it needs more than devices; a computer needs to be given instructions. Just as your
stereo equipment does not do much until you provide music, computer hardware needs
instructions that control how and when data items are input, how they are processed, and
the form in which they are output or stored.
l Software is computer instructions that tell the hardware what to do. Software is
programs, which are instruction sets written by programmers. You can buy prewritten
programs that are stored on a disk or that you download from the Web. For example,
businesses use word-processing and accounting programs, and casual computer users
enjoy programs that play music and games. Alternatively, you can write your own
programs. When you write software instructions, you are programming. This book
focuses on the programming process.
Software can be classified into two broad types:
l Application software comprises all the programs you apply to a task, such as word-
processing programs, spreadsheets, payroll and inventory programs, and even games.
l System software comprises the programs that you use to manage your computer,
including operating systems such as Windows, Linux, or UNIX.
This book focuses on the logic used to write application software programs, although many of
the concepts apply to both types of software.
Together, computer hardware and software accomplish three major operations in most
programs:
l Input—Data items enter the computer system and are placed in memory, where they can
be processed. Hardware devices that perform input operations include keyboards and
mice. Data items include all the text, numbers, and other raw material that are entered
into and processed by a computer. In business, many of the data items used are facts and
figures about such entities as products, customers, and personnel. However, data can also
include items such as images, sounds, and a user’s mouse movements.
l Processing—Processing data items may involve organizing or sorting them, checking
them for accuracy, or performing calculations with them. The hardware component that
performs these types of tasks is the central processing unit, or CPU.
2
C H A P T E R 1 An Overview of Computers and Programming
37. l Output—After data items have been processed, the resulting information usually is sent to
a printer, monitor, or some other output device so people can view, interpret, and use the
results. Programming professionals often use the term data for input items, but use the
term information for data that has been processed and output. Sometimes you place
output on storage devices, such as disks or flash media. People cannot read data directly
from these storage devices, but the devices hold information for later retrieval. When you
send output to a storage device, sometimes it is used later as input for another program.
You write computer instructions in a computer programming language such as Visual Basic,
C#, C++, or Java. Just as some people speak English and others speak Japanese, programmers
write programs in different languages. Some programmers work exclusively in one language,
whereas others know several and use the one that is best suited to the task at hand.
The instructions you write using a programming language are called program code; when
you write instructions, you are coding the program.
Every programming language has rules governing its word usage and punctuation. These
rules are called the language’s syntax. Mistakes in a language’s usage are syntax errors. If you
ask, “How the geet too store do I?” in English, most people can figure out what you probably
mean, even though you have not used proper English syntax—you have mixed up the word
order, misspelled a word, and used an incorrect word. However, computers are not nearly as
smart as most people; in this case, you might as well have asked the computer, “Xpu mxv ort
dod nmcad bf B?” Unless the syntax is perfect, the computer cannot interpret the
programming language instruction at all.
When you write a program, you usually type its instructions using a keyboard. When you type
program instructions, they are stored in computer memory, which is a computer’s
temporary, internal storage. Random access memory, or RAM, is a form of internal, volatile
memory. Programs that are currently running and data items that are currently being used
are stored in RAM for quick access. Internal storage is volatile—its contents are lost when the
computer is turned off or loses power. Usually, you want to be able to retrieve and perhaps
modify the stored instructions later, so you also store them on a permanent storage device,
such as a disk. Permanent storage devices are nonvolatile—that is, their contents are
persistent and are retained even when power is lost. If you have had a power loss while
working on a computer, but were able to recover your work when power was restored, it’s not
because the work was still in RAM. Your system has been configured to automatically save
your work at regular intervals on a nonvolatile storage device.
After a computer program is typed using programming language statements and stored in
memory, it must be translated to machine language that represents the millions of on/off
circuits within the computer. Your programming language statements are called source
code, and the translated machine language statements are object code.
Each programming language uses a piece of software, called a compiler or an interpreter, to
translate your source code into machine language. Machine language is also called binary
language, and is represented as a series of 0s and 1s. The compiler or interpreter that
translates your code tells you if any programming language component has been used
incorrectly. Syntax errors are relatively easy to locate and correct because your compiler or
interpreter highlights them. If you write a computer program using a language such as C++
3
Understanding Computer Systems
38. but spell one of its words incorrectly or reverse the proper order of two words, the software
lets you know that it found a mistake by displaying an error message as soon as you try to
translate the program.
Although there are differences in how compilers and interpreters work, their basic function is the same—to
translate your programming statements into code the computer can use. When you use a compiler, an entire
program is translated before it can execute; when you use an interpreter, each instruction is translated just
prior to execution. Usually, you do not choose which type of translation to use—it depends on the
programming language. However, there are some languages for which both compilers and interpreters are
available.
After a program’s source code is successfully translated to machine language, the computer
can carry out the program instructions. When instructions are carried out, a program runs,
or executes. In a typical program, some input will be accepted, some processing will occur,
and results will be output.
Besides the popular, comprehensive programming languages such as Java and C++, many programmers
use scripting languages (also called scripting programming languages or script languages) such as
Python, Lua, Perl, and PHP. Scripts written in these languages usually can be typed directly from a keyboard
and are stored as text rather than as binary executable files. Scripting language programs are interpreted
line by line each time the program executes, instead of being stored in a compiled (binary) form. Still, with all
programming languages, each instruction must be translated to machine language before it can execute.
TWO TRUTHS & A LIE
Understanding Computer Systems
In each Two Truths and a Lie section, two of the numbered statements are true, and one
is false. Identify the false statement and explain why it is false.
1. Hardware is the equipment, or the devices, associated with a computer.
Software is computer instructions.
2. The grammar rules of a computer programming language are its syntax.
3. You write programs using machine language, and translation software converts
the statements to a programming language.
.s1 dna s0 si hcihw ,egaugnal enihcam ot stnemetats eht strevnoc
)reterpretni ro relipmoc a dellac( margorp noitalsnart a dna ,avaJ ro cisaB lausiV sa
hcus egaugnal gnimmargorp a gnisu smargorp etirw uoY .3# si tnemetats eslaf ehT
4
C H A P T E R 1 An Overview of Computers and Programming
39. Understanding Simple Program Logic
A program with syntax errors cannot be fully translated and cannot execute. A program with
no syntax errors is translatable and can execute, but it still might contain logical errors and
produce incorrect output as a result. For a program to work properly, you must develop
correct logic; that is, you must write program instructions in a specific sequence, you must
not leave any instructions out, and you must not add extraneous instructions.
Suppose you instruct someone to
make a cake as follows:
Get a bowl
Stir
Add two eggs
Add a gallon of gasoline
Bake at 350 degrees for 45 minutes
Add three cups of flour
The dangerous cake-baking instructions are shown with a Don’t Do It icon. You will see this icon when the
book contains an unrecommended programming practice that is used as an example of what not to do.
Even though the cake-baking instructions use English language syntax correctly, the
instructions are out of sequence, some are missing, and some instructions belong to
procedures other than baking a cake. If you follow these instructions, you will not make an
edible cake, and you may end up with a disaster. Many logical errors are more difficult to
locate than syntax errors—it is easier for you to determine whether eggs is spelled incorrectly
in a recipe than it is for you to tell if there are too many eggs or if they are added too soon.
Just as baking directions can be provided in Mandarin, Urdu, or Spanish, program logic can
be expressed correctly in any number of programming languages. Because this book is not
concerned with a specific language, the programming examples could have been written in
Visual Basic, C++, or Java. For convenience, this book uses instructions written in English!
After you learn French, you automatically know, or can easily figure out, many Spanish words. Similarly, after
you learn one programming language, it is much easier to understand several other languages.
Most simple computer programs include steps that perform input, processing, and output.
Suppose you want to write a computer program to double any number you provide. You can
write the program in a programming language such as Visual Basic or Java, but if you were to
write it using English-like statements, it would look like this:
input myNumber
set myAnswer = myNumber * 2
output myAnswer
Don’t Do It
Don't bake a cake like
this!
5
Understanding Simple Program Logic
40. The number-doubling process includes three instructions:
l The instruction to input myNumber is an example of an input operation. When the
computer interprets this instruction, it knows to look to an input device to obtain a
number. When you work in a specific programming language, you write instructions that
tell the computer which device to access for input. For example, when a user enters a
number as data for a program, the user might click on the number with a mouse, type it
from a keyboard, or speak it into a microphone. Logically, however, it doesn’t matter
which hardware device is used, as long as the computer knows to accept a number. When
the number is retrieved from an input device, it is placed in the computer’s memory in a
variable named myNumber. A variable is a named memory location whose value can vary—
for example, the value of myNumber might be 3 when the program is used for the first time
and 45 when it is used the next time. In this book, variable names will not contain
embedded spaces; for example, the book will use myNumber instead of my Number.
From a logical perspective, when you input, process, or output a value, the hardware device is irrelevant. The
same is true in your daily life. If you follow the instruction “Get eggs for the cake,” it does not really matter if
you purchase them from a store or harvest them from your own chickens—you get the eggs either way.
There might be different practical considerations to getting the eggs, just as there are for getting data from
a large database as opposed to getting data from an inexperienced user working at home on a laptop
computer. For now, this book is only concerned with the logic of operations, not the minor details.
l The instruction set myAnswer = myNumber * 2 is an example of a processing operation.
In most programming languages, an asterisk is used to indicate multiplication, so this
instruction means “Change the value of the memory location myAnswer to equal the value
at the memory location myNumber times two.” Mathematical operations are not the only
kind of processing operations, but they are very typical. As with input operations, the type
of hardware used for processing is irrelevant—after you write a program, it can be used on
computers of different brand names, sizes, and speeds.
l In the number-doubling program, the output myAnswer instruction is an example of an
output operation. Within a particular program, this statement could cause the output to
appear on the monitor (which might be a flat-panel plasma screen or a cathode-ray tube),
or the output could go to a printer (which could be laser or ink-jet), or the output could
be written to a disk or DVD. The logic of the output process is the same no matter what
hardware device you use. When this instruction executes, the value stored in memory at
the location named myAnswer is sent to an output device. (The output value also remains
in computer memory until something else is stored at the same memory location or
power is lost.)
Watch the video A Simple Program.
6
C H A P T E R 1 An Overview of Computers and Programming
41. Computer memory consists of millions of numbered locations where data can be stored. The memory
location of myNumber has a specific numeric address, but when you write programs, you seldom need to
be concerned with the value of the memory address; instead, you use the easy-to-remember name you
created. Computer programmers often refer to memory addresses using hexadecimal notation, or base 16.
Using this system, they might use a value like 42FF01A to refer to a memory address. Despite the use of
letters, such an address is still a hexadecimal number. Appendix A contains information on this numbering
system.
TWO TRUTHS & A LIE
Understanding Simple Program Logic
1. A program with syntax errors can execute but might produce incorrect results.
2. Although the syntax of programming languages differs, the same program logic
can be expressed in different languages.
3. Most simple computer programs include steps that perform input, processing,
and output.
.stluser tcerrocni ecudorp thgim tub ,etucexe nac srorre xatnys on htiw
margorp a ;etucexe tonnac srorre xatnys htiw margorp A .1# si tnemetats eslaf ehT
Understanding the Program Development Cycle
A programmer’s job involves writing instructions (such as those in the doubling program in
the preceding section), but a professional programmer usually does not just sit down at a
computer keyboard and start typing. Figure 1-1 illustrates the program development cycle,
which can be broken down into at least seven steps:
1. Understand the problem.
2. Plan the logic.
3. Code the program.
4. Use software (a compiler or interpreter) to translate the program into machine
language.
5. Test the program.
6. Put the program into production.
7. Maintain the program.
7
Understanding the Program Development Cycle
42. Understanding the Problem
Professional computer programmers write programs to satisfy the needs of others, called
users or end users. Examples of end users include a Human Resources department that
needs a printed list of all employees, a Billing department that wants a list of clients who are
30 or more days overdue on their payments, and an Order department that needs a Web site
to provide buyers with an online shopping cart. Because programmers are providing a service
to these users, programmers must first understand what the users want. When a program
runs, you usually think of the logic as a cycle of input-processing-output operations, but when
you plan a program, you think of the output first. After you understand what the desired
result is, you can plan the input and processing steps to achieve it.
Suppose the director of Human Resources says to a programmer, “Our department needs a
list of all employees who have been here over five years, because we want to invite them to a
special thank-you dinner.” On the surface, this seems like a simple request. An experienced
programmer, however, will know that the request is incomplete. For example, you might not
know the answers to the following questions about which employees to include:
l Does the director want a list of full-time employees only, or a list of full- and part-time
employees together?
l Does she want to include people who have worked for the company on a month-to-
month contractual basis over the past five years, or only regular, permanent employees?
l Do the listed employees need to have worked for the organization for five years as of
today, as of the date of the dinner, or as of some other cutoff date?
l What about an employee who worked three years, took a two-year leave of absence, and
has been back for three years?
Understand
the problem
Test the
program
Put the program
into production
Maintain the
program
Plan the
logic
Translate the
code
Write the
code
Figure 1-1 The program development cycle
8
C H A P T E R 1 An Overview of Computers and Programming
43. The programmer cannot make any of these decisions; the user (in this case, the Human
Resources director) must address these questions.
More decisions still might be required. For example:
l What data should be included for each listed employee? Should the list contain both first
and last names? Social Security numbers? Phone numbers? Addresses?
l Should the list be in alphabetical order? Employee ID number order? Length-of-service
order? Some other order?
l Should the employees be grouped by any criteria, such as department number or years of
service?
Several pieces of documentation are often provided to help the programmer understand the
problem. Documentation consists of all the supporting paperwork for a program; it might
include items such as original requests for the program from users, sample output, and
descriptions of the data items available for input.
Fully understanding the problem may be one of the most difficult aspects of programming.
On any job, the description of what the user needs may be vague—worse yet, users may not
really know what they want, and users who think they know frequently change their minds
after seeing sample output. A good programmer is often part counselor, part detective!
Watch the video The Program Development Cycle, Part 1.
Planning the Logic
The heart of the programming process lies in planning the program’s logic. During this phase
of the process, the programmer plans the steps of the program, deciding what steps to include
and how to order them. You can plan the solution to a problem in many ways. The two most
common planning tools are flowcharts and pseudocode. Both tools involve writing the steps
of the program in English, much as you would plan a trip on paper before getting into the car
or plan a party theme before shopping for food and favors.
You may hear programmers refer to planning a program as “developing an algorithm.” An
algorithm is the sequence of steps necessary to solve any problem.
In addition to flowcharts and pseudocode, programmers use a variety of other tools to help in program
development. One such tool is an IPO chart, which delineates input, processing, and output tasks. Some
object-oriented programmers also use TOE charts, which list tasks, objects, and events.
The programmer shouldn’t worry about the syntax of any particular language during the
planning stage, but should focus on figuring out what sequence of events will lead from the
available input to the desired output. Planning the logic includes thinking carefully about all
9
Understanding the Program Development Cycle
44. the possible data values a program might encounter and how you want the program to handle
each scenario. The process of walking through a program’s logic on paper before you actually
write the program is called desk-checking. You will learn more about planning the logic
throughout this book; in fact, the book focuses on this crucial step almost exclusively.
Coding the Program
After the logic is developed, only then can the programmer write the source code for a
program. Hundreds of programming languages are available. Programmers choose particular
languages because some have built-in capabilities that make them more efficient than others
at handling certain types of operations. Despite their differences, programming languages are
quite alike in their basic capabilities—each can handle input operations, arithmetic
processing, output operations, and other standard functions. The logic developed to solve a
programming problem can be executed using any number of languages. Only after choosing a
language must the programmer be concerned with proper punctuation and the correct
spelling of commands—in other words, using the correct syntax.
Some experienced programmers can successfully combine logic planning and program
coding in one step. This may work for planning and writing a very simple program, just as you
can plan and write a postcard to a friend using one step. A good term paper or a Hollywood
screenplay, however, needs planning before writing—and so do most programs.
Which step is harder: planning the logic or coding the program? Right now, it may seem to
you that writing in a programming language is a very difficult task, considering all the spelling
and syntax rules you must learn. However, the planning step is actually more difficult. Which
is more difficult: thinking up the twists and turns to the plot of a best-selling mystery novel, or
writing a translation of an existing novel from English to Spanish? And who do you think gets
paid more, the writer who creates the plot or the translator? (Try asking friends to name any
famous translator!)
Using Software to Translate the Program into Machine Language
Even though there are many programming languages, each computer knows only one
language—its machine language, which consists of 1s and 0s. Computers understand machine
language because they are made up of thousands of tiny electrical switches, each of which can
be set in either the on or off state, which is represented by a 1 or 0, respectively.
Languages like Java or Visual Basic are available for programmers because someone has
written a translator program (a compiler or interpreter) that changes the programmer’s
English-like high-level programming language into the low-level machine language that the
computer understands. When you learn the syntax of a programming language, the
commands work on any machine on which the language software has been installed.
However, your commands then are translated to machine language, which differs in various
computer makes and models.
10
C H A P T E R 1 An Overview of Computers and Programming
45. If you write a programming statement incorrectly (for example, by misspelling a word, using a
word that doesn’t exist in the language, or using “illegal” grammar), the translator program
doesn’t know how to proceed and issues an error message identifying a syntax error.
Although making errors is never desirable, syntax errors are not a major concern to
programmers, because the compiler or interpreter catches every syntax error and displays a
message that notifies you of the problem. The computer will not execute a program that
contains even one syntax error.
Typically, a programmer develops logic, writes the code, and compiles the program, receiving
a list of syntax errors. The programmer then corrects the syntax errors and compiles the
program again. Correcting the first set of errors frequently reveals new errors that originally
were not apparent to the compiler. For example, if you could use an English compiler and
submit the sentence The dg chase the cat, the compiler at first might point out only one
syntax error. The second word, dg, is illegal because it is not part of the English language.
Only after you corrected the word to dog would the compiler find another syntax error on the
third word, chase, because it is the wrong verb form for the subject dog. This doesn’t mean
chase is necessarily the wrong word. Maybe dog is wrong; perhaps the subject should be dogs,
in which case chase is right. Compilers don’t always know exactly what you mean, nor do they
know what the proper correction should be, but they do know when something is wrong with
your syntax.
Watch the video The Program Development Cycle, Part 2.
When writing a program, a programmer might need to recompile the code several times. An
executable program is created only when the code is free of syntax errors. After a program has
been translated into machine language, the machine language program is saved and can be
run any number of times without repeating the translation step. You only need to retranslate
your code if you make changes to your source code statements. Figure 1-2 shows a diagram of
this entire process.
11
Understanding the Program Development Cycle
46. Testing the Program
A program that is free of syntax errors is not necessarily free of logical errors. A logical error
results when you use a syntactically correct statement but use the wrong one for the current
context. For example, the English sentence The dog chases the cat, although syntactically
perfect, is not logically correct if the dog chases a ball or the cat is the aggressor.
Once a program is free of syntax errors, the programmer can test it—that is, execute it with
some sample data to see whether the results are logically correct. Recall the number-doubling
program:
input myNumber
set myAnswer = myNumber * 2
output myAnswer
If you execute the program, provide the value 2 as input to the program, and the answer 4 is
displayed, you have executed one successful test run of the program.
However, if the answer 40 is displayed, maybe the program contains a logical error. Maybe
the second line of code was mistyped with an extra zero, so that the program reads:
input myNumber
set myAnswer = myNumber * 20
output myAnswer
Placing 20 instead of 2 in the multiplication statement caused a logical error. Notice that
nothing is syntactically wrong with this second program—it is just as reasonable to multiply a
number by 20 as by 2—but if the programmer intends only to double myNumber, then a logical
error has occurred.
Write and correct
the program code
Compile the
program
Executable
program
Data that the
program uses
List of
syntax
error
messages
Program
output
If there are no
syntax errors
If there are
syntax errors
Figure 1-2 Creating an executable program
Don’t Do It
The programmer typed
20 instead of 2.
12
C H A P T E R 1 An Overview of Computers and Programming
47. The process of finding and correcting program errors is called debugging. You debug a
program by testing it using many sets of data. For example, if you write the program to
double a number, then enter 2 and get an output value of 4, that doesn’t necessarily mean
you have a correct program. Perhaps you have typed this program by mistake:
input myNumber
set myAnswer = myNumber + 2
output myAnswer
An input of 2 results in an answer of 4, but that doesn’t mean your program doubles
numbers—it actually only adds 2 to them. If you test your program with additional data and
get the wrong answer—for example, if you enter 7 and get an answer of 9—you know there is
a problem with your code.
Selecting test data is somewhat of an art in itself, and it should be done carefully. If the Human
Resources department wants a list of the names of five-year employees, it would be a mistake to
test the program with a small sample file of only long-term employees. If no newer employees
are part of the data being used for testing, you do not really know if the program would have
eliminated them from the five-year list. Many companies do not know that their software has a
problem until an unusual circumstance occurs—for example, the first time an employee has
more than nine dependents, the first time a customer orders more than 999 items at a time, or
when the Internet runs out of allocated IP addresses, a problem known as IPV4 exhaustion.
Putting the Program into Production
Once the program is thoroughly tested and debugged, it is ready for the organization to use.
Putting the program into production might mean simply running the program once, if it was
written to satisfy a user’s request for a special list. However, the process might take months if
the program will be run on a regular basis, or if it is one of a large system of programs being
developed. Perhaps data-entry people must be trained to prepare the input for the new
program, users must be trained to understand the output, or existing data in the company
must be changed to an entirely new format to accommodate this program. Conversion, the
entire set of actions an organization must take to switch over to using a new program or set of
programs, can sometimes take months or years to accomplish.
Maintaining the Program
After programs are put into production, making necessary changes is called maintenance.
Maintenance can be required for many reasons: for example, because new tax rates are
legislated, the format of an input file is altered, or the end user requires additional information
not included in the original output specifications. Frequently, your first programming job will
require maintaining previously written programs. When you maintain the programs others
have written, you will appreciate the effort the original programmer put into writing clear
Don’t Do It
The programmer typed
"+" instead of "*".
13
Understanding the Program Development Cycle
48. code, using reasonable variable names, and documenting his or her work. When you make
changes to existing programs, you repeat the development cycle. That is, you must
understand the changes, then plan, code, translate, and test them before putting them into
production. If a substantial number of program changes are required, the original program
might be retired, and the program development cycle might be started for a new program.
Watch the video The Program Development Cycle, Part 3.
TWO TRUTHS & A LIE
Understanding the Program Development Cycle
1. Understanding the problem that must be solved can be one of the most difficult
aspects of programming.
2. The two most commonly used logic-planning tools are flowcharts and
pseudocode.
3. Flowcharting a program is a very different process if you use an older
programming language instead of a newer one.
.segaugnal fo rebmun yna gnisu detucexe eb nac melborp gnimmargorp a evlos ot
depoleved cigol ehT .snoitcnuf dradnats rehto dna ,snoitarepo tuptuo ,gnissecorp
citemhtira ,snoitarepo tupni eldnah nac hcae—seitilibapac cisab rieht ni ekila etiuq
era segaugnal gnimmargorp ,secnereffid rieht etipseD .3# si tnemetats eslaf ehT
Using Pseudocode Statements and Flowchart Symbols
When programmers plan the logic for a solution to a programming problem, they often use
one of two tools: pseudocode (pronounced sue-doe-code) or flowcharts.
l Pseudocode is an English-like representation of the logical steps it takes to solve a
problem. Pseudo is a prefix that means false, and to code a program means to put it in a
programming language; therefore, pseudocode simply means false code, or sentences that
appear to have been written in a computer programming language but do not necessarily
follow all the syntax rules of any specific language.
l A flowchart is a pictorial representation of the same thing.
14
C H A P T E R 1 An Overview of Computers and Programming
49. Writing Pseudocode
You have already seen examples of statements that represent pseudocode earlier in this
chapter, and there is nothing mysterious about them. The following five statements constitute
a pseudocode representation of a number-doubling problem:
start
input myNumber
set myAnswer = myNumber * 2
output myAnswer
stop
Using pseudocode involves writing down all the steps you will use in a program. Usually,
programmers preface their pseudocode with a beginning statement like start and end it with
a terminating statement like stop. The statements between start and stop look like English
and are indented slightly so that start and stop stand out. Most programmers do not bother
with punctuation such as periods at the end of pseudocode statements, although it would not
be wrong to use them if you prefer that style. Similarly, there is no need to capitalize the first
word in a sentence, although you might choose to do so. This book follows the conventions of
using lowercase letters for verbs that begin pseudocode statements and omitting periods at
the end of statements.
Pseudocode is fairly flexible because it is a planning tool, and not the final product. Therefore,
for example, you might prefer any of the following:
l Instead of start and stop, some pseudocode developers would use other terms such as
begin and end.
l Instead of writing input myNumber, some developers would write get myNumber or read
myNumber.
l Instead of writing set myAnswer = myNumber * 2, some developers would write
calculate myAnswer = myNumber times 2 or compute myAnswer as myNumber doubled.
l Instead of writing output myAnswer, many pseudocode developers would write display
myAnswer, print myAnswer, or write myAnswer.
The point is, the pseudocode statements are instructions to retrieve an original number from
an input device and store it in memory where it can be used in a calculation, and then to get
the calculated answer from memory and send it to an output device so a person can see it.
When you eventually convert your pseudocode to a specific programming language, you do
not have such flexibility because specific syntax will be required. For example, if you use the
C# programming language and write the statement to output the answer to the monitor, you
will code the following:
Console.Write(myAnswer);
The exact use of words, capitalization, and punctuation are important in the C# statement,
but not in the pseudocode statement.
15
Using Pseudocode Statements and Flowchart Symbols
50. Drawing Flowcharts
Some professional programmers prefer writing pseudocode to drawing flowcharts, because
using pseudocode is more similar to writing the final statements in the programming
language. Others prefer drawing flowcharts to represent the logical flow, because flowcharts
allow programmers to visualize more easily how the program statements will connect.
Especially for beginning programmers, flowcharts are an excellent tool to help them visualize
how the statements in a program are interrelated.
You can draw a flowchart by hand or use software, such as Microsoft Word and Microsoft
PowerPoint, that contains flowcharting tools. You can use several other software programs,
such as Visio and Visual Logic, specifically to create
flowcharts. When you create a flowchart, you draw
geometric shapes that contain the individual statements
and that are connected with arrows. (Appendix B
contains a summary of all the flowchart symbols you will
see in this book.) You use a parallelogram to represent
an input symbol, which indicates an input operation.
You write an input statement in English inside the
parallelogram, as shown in Figure 1-3.
Arithmetic operation statements are examples of
processing. In a flowchart, you use a rectangle as the
processing symbol that contains a processing statement,
as shown in Figure 1-4.
To represent an output statement, you use the same
symbol as for input statements—the output symbol is a
parallelogram, as shown in Figure 1-5. Because the
parallelogram is used for both input and output, it is often
called the input/output symbol or I/O symbol.
Some software programs that use flowcharts (such as Visual Logic) use a left-slanting parallelogram to
represent output. As long as the flowchart creator and the flowchart reader are communicating, the actual
shape used is irrelevant. This book will follow the most standard convention of using the right-slanting
parallelogram for both input and output.
To show the correct sequence of these statements, you use arrows, or flowlines, to connect
the steps. Whenever possible, most of a flowchart should read from top to bottom or from left
to right on a page. That’s the way we read English, so when flowcharts follow this convention,
they are easier for us to understand.
To be complete, a flowchart should include two more elements: terminal symbols, or start/
stop symbols, at each end. Often, you place a word like start or begin in the first terminal
symbol and a word like end or stop in the other. The standard terminal symbol is shaped like
a racetrack; many programmers refer to this shape as a lozenge, because it resembles the
shape of the medication you might use to soothe a sore throat. Figure 1-6 shows a complete
flowchart for the program that doubles a number, and the pseudocode for the same problem.
input myNumber
Figure 1-3 Input symbol
set myAnswer =
myNumber * 2
Figure 1-4 Processing symbol
output myAnswer
Figure 1-5 Output symbol
16
C H A P T E R 1 An Overview of Computers and Programming
51. You can see from the figure that the flowchart and pseudocode statements are the same—
only the presentation format differs.
Programmers seldom create both pseudocode and a flowchart for the same problem. You
usually use one or the other. In a large program, you might even prefer to write pseudocode
for some parts and to draw a flowchart for others.
When you tell a friend how to get to your house, you might write a series of instructions or
you might draw a map. Pseudocode is similar to written, step-by-step instructions; a
flowchart, like a map, is a visual representation of the same thing.
Repeating Instructions
After the flowchart or pseudocode has been developed, the programmer only needs to: (1)
buy a computer, (2) buy a language compiler, (3) learn a programming language, (4) code the
program, (5) attempt to compile it, (6) fix the syntax errors, (7) compile it again, (8) test it
with several sets of data, and (9) put it into production.
“Whoa!” you are probably saying to yourself. “This is simply not worth it! All that work to
create a flowchart or pseudocode, and then all those other steps? For five dollars, I can buy a
pocket calculator that will double any number for me instantly!” You are absolutely right. If
this were a real computer program, and all it did was double the value of a number, it would
not be worth the effort. Writing a computer program would be worthwhile only if you had
many numbers (let’s say 10,000) to double in a limited amount of time—let’s say the next two
minutes.
start
Flowchart Pseudocode
stop
input myNumber
output myAnswer
set myAnswer =
myNumber * 2
start
input myNumber
set myAnswer = myNumber * 2
output myAnswer
stop
Figure 1-6 Flowchart and pseudocode of program that doubles a number
17
Using Pseudocode Statements and Flowchart Symbols
52. Unfortunately, the program represented in Figure 1-6 does not double 10,000 numbers; it
doubles only one. You could execute the program 10,000 times, of course, but that would
require you to sit at the computer and run the program over and over again. You would be
better off with a program that could process 10,000 numbers, one after the other.
One solution is to write the program shown in Figure 1-7 and execute the same steps 10,000
times. Of course, writing this program would be very time consuming; you might as well buy
the calculator.
A better solution is to have the computer execute the same set of three instructions over and
over again, as shown in Figure 1-8. The repetition of a series of steps is called a loop. With this
approach, the computer gets a number, doubles it, displays the answer, and then starts again
with the first instruction. The same spot in memory, called myNumber, is reused for the second
number and for any subsequent numbers. The spot in memory named myAnswer is reused
each time to store the result of the multiplication operation. However, the logic illustrated in
the flowchart in Figure 1-8 contains a major problem—the sequence of instructions never
ends. This programming situation is known as an infinite loop—a repeating flow of logic with
no end. You will learn one way to handle this problem later in this chapter; you will learn a
superior way in Chapter 3.
start
input myNumber
set myAnswer = myNumber * 2
output myAnswer
input myNumber
set myAnswer = myNumber * 2
output myAnswer
input myNumber
set myAnswer = myNumber * 2
output myAnswer
…and so on for 9,997 more times
Don’t Do It
You would never want to
write such a repetitious
list of instructions.
Figure 1-7 Inefficient pseudocode for program that doubles 10,000 numbers
18
C H A P T E R 1 An Overview of Computers and Programming
53. TWO TRUTHS & A LIE
Using Pseudocode Statements and Flowchart Symbols
1. When you draw a flowchart, you use a parallelogram to represent an input
operation.
2. When you draw a flowchart, you use a parallelogram to represent a processing
operation.
3. When you draw a flowchart, you use a parallelogram to represent an output
operation.
.noitarepo gnissecorp a tneserper
ot elgnatcer a esu uoy ,trahcwolf a ward uoy nehW .2# si tnemetats eslaf ehT
Using a Sentinel Value to End a Program
The logic in the flowchart for doubling numbers, shown in Figure 1-8, has a major flaw—the
program contains an infinite loop. If, for example, the input numbers are being entered at the
keyboard, the program will keep accepting numbers and outputting their doubled values
forever. Of course, the user could refuse to type any more numbers. But the program cannot
progress any further while it is waiting for input; meanwhile, the program is occupying
computer memory and tying up operating system resources. Refusing to enter any more
numbers is not a practical solution. Another way to end the program is simply to turn off the
start
input myNumber
output myAnswer
set myAnswer =
myNumber * 2
Don’t Do It
This logic saves
steps, but it has a
fatal flaw – it never
ends.
Figure 1-8 Flowchart of infinite number-doubling program
19
Using a Sentinel Value to End a Program
54. computer. But again, that’s neither the best solution nor an elegant way for the program
to end.
A superior way to end the program is to set a predetermined value for myNumber that means
“Stop the program!” For example, the programmer and the user could agree that the user will
never need to know the double of 0 (zero), so the user could enter a 0 to stop. The program
could then test any incoming value contained in myNumber and, if it is a 0, stop the program.
Testing a value is also called making a decision.
You represent a decision in a flowchart by drawing a decision symbol, which is shaped like a
diamond. The diamond usually contains a question, the answer to which is one of two
mutually exclusive options—often yes or no. All good computer questions have only two
mutually exclusive answers, such as yes and no or true and false. For example, “What day of
the year is your birthday?” is not a good computer question because there are 366 possible
answers. However, “Is your birthday June 24?” is a good computer question because the
answer is always either yes or no.
The question to stop the doubling program should be “Is the value of myNumber just entered
equal to 0?” or “myNumber = 0?” for short. The complete flowchart will now look like the one
shown in Figure 1-9.
One drawback to using 0 to stop a program, of course, is that it won’t work if the user does
need to find the double of 0. In that case, some other data-entry value that the user never will
stop
myNumber
= 0?
Yes
No
start
input myNumber
output myAnswer
set myAnswer =
myNumber times 2
Don’t Do It
This logic is not
structured; you will
learn about structure
in Chapter 3.
Figure 1-9 Flowchart of number-doubling program with sentinel value of 0
20
C H A P T E R 1 An Overview of Computers and Programming
59. The Project Gutenberg eBook of A Noble
Queen: A Romance of Indian History (Volume
3 of 3)
60. This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.
Title: A Noble Queen: A Romance of Indian History (Volume 3 of 3)
Author: Meadows Taylor
Release date: January 29, 2014 [eBook #44789]
Most recently updated: October 24, 2024
Language: English
Credits: Produced by Moti Ben-Ari and the Online Distributed
Proofreading Team at http://www.pgdp.net (This file was
produced from images generously made available by The
Internet Archive)
*** START OF THE PROJECT GUTENBERG EBOOK A NOBLE QUEEN:
A ROMANCE OF INDIAN HISTORY (VOLUME 3 OF 3) ***
61. A NOBLE QUEEN:
A ROMANCE OF INDIAN HISTORY.
BY
MEADOWS TAYLOR,
C.S.I., M.R.A.S., M.R.I.A., &c.
AUTHOR OF 'SEBTA,' 'TARA,' AND OTHER TALES.
'O, never was there queen
So mightily betray'd!'
Antony and Cleopatra, act i. sc. iii.
IN THREE VOLUMES.
VOL III.
LONDON:
C. KEGAN PAUL & CO., 1 PATERNOSTER SQUARE.
1878.
(The rights of translation and of reproduction are reserved.)
63. CONTENTS
OF
THE THIRD VOLUME.
BOOK IV.
CHAPTER PAGE
I.THE KING'S ENTRY 1
II.PARDON 11
III.THE TRIAL 25
IV.FREEDOM 50
V.CHANGES IN SOME POSITIONS 68
VI.PROCEEDINGS AT GOA 85
VII.THE INQUISITION 104
VIII.A DEATH, A MARRIAGE, AND A DEPARTURE 126
BOOK V.
I.A SKETCH OF LOCAL HISTORY 148
II.A PLEASANT JOURNEY 154
III.THE PROGRESS OF THE SIEGE 168
IV.THE ASSAULT 187
V.DIEGO'S DEATH AND THE BISHOP'S EMBASSY 208
VI.PEACE FOR AWHILE 228
VII.THE SECOND SIEGE OPENS 244
VIII.THE LAST TRAGEDY 257
IX.CONCLUSION 273
NOTE 286
GLOSSARY 287
65. CHAPTER I.
THE KING'S ENTRY.
The triumphal entry of King Ibrahim II. into his capital was not only
a glorious sight to its people, but an assurance that the long and
disastrous wars between the rival States of Beejapoor and
Ahmednugger were at an end. King Ibrahim had kept the field
against the conspiracy of his cousin, the Prince Ismail, who was
supported by a large portion of his own army under Eyn-ool-Moolk,
and by his uncle, Boorhan Nizam, Shah of Ahmednugger; and
against the possible advance of the Portuguese of Goa, whose skill in
war was well known in the Dekhan. The King of Ahmednugger,
however, could make no impression on the Beejapoor troops, who
defended the frontier stoutly, and, falling ill, died in his camp at
Puraindah. His son Ibrahim, a youth, was placed upon the throne,
and soon after again pressed the war against Beejapoor, which
brought on the general action in which Humeed Khan, the uncle of
Abbas Khan, had proved victorious; and as the troops of
Ahmednugger fled from the field with the loss of the whole of their
artillery and war elephants, the long continued struggle came to an
end, and the Royal army returned to Beejapoor, escorting their King
in triumph. "On the 18th Mohorrum," writes the historian of the
period, "the King made a triumphant entry into Beejapoor amid the
acclamation of the people, who on this occasion had adorned the
streets with gold and silver tissues, velvets, brocades, and other rich
cloths and ornaments." But it was not the splendour of the spectacle
which gratified the people; it was the assurance of safety and
security from further disturbance, for which all were thankful. Those
who had wavered in their allegiance now declared a hearty loyalty;
and the southern invaders, under the Hindoo Prince of Penkonda,
who had joined the conspiracy on the assurance of the conspirators
66. that they might thus regain the dominions they had lost, having
been defeated and driven back, there remained no part of the
Beejapoor dominions that was not in profound peace after a long
series of years of rebellion; and the people rejoiced in a real
gladness which had not been felt for several generations.
As we already know, the force under Abbas Khan had marched
northwards to the aid of the King; but as the rainy season was at its
height, King Ibrahim had taken up his position at the fort of
Shahdroog, or Nuldroog, and had left Humeed Khan with the main
body of the army to watch the frontier and repel incursion should it
take place. Abbas Khan, therefore, on receiving orders from the
King, had marched to join his uncle, and arrived in time to take part
in the finally victorious battle.
From his uncle he had received a very hearty and affectionate
welcome, the particulars of which need not be recorded here; and it
was with a great satisfaction that the veteran commander heard the
details of the combat in the presence of the Queen Dowager, and
the discovery of Osman Beg's treason. Abbas Khan had, indeed, to
recount all the passages in his life which we already know of, which
to his uncle had been so grievously misrepresented. There was
nothing left but for Abbas Khan to show his valour in the next
engagement that ensued, which proved to be a very severe one, for
the left wing of the Beejapoor troops was broken by an impetuous
charge of ten thousand of the Ahmednugger cavalry. Many nobles
and high officers of rank were slain, and many fugitives rode at once
to the King's camp declaring that the whole army had been routed.
For three days the King was in the last degree of anxious
uncertainty, till a despatch from Humeed Khan, sent by the hand of
his nephew, who could describe the action, assured him of the most
perfect victory. Then it was, too, that the day might have gone hard
for the Royal army but for the exertions and daring bravery of the
fresh force under his nephew; and he related, also, how bravely the
enemy's heavy battery had been stormed by the Beydurs, who
appeared unconscious of danger, and how both Abyssinians and
Dekhan cavalry had vied with each other under their young leader.
67. In a few days the King's forces joined those under Humeed Khan
near Sholapoor, where public thanksgiving was made for the close of
the war, and some rewards and honours were publicly bestowed. But
the grand ceremony of all was to take place at Beejapoor on the day
of entry into the capital; and the King, carrying with him the whole
of his army, with the trophies in artillery and elephants, Royal camp
equipage and treasure that had been won, crossed the Bheema river
slowly, and, as we know, safely reached his destination.
While in camp together, our friends Runga Naik and Abbas Khan had
held many an anxious conversation on the subject of the old Syud
Dervish and Zóra. Runga had told him of the forcible abduction of
the girl, and of her rescue by himself and Burma; how, when he was
obliged to leave Korikul, he had made her and the Syud over to
Burma's care, but from that time he had no news of them.
If they had left Kukeyra they might be at Sugger, or, possibly, had
gone on to Gulburgah; but nothing could be known for certain till
the men who were returning from his own force should reach their
territory, and either bring the old man and Zóra with them to camp
or to Beejapoor. It was this very party which, crossing the country
direct from the Royal camp, so providentially rescued Zóra,
unharmed, and took her to her grandfather; and regulating their
movements by those of the King himself, arrived in time to witness
his triumphal entry. I trust this slight digression will be pardoned, for,
indeed, without it the position of the parties would hardly be
understood with exactness.
After the slight interruption caused by raising the infirm old man, the
grand march was resumed; and the young King rode on, with the
bitter cry of the old Syud, "Daad! Daad! Justice! Justice!" ringing in
his ears, and the sightless eyes and feeble arms raised to heaven.
Abbas Khan's tale had distressed him seriously; but he was here face
to face with one instance of the first King Ibrahim's cruelty, and the
sin of it rested on his house. Well, it could be condoned, perhaps, for
the curse of a holy Syud could hardly be averted even by penance;
but he would do, as he had vowed to Alla, what it was possible to do
68. ere the sun set. So the young Monarch rode on in his pride; Humeed
Khan on his right hand, Soheil Khan and the brave commander on
his left, preceded by his gold and silver mace-bearers shouting his
titles, and followed by the crowds of nobles and officers who
composed his train. The day was as yet young, but it was bright and
clear; and the flood of light glittering on morion and coat of mail, on
cuirass and greave, on trappings and housings of gold and silver
cloth, on banners and standards, and the great white buildings and
palaces which stood out against the clear, deep blue sky, formed a
combination of splendour which the mind can hardly realise, and
which was well-nigh overpowering to all who saw it.
As to Zóra, she—who had seen nothing in all her life of splendour
such as that—was fairly overpowered. She trembled, and her cheeks
flushed as the first portion of the troops issued from the gate and
passed them, drowning the feeble chaunt she and her grandfather
were raising. But alms were showered upon them, and Ahmed had
gathered up several times already what lay on the sheet. When the
hoarse cry arose of "The King cometh! The King cometh!" and all
heads bowed to the earth as he passed on, she did not think of him,
but of one that might be with him. And yet, if he were, would he
remember her? Would he even see her? Ah! it was an anxious
moment, and her beating heart fluttered till she could hardly
breathe. As the glorious pageant went slowly past, she could see the
face she sought distinctly. Abbas Khan was riding near his uncle,
conversing joyously with him and others around him; and the
appearance of the gallant cavalier, dressed in glittering armour and
cloth of gold, was almost too dazzling to look at. There were
hundreds of Fakeers lining the road, crying for alms in stentorian
voices. How would the faint chaunt of an infirm old man and a girl
be heard amidst the din—the jangling bells of elephants, the
neighing of excited horses, and the cries of the Royal titles? And
Abbas Khan must have passed the group but for the sudden action
of her grandfather, who threw himself forward with his shrill cry.
Even then the grooms who ran by the King's horse, which had been
somewhat startled, would have removed the old man, roughly
69. enough, perhaps, from the Royal path; but the action of Abbas Khan
had been rapid, and instantaneous, and decisive. What he had said
to the King she could not hear; but the King's reply, "Bring him to
the palace instantly," at once gave her the assurance she needed.
Now Abbas Khan had dismounted, and stood embracing her
grandfather; and was telling Runga Naik, who had seen all, to seek
for his litter, which was under some trees at a little distance. Poor
Zóra had not been able to obtain one at Almella, and she had ridden
her own stout pony, which was also brought up; and she was
preparing to mount it when Abbas Khan cried, "Stay, Zóra! not in
this crowd; here is a palanquin of the King's for thee." So she
entered it, shut the doors, and was carried on. There was no time
for words. The whole scene was to her so altogether strange and
unexpected that she could not find speech to thank any one; and as
she shut the doors of the palanquin, and was safe from observation,
her overcharged heart found relief in a burst of grateful sobs and
tears.
As the King's procession went on towards the city, outside the walls,
for he had to receive the blessing of the Chishtee priest whom we
know of, it was easy for Abbas Khan to turn off with his charge into
the gate of the citadel, while Runga Naik brought up the baggage
ponies behind. All was comparatively clear in the citadel, and would
be till the King arrived; so that Abbas Khan had no difficulty in
speaking to one of the chief eunuchs of the private apartments,
whom he knew, and putting his old friend and Zóra under his
charge. He could not stay; and galloping after the procession soon
overtook it, and resumed his place by his uncle's side.
"Who was the girl beside the old man who helped to raise him up,
and whom my horse well nigh trampled down? I never saw a more
beautiful and expressive face in my life," said his uncle with, as it
seemed, a peculiar smile.
"She is the old saint's granddaughter, sir; and has devoted her life to
him. Yes, she is beautiful."
"Then thou hast seen her, Abbas?"
70. "I have, uncle. The night I was in delirium at Juldroog she watched
me, and gave me medicine and cool sherbet; but I could only see
her face as that of one in a dream, and I have never looked on it
since but once, and that only as a passing glance, till to-day, when I
could not help seeing her, for the handkerchief she had tied over her
turban had fallen off. It is evident that the Syud hath taken the vow,
perhaps at Gulburgah, where His Highness Geesoo Duráz made him
a Wallee."
"Was he a Fakeer before then?" asked his uncle.
"No, sir. Though he called himself a Dervish, yet he had not taken
any degree as a Fakeer, and people only called him Dervish. When
he confided to me his identity his chief prayer was to be allowed to
go free, that he might pay his vows at Sugger and Gulburgah,
where, it appears, he was raised at once to the highest rank; and his
title now is Luteef Shah Wallee. His is a sad story, uncle. Dost thou
remember it?"
"I was a mere boy then," was the reply, "and used to attend the
durbar with thy grandfather; but I quite remember the sadness with
which all the city heard that Syud Ahmed Ali, the physician, had
been blinded and sent to Juldroog. Everyone grieved for him, for he
was not only the most learned of all at Court, but the most
charitable. Many will remember him, and Ekhlas Khan was an
intimate friend. Yea, it will cause a murmur in durbar when his name
is mentioned, for he has been clean forgotten; and it was believed
he had died soon after he was imprisoned. And thou hast told the
King all?"
"All," replied the young Khan. "As the old Dervish told the tale to
me, so did I repeat it faithfully; and I told him, too, how, under the
Lord's will, he had saved my life."
"And what said he?"
"He wept, uncle; and said that the curse of a Syud should never rest
upon the Adil Shah's realm or people; that search should be made
for the Dervish. Then one day there came a holy man with a great
71. retinue from Gulburgah, and told him—I was there—how a Fakeer
had preached in the mosque, and a miracle had been done, and the
heretofore Dervish had been made a Wallee at once, as the people
demanded. And the King said to me, 'Thou art witness, Abbas Khan,
that if I ever am blessed by the old man I will restore to him and his
all he has lost.'"
"And he will do it, too," replied Humeed Khan. "And amidst the
rejoicings of to-day one heart will be gladdened."
"Ameen! Ameen!" was the reply; and the conversation dropped.
72. CHAPTER II.
PARDON.
Meanwhile Zóra and her grandfather had been conducted by the
eunuchs through the entrance corridor into a suite of small but
elegant apartments, which opened into a court and garden behind
the palace. Their servants were brought in by a separate passage
into a little kitchen and adjoining room; and there were baths and
everything necessary for a pleasant, though necessarily confined
residence. Here Zóra and old Mamoolla soon spread her
grandfather's carpets, and they found cushions and bedsteads
already provided. Presently, when all was arranged, Zóra led the old
man to the cushions, and he sat down with a sigh of thankfulness.
"Where am I?" he said. "Surely I heard Meeah's voice? Where has
he gone? Bring him to me."
"You are in the King's palace," said Zóra, throwing her arms around
him. "Be thankful, Abba, that all thy sorrows and trials are over. We
are safe in our refuge at last."
"Yes," he said, "at last! More than forty years have passed over me
since they sent me away to exile, blinded and in torment. Dost thou
think I have forgotten that?"
"O, Abba!" cried the girl, putting her hand over his mouth, "didst
thou not tell me when the Fateha was said before the tomb at Gogi
that thou hadst forgiven King Ibrahim? Was it for thy blindness,
Abba?"
"I am again rebuked, Zóra, and will forgive still; but it is hard to
forget the past, and the joy with which I came forth from Almella,
and within an hour was taken out, blind and bleeding! Forgive me,
child! that I am false to thee. And forgive me, O Ibrahim! who hast
73. received me back, that this bitter thought should have come into my
mind. Yes, as I entered, I felt I was within the palace. This I am
sure, by the turns we took as we entered, was the very apartment
which I used to dwell in whenever my visit was prolonged. I even
now scent the jessamine and tube roses of the little garden, and I
feel as though I were in my old seat, with the soft south wind
blowing on me. Methinks I see the blue Damascus tiles which are
inlaid round the arches, and the carved window of the Zenana
beyond."
"It is even so, Abba," said Zóra, much moved, as her grandfather
pointed out the several objects with his finger. "Nothing has been
changed; everything is as perfect now as it was then, and looks as
quiet and peaceful as our little Zenana used to do at Juldroog."
"But it is only a gilded cage, my child; and I shall long to be free
again, and to teach and preach, ay, and beg as I used to do even at
Juldroog. And here there is more to do, else the Lord had not
brought me."
"But, Abba, dear Abba!" began Zóra; and he interrupted her with,
"Be patient, child! Dost thou think I do not welcome this as a place
of rest, even as thou dost? And when Meeah comes he may bestow
us elsewhere, when we can go and come with freedom. Then we
shall have our own house, and our own servants, and palanquin, and
bearers; and a sweet garden where I shall love to sit and discourse
on the mysteries of holiness with the learned of the city, and on
medicine with the physicians; and thou wilt have thy pigeons and
flowers, and find out poor people and relieve them."
"Enough, enough, Abba!" cried Zóra, laughing and crying at the
same moment. "Thou wouldst make a princess of me at once, and
art tempting me by a hundred delightful anticipations fit but for the
noble and great. But I see only my Fakeer's garments, and think of
my uncompleted vows. And after all, am I not your humble little
Zóra?"
74. "Thou art my precious treasure, child!" replied the old man, with
emotion; "and the most noble house in Dekhan cannot produce one
like thee."
Almost as he spoke, the curtain, which was drawn across the
entrance, was partly raised, and a man's voice said hurriedly to a
companion, "The rooms are occupied by strangers, Maria; we must
retire."
Zóra started to her feet, and rushed hastily forward. She saw two
figures she at once recognised retreating into the corridor, and cried,
"Maria! Maria! it is only your little Zóra; and Abba is here. Oh, come
to us, we are alone."
In their turn Maria and her brother started. There was no doubt left
when they saw the slight figure stretching out its arms with a low
cry of joy, and the soft, flushed cheeks wet with tears; and a
moment after they were locked in each other's arms, and
approached the old man's seat, who was crying out joyfully, "Come!
come to me, my friends; we are, indeed, with you at last. O Padré
Sahib, thank the Lord with me that we are here safely, and in
honour, for of a truth we have endured much."
Maria was not changed, save that the bright rosy colour of her
cheeks had increased under the effects of better health; and she had
attained a true majesty of beauty which far exceeded that which
Zóra used to look on with wonder at Juldroog. Zóra seated her
beside her on the cushions, but she could not give vent to her
feelings of delight. Her loving brown eyes looked up like those of a
dog to her friend; she threw her arms round her, and kissed her
forehead, her eyes, her lips, passionately, hardly able to speak,
except to say, "Thou art here, Maria, and restored to me. Oh, yes, to
me, who in all my troubles and tears have never forgotten thee; and
this which thou gavest me," and she drew the little silver cross from
her bosom, "has never left me, and has been my charm and
deliverer of my honour when all hope of my deliverance seemed
gone. And thou hast been happy, Maria?"
75. "Very happy, my darling," returned her friend, "longing to hear of
you and Abba, but could obtain no news of you. Your little letter and
the feather reached me safely, and I have them still at home. And I
wrote a reply to you, Zóra, and my brother gave it to Abbas Khan,
for I was able to write that the Queen had ordered Abba and you to
be sent to her, and that he would be restored to his old rank; and I
knew you would like to hear the good news from me, Zóra. But we
had no reply, and then I heard of the Nawab's ill-treatment of you,
and that you had escaped, and the Queen thought you might come
direct to her."
"And I would have done so had I heard from Meeah," said the old
man; "but I soon learned he had reached the city, and what could I
have done alone?"
"Yes," observed the Padré, "we were more than a month detained
on the road, as Abbas Khan's horse fell, and his wound opened
again. He had a severe return of the fever, and I feared for his life.
Nor did he stay when he arrived; after the combat with the
Abyssinian champion, whom he slew, the Queen sent him to the
army, and I hear he has returned to-day."
"Yes, and we have seen him," said Zóra; "and he brought us here.
And thou art with the Queen, Maria?" she continued.
"I am with both of them, Zóra; but chiefly, by desire of Queen
Chand, with the Queen Taj-ool-Nissa, whom my brother hath
restored to health, and she is now strong and well. It is such a
change, Zóra, and we laugh, and say the King will not know the
miserable wife he left. And she has grown very dear to me, and
loves to talk of you, who, she says, must be her sister. Come, shall
we go to Queen Chand, she will be vexed with me if I take you not?"
"But I must change these clothes, Maria; it is not fitting for me to
appear before her with these Fakeer's garments."
"On the contrary, child, she will love thee the more, and honour thee
for wearing them. See, Abba, I am carrying off Zóra already," she
76. continued, "and my brother will be security for me that I bring her
back safely."
It was a strange thing to Zóra to feel herself guided through the
intricate passages and corridors of the huge palace, and to see the
strange deference and respect shown to Maria by all the eunuchs
and Mámas on duty. At length they reached the entrance to the
private apartments of the Queen Dowager, and after a brief colloquy
with the eunuchs at the door, were admitted, and led to the Queen's
seat by one of the women in attendance.
"Thou art welcome, Maria," she said, kindly; "but who is this thou
hast brought with thee?"
"It is Zóra, your Majesty, of whom I have so often spoken. She
would have taken off her Fakeer's dress; but I said I was sure she
had better come as she was."
"And you were right, child. I welcome thee in the name of the King,
thee and thy grandfather. By the blessed Prophet, how lovely thou
art: come hither and embrace me."
What idea Zóra had previously entertained of a real Queen it is
difficult to say: something very awe-inspiring, no doubt, and
magnificent; but at the sight of the slight girlish figure and plain
muslin dress of the great Queen whose praises were in every one's
mouth, and who had held the power of the whole kingdom, Zóra
became assured, and advanced to kiss the Royal lady's feet, and
embrace her as she desired.
"Power of God!" cried the Queen as, having embraced Zóra she took
both her cheeks in her hands and turned them alternately to the
light, and looked into her soft glowing eyes; "Power of God! she is
lovely, indeed, even in this poor dress. But thou hast not taken the
vows, Zóra?"
"No, my Queen, not yet; but when my grandfather was exalted in
rank at Gulburgah I would have done so, but for a worthy lady of
Golconda, who would not allow me."
77. "And she was right, child," returned the Queen; "such vows only
belong to widows and devotees; but thou, may God forgive the
thought, art neither one nor other; and if the blessing of Chand
Beebee avail aught, she will live to see thy children about thy
knees;" and, stretching forth both her hands, she placed them upon
Zóra's head, praying for her welfare. Then Zóra sat down and told
her what had befallen her since the time that Osman Beg carried her
off, and the escapes she had had, particularly the last. How her
grandfather attained the rank of Wallee; and, in short, all the story
we know up to the events of the morning.
"Remember that thou art my guest," said the Queen, as she
dismissed Zóra; "and thou shalt want for nothing. Perhaps," she
added, "thou mayest be required to-morrow at the durbar, for
Osman Beg hath arrived in custody, and there may be need of thy
evidence, should he deny what is alleged against him. Thou wilt not
be afraid of the King's presence and the durbar?"
"I am only a poor weak girl," said Zóra, casting down her eyes; "but
I have never yet been ashamed before God or man, and have no
reason to fear the King or the durbar. But I have forgiven the Nawab
freely. I have no claim upon him or against him; I have left all to the
good Alla to judge between us. Yet, lady, had not my poor friends
Runga and Burma Naik, whom I have known since I was a child,
rescued me, I had surely been despoiled of my honour, and become
an outcast. Now, blessed be the Lord, I can stand before my lord the
King, or you, gracious lady, without shame, or a thought of shame.
Forgive me that I speak so freely, lady; but thou art as a mother to
me, and my tears and my thoughts well up together without
restraint. I know none of the manners of a court, for hitherto I have
been secluded, and my speech may appear curt and abrupt; but my
thoughts are not so—indeed, indeed, they are as a child's before its
mother."
"Thy speech is good courtly Persian, at which I marvel, child,"
returned the Queen, "and thou needest not be ashamed of it, Zóra;
and thy fearlessness doth thee honour. Yes, I will be thy mother
78. truly; and though thou mayest have forgiven thine enemy, the State
hath not, and it is not seeming that such acts as Osman Beg's
should be passed by unnoticed. Now depart, both of ye, for I hear
the kettledrums from the city, and I have much to do ere the King
enters. Bid thy grandfather eat something and be ready, for I have
no doubt he will be sent for soon after His Majesty arrives."
As they passed the entrance to the young Queen's apartments,
Maria asked whether they might be admitted; but it was too late;
the Queen was in the bath, and her attiring would scarcely be
finished before the King arrived. Then they went down to the old
man and his friend, whom they found deeply engaged in the
discussion of the young Queen's ailments; and in the Padré's
treatment of the case the old physician heartily agreed. Zóra
delivered the Queen's message, and after a bath, which Ahmed had
prepared, the Wallee's costly robe of honour and his crown were put
on him. Zóra had changed her tunic for one of her simple woman's
dresses, and they sat enjoying pleasant converse in regard to the
past, while the salvoes of cannon, braying of trumpets, and loud
nobat music playing on the terrace above, announced to them the
arrival of the King.
Nor had they to wait long. Another salute from a battery of cannon
before the Hall of Audience announced that he had taken his seat;
and two of the gold mace-bearers in waiting arrived to request the
attendance of His Holiness Luteef Shah Wallee as soon as possible.
And then the old man rose, and, led by Zóra, whom he declared
must guide him, passed by the lower corridors into the great hall. It
was a strange sight to the nobles and commanders assembled there,
to see the venerable man led by the simply, not to say coarsely,
dressed girl to a seat apart from the rest, and near the group of holy
men who had already taken their places. All rose in deference to the
new comer, whose rank was indeed superior to that of any there;
but he was spared the difficulty of performing any act of reverence
to the King himself, who, rising, went to him, while Zóra fell back
under charge of one of the mace-bearers, an elderly eunuch, who
79. took care of her; but she could see and hear perfectly whatever
passed.
"We have sent for thee, illustrious Syud," said the King, as soon as
silence was enforced—for the murmur of astonishment and pity had
been loud and full of emotion—"to do an act of justice, which shall
mark this happy day with a deed peculiar to itself. We had heard of
the illustrious Syud before from Abbas Khan, who was for a time at
Juldroog, and we had vowed to send for him. But, lo! as if by a
miracle, or the direct interposition of the Most High, as we entered
the city gate, we found him present before us. In the humble garb of
Fakeers he and his granddaughter appeared by the wayside, and he
fell at our horse's feet. The just and Almighty Alla had, by a strange
course of circumstances, guided them to our feet, not as they were
in their exile, but with increased glory and honour; for at Gulburgah
the Prince Geesoo Duráz, with other princes and learned doctors of
Islam, had conferred upon him, in regard to his power over men's
minds, his learning, and piety, the spiritual rank of Wallee; and as
such, we ourselves, as we vowed, present him to you, O friends and
brothers in the faith, and pray you to do him reverence, as we
ourselves do, in the presence of ye all; for the Lord hath brought to
us in honour one whom our ancestor Ibrahim—may peace be on his
memory!—blinded and cast out to exile, where he was forgotten and
might have died, but for the aid of Him in whose service his life had
passed."
Then many wept. Many who had known the old man in his
prosperity, and thought him dead, pressed forward with tears and
quivering features to grasp his hand once more, and kiss his feet;
while cries of "Deen! Deen! A miracle! a miracle! May the saint live in
peace and honour!" rose from all parts of the vast hall, and were
taken up without with an enthusiasm which spread among the
people even to the far ends of the city; and men saluted each other
with the message of peace and the blessing of God, and the cry,
"The sin of the State has been removed, let us be thankful."
80. When the tumult had subsided, the King, standing on the step of the
throne, cried again with a loud voice, and said: "Know all men, and
brothers in Islam present, that before food or water hath passed our
lips to-day, we freely and entirely revoke the cruel sentence passed
on the illustrious Syud Ahmed Ali, now Syud Luteef Shah Wallee. We
implore, in the name of our ancestor, forgiveness for the shame and
pain he hath endured for forty years, and pray him to intercede with
Alla the Most High, and His holy messenger, to wipe out this sin, and
remove it for ever from us and our people. We further establish this
our illustrious saint in all the possessions and estates which were
granted before; and we give, in addition to these, the pergunna of
Kokutnoor, the scene of his child's delivery from violence. So let it
be, Ameen! Ameen!" Nor was a soul present who did not cry
"Ameen! Ameen!"
"Zóra! Zóra!" cried the old man, who was trembling with excitement,
and feeling about with his hands, "raise me up and support me, else
I cannot speak. Zóra, the Lord hath won the victory for us, and there
is no longer aught hid from thee, O my child. Let her come to me,
Sir, for I need her aid;" and there was a way opened for her, and he
felt the soft warm hand steal into his, whilst her gentle "I am with
thee, Abba," assured him. A strange sight was it to all that gorgeous
assembly; the venerable old man leaning on the shoulder of the
slight girl. He, clad in his rich saint's robe, and his crown with which
he had been crowned; Zóra in her humble dress of soosi, and her
plain muslin scarf now covering her face. But she was calm and
dignified, and her modest self-possession struck those who saw her
with wonder and admiration.
Then the old man stretched forth his hands and blessed the King,
and the Queen who sat above, and all the people. "What can I say,
my King?" he cried; "what can I say? My poor speech is dumb, but
my heart goeth forth to thee and thine, and to all present who
behold me. As I came hither, O King, I rested at Gogi, and
distributed Fatehas at all thy ancestors' tombs; but my heart was hot
and hard and sore within me, and I was about to pass King
Ibrahim's tomb, when God sent me a rebuke by the mouth of this
81. poor child: 'Forgive him,' she cried, 'forgive him; go not away from
this place till thou hast forgiven him;' and I kneeled down by his
tomb, struck by remorse, and bared my head, and cast dust upon it,
and cried, 'I forgive thee, O Royal master, all thou didst to me, and
may it be forgiven to thee in the day of judgment.' And my heart
was softened, and I was accepted at Gulburgah because I preached
peace to the people, as, Inshalla, I will do here, and there will be no
more war or trouble. And now, O King, bid me depart home to rest,
for I am old, and the events of this day have overpowered me."
Then the King ordered the ushers to bring a robe of honour, and he
put it on the old man with his own hands, and hung a valuable string
of pearls round his neck, to serve as prayer beads, while the people
around the hall still cried blessings on them! and Zóra heard voices
in the Queen's balcony crying, "Ameen; Ameen!" with, as she
thought, Maria's blending with them, and sobbing too. While she led
her grandfather back towards their apartments, Zóra hitherto had
been able to repress her emotion, but finding Maria already there,
she fell on her neck and wept passionately. She felt not only thankful
for the honour accorded to Abba, but for what spoke to her heart
more deeply and fondly, that Abbas Khan, and a noble old officer,
whom she supposed to be his uncle, had been looking at her all the
time. Nay, had she not heard their cries of joy and congratulations
rising high above all others! And, late in the day, Meeah brought his
uncle, and they kissed the old man's feet, and delivered the King's
command that he should attend the great durbar on the morrow at
noon. But Zóra had retired; she dared not look on them.
82. CHAPTER III.
THE TRIAL.
Somewhat before noon on the following day the tall, burly figure of
a man, who wore a dress of red cotton cloth, advanced slowly over
the short turfy sward which lay beneath some huge adansonia trees
in the fort. They were situated at some little distance from the gate
of the citadel, by themselves, with no buildings near them, for the
spot was considered impure and unholy, being, in fact, the usual
place of execution in Beejapoor. A few persons were following him,
and as he stopped and seated himself in the shade of one of the
trees, some of those who had gathered round him began to question
him as to what was to happen, for the executioner rarely made his
appearance in his official costume unless some event were to follow.
"Who is it to-day, Khan Sahib?" asked one of the bystanders, with an
expressive jerk of his head. "Who is to be sent to Paradise or to
Hell? Nothing has happened for a long time past, but now the King
has come again, thy hands will be full of work."
"Yes, brothers," returned the grim functionary; "while Queen Chand
was in authority, there was no business. She is a great deal too kind
and compassionate, and she cheated me out of one fellow who was
bigger than I, and the greatest bully and villain in Beejapoor, by
letting that brisk young fellow, Abbas Khan, kill him. Now I should
like to have slain that devil, because he was too mean for the young
Khan to meddle with, and he was always mocking me and scoffing
at my sword, which, he said, was nothing in comparison to his
'kussab,' as he called it, which I ought to have had also, but the
Kotwal has taken it. Now look, friends, can anything be more
beautiful than this?" and, rising, he drew from its scabbard a broad-
bladed sword, rather broader at the point than at the hilt, with a
83. point nearly square, with some, to him, strange-looking letters upon
it, which he believed to be a charm. The motto, indeed, was—
"Inter arma silent leges,"
and the sword had been forged in Germany. "All I know is, friends,
that the blade is a true 'Allemagne;' and though it is as sharp as any
razor, and I got Daood Sahib, the King's armourer, to retouch the
edge to-day, there will not be even a notch in it when I have done
my work, and not a cloud on its fair polish. Ah, sirs, that 'kussab' of
the Abyssinian's is a brutal weapon, to be used but by main
strength; whereas this, my Allemagne, requires only skill, and when
any great person is made over to me, I use it and no other."
"Then it is some great person, Khan Sahib, who will go to judgment
to-day?"
"Nay, friends, I know not," returned the executioner. "Some one
belonging to the Prince Ismail's affair was brought from the south in
a palanquin which was fastened up; and I know pretty well, when
Hyat Khan sends me word to go to the trees and remain there, what
that means. Now, go away, all of ye, for no one must see this put
into its scabbard, lest an evil glance fall on it. My art is vain, unless
the edge be keen and firm. Away with ye all, I would be left to my
prayers and meditations. When ye see the palanquin come out of
the gate yonder, ye can return if ye will, and see what I do." And
when all around him had gone, the man put the blade of his sword
to his forehead and chest reverently, made a salaam to it, and slowly
and carefully replaced it in its richly embroidered velvet scabbard;
and as the muezzins of the neighbouring mosques sang the midday
call to prayer, spread his waist-belt on the green sward, and
performed his devotions, for the executioner was a devout man,
careful in the stated observances of his faith.
The citadel was now a busier scene than when Queen Chand acted
as Regent in the absence of the King. There were so many more
dignitaries to be received, so much relating to the army to be
arranged, so many rewards and dresses of honour to be distributed,
84. that the approaches to the palace were always crowded. This did not
affect our friends in the least, as they were not only pleasantly
secluded, but at such a distance from the exciting crowds and
turmoil, that they saw none of it, and heard only a little. At the
council of the night before, all the public accounts for the period of
Queen Chand's administration, which had been prepared
beforehand, were read to the King, and duly audited. Many new
patents of nobility as rewards for service, and grants of estates,
were ordered to be drafted, Syud Luteef Shah Wallee's among the
number. And we are glad to record also, that not only Abbas Khan,
now created Khan Bahadoor, and commander of five thousand, but
Runga Naik was received into the lower grade of nobility, and
created lord of twenty villages near his own ancestral estate of
Korikul, and was to receive a dress of honour in full Court. Assuredly
his service had not been in vain, while other rewards, in proportion
to their merits, were allotted to his brave followers. But all these
were minor points; the business assigned to the morrow was of a
much more important nature, for as they sat in the councils hall,
Hyat Khan, the Kotwal, announced to the King that Osman Beg, the
Governor of Juldroog, had arrived as a prisoner, and asked how he
should be disposed of. The Queen Chand, who was sitting beside her
nephew, said, "Son, I claim thy attention to this case first, for it is of
grave importance to many that the truth should be made manifest to
all, and justice be done. We would have seen to it ourselves when
you were absent, but we thought thou shouldst decide upon it. It is
a painful case, but justice must be done."
"Certainly, and without favour, aunt. Yet why not by thee? Is there
any power thou dost not share with me? Is there any order of thine
to which I do not bow? Yet"—for the Queen was waving her hand in
deprecation of his expressions—"yet, if thou wilt, I will be present
with thee, and we will share the task together. Let the prisoner be
well lodged and cared for, Khan Sahib," he continued to Hyat Khan;
"let his arrival be announced to his father, who may visit him, and let
him be present to-morrow at the afternoon durbar, when we shall be
at leisure."
85. Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.
More than just a book-buying platform, we strive to be a bridge
connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.
Join us on a journey of knowledge exploration, passion nurturing, and
personal growth every day!
ebookbell.com