Starting Out With Programming Logic and Design, 6e 6th Edition Tony Gaddis
Starting Out With Programming Logic and Design, 6e 6th Edition Tony Gaddis
com
https://ebookmass.com/product/starting-out-with-programming-
logic-and-design-6e-6th-edition-tony-gaddis/
OR CLICK HERE
DOWLOAD NOW
https://ebookmass.com/product/starting-out-with-visual-basic-8th-
edition-tony-gaddis/
ebookmass.com
https://ebookmass.com/product/starting-out-with-python-5th-
international-edition-tony-gaddis/
ebookmass.com
https://ebookmass.com/product/starting-out-with-c-from-control-
structures-through-objects-ninth-edition-global-edition-tony-gaddis/
ebookmass.com
https://ebookmass.com/product/boss-witch-ann-aguirre-3/
ebookmass.com
Essentials of Pharmacology for Nurses 4th Edition Paul
Barber
https://ebookmass.com/product/essentials-of-pharmacology-for-
nurses-4th-edition-paul-barber/
ebookmass.com
https://ebookmass.com/product/ferrets-for-dummies-3rd-edition-kim-
schilling/
ebookmass.com
https://ebookmass.com/product/psychic-spirits-psychic-mystery-romance-
woodward-hill-mystery-romance-book-2-aj-nuest/
ebookmass.com
https://ebookmass.com/product/the-outsider-the-life-and-work-of-
lafcadio-hearn-steve-kemme/
ebookmass.com
https://ebookmass.com/product/naked-city-true-stories-of-crimes-cock-
ups-crooks-cops-john-silvester/
ebookmass.com
eTextbook 978-1259565403 Fundamentals of Cost Accounting
5th Edition
https://ebookmass.com/product/etextbook-978-1259565403-fundamentals-
of-cost-accounting-5th-edition/
ebookmass.com
Sixth
Edition Starting Out with
Programming
Logic &
Design
This page intentionally left blank
Contents iii
Sixth
Edition Starting Out with
Programming
Logic &
Design
Tony Gaddis
Haywood Community College
Content Development: Dawn Murrin
Content Management: Tracy Johnson
Content Production: Ishan Chaudhary and Carole Snyder
Product Management: Holly Stark
Product Marketing: Wayne Stevens
Rights and Permissions: Anjali Singh
Please contact https://support.pearson.com/getsupport/s/ with any queries on this content.
Cover Image by Patrick de grijs/123RF.
Microsoft and/or its respective suppliers make no representations about the suitability of the information contained in the
documents and related graphics published as part of the services for any purpose. All such documents and related graphics
are provided “as is” without warranty of any kind. Microsoft and/or its respective suppliers hereby disclaim all warranties
and conditions with regard to this information, including all warranties and conditions of merchantability, whether express,
implied or statutory, fitness for a particular purpose, title and non-infringement. In no event shall Microsoft and/or its
respective suppliers be liable for any special, indirect or consequential damages or any damages whatsoever resulting from
loss of use, data or profits, whether in an action of contract, negligence or other tortious action, arising out of or in
connection with the use or performance of information available from the services.
The documents and related graphics contained herein could include technical inaccuracies or typographical errors. Changes
are periodically added to the information herein. Microsoft and/or its respective suppliers may make improvements and/or
changes in the product(s) and/or the program(s) described herein at any time. Partial screen shots may be viewed in full
within the software version specified.
Microsoft® and Windows® are registered trademarks of the Microsoft Corporation in the U.S.A. and other countries. This
book is not sponsored or endorsed by or affiliated with the Microsoft Corporation.
Copyright © 2023, 2019 by Pearson Education, Inc. or its affiliates, 221 River Street, Hoboken, NJ 07030. All Rights
Reserved. Manufactured in the United States of America. This publication is protected by copyright, and permission should
be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any
form or by any means, electronic, mechanical, photocopying, recording, or otherwise. For information regarding
permissions, request forms, and the appropriate contacts within the Pearson Education Global Rights and Permissions
department, please visit www.pearsoned.com/permissions/.
Acknowledgments of third-party content appear on the appropriate page within the text.
PEARSON is exclusive trademarks owned by Pearson Education, Inc. or its affiliates in the U.S. and/or other countries.
Unless otherwise indicated herein, any third-party trademarks, logos, or icons that may appear in this work are the property
of their respective owners, and any references to third-party trademarks, logos, icons, or other trade dress are for
demonstrative or descriptive purposes only. Such references are not intended to imply any sponsorship, endorsement,
authorization, or promotion of Pearson’s products by the owners of such marks, or any relationship between the owner and
Pearson Education, Inc., or its affiliates, authors, licensees, or distributors.
ScoutAutomatedPrintCode
Rental:
ISBN-10: 0-13-760214-6
ISBN-13: 978-0-13-760214-8
Print offer:
ISBN-10: 0-13-760191-3
ISBN-13: 978-0-13-760191-2
Contents v
Pearson’s Commitment
to Diversity, Equity,
and Inclusion
We embrace the many dimensions of diversity, including but not limited to race, ethnicity, gender,
sex, sexual orientation, socioeconomic status, ability, age, and religious or political beliefs.
Education is a powerful force for equity and change in our world. It has the potential to deliver
opportunities that improve lives and enable economic mobility. As we work with authors to create
content for every product and service, we acknowledge our responsibility to demonstrate inclusivity
and incorporate diverse scholarship so that everyone can achieve their potential through learning.
As the world’s leading learning company, we have a duty to help drive change and live up to our
purpose to help more people create a better life for themselves and to create a better world.
Accessibility Contact Us
We are also committed to providing products that While we work hard to present unbiased, fully
are fully accessible to all learners. As per Pearson’s accessible content, we want to hear from you about
guidelines for accessible educational Web media, any concerns or needs with this Pearson product so
we test and retest the capabilities of our products that we can investigate and address them.
against the highest standards for every release,
Please contact us with concerns about any
following the WCAG guidelines in developing new
potential bias at
products for copyright year 2022 and beyond.
https://www.pearson.com/report-bias.html
You can learn more about Pearson’s
For accessibility-related issues, such as using
commitment to accessibility at
assistive technology with Pearson products,
https://www.pearson.com/us/accessibility.html
alternative text requests, or accessibility
documentation, email the Pearson Disability Support
team at [email protected]
vi Contents
Brief Contents
Preface xiii
Acknowledgments xxi
About the Author xxv
Chapter 1 Introduction to Computers and Programming 1
Chapter 2 Input, Processing, and Output 27
Chapter 3 Decision Structures and Boolean Logic 103
Chapter 4 Repetition Structures 161
Chapter 5 Modules 227
Chapter 6 Functions 285
Chapter 7 Input Validation 335
Chapter 8 Arrays 353
Chapter 9 Sorting and Searching Arrays 419
Chapter 10 Files 469
Chapter 11 Menu-Driven Programs 543
Chapter 12 Text Processing 595
Chapter 13 Recursion 623
Chapter 14 Object-Oriented Programming 649
Chapter 15 GUI Applications and Event-Driven Programming 715
Appendix A ASCII/Unicode Characters 747
Appendix B Flowchart Symbols 749
Appendix C Pseudocode Reference 751
Appendix D Converting Decimal Numbers to Binary 765
Appendix E Answers to Checkpoint Questions 767
Index 783
vi
Contents vii
Contents
Preface xiii
Acknowledgments xxi
About the Author xxv
vii
viii Contents
Index 783
Contents xiii
Preface
W
elcome to Starting Out with Programming Logic and Design, Sixth Edition.
This book uses a language-independent approach to teach programming
concepts and problem-solving skills, without assuming any previous pro-
gramming experience. By using easy-to-understand pseudocode, flowcharts, and other
tools, the student learns how to design the logic of programs without the complication
of language syntax.
Fundamental topics such as data types, variables, input, output, control structures,
modules, functions, arrays, and files are covered as well as object-oriented concepts,
GUI development, and event-driven programming. As with all the books in the Starting
Out with . . . series, this text is written in clear, easy-to-understand language that stu-
dents find friendly and inviting.
Each chapter presents a multitude of program design examples. Short examples that
highlight specific programming topics are provided, as well as more involved examples
that focus on problem solving. Each chapter includes at least one In the Spotlight
section that provides step-by-step analysis of a specific problem and demonstrates a
solution to that problem.
This book is ideal for a programming logic course that is taught as a precursor to a
language-specific introductory programming course, or for the first part of an intro-
ductory programming course in which a specific language is taught.
xiii
xiv Preface
Chapter 5: Modules
This chapter demonstrates the benefits of modularizing programs and using the top-
down design approach. The student learns to define and call modules, pass arguments
to modules, and use local variables. Hierarchy charts are introduced as a design tool.
Chapter 6: Functions
This chapter begins by discussing common library functions, such as those for generat-
ing random numbers. After learning how to call library functions and how to use val-
ues returned by functions, the student learns how to define and call his or her own
functions.
Chapter 8: Arrays
In this chapter the student learns to create and work with one- and two-dimensional
arrays. Many examples of array processing are provided including examples illustrat-
ing how to find the sum, average, and highest and lowest values in an array, and how
to sum the rows, columns, and all elements of a two-dimensional array. Programming
techniques using parallel arrays are also demonstrated.
Gesteinsart
Nr. Standort Maße
Ergänzungen
3 Auerbach i. V.: Zwei Kreuze aus
der Ufermauer
herausgenommen und gleich
den anderen beiden (Nr. 4) im
Stadtpark 1921 aufgestellt.
Beide standen auf oder neben
der alten Göltzschbrücke, die
1883 abgebrochen wurde.
34 Crostwitz bei Kamenz: Am
selben Platz im Dorfe beim
zugeschütteten Teich 1922
wieder aufgestellt.
45 Großer Garten, Dresden: Im
August 1920 böswilligerweise
in Stücke zerschlagen. Mit
Zement ausgebessert und
flach auf den Boden gelegt.
63 Gorknitz bei Pirna: Ausgegraben
und am selben Orte 1920 neu
aufgestellt. Mitteilungen X,
Heft 4/6, S. 85.
70 Gröbern bei Meißen: Aus der 78 : 56 : 15 Sandstein
Scheunenmauer im Gutshofe
herausgenommen und am
Dorfplatz aufgestellt.
128 Liebstadt: Das stehende Kreuz 88 : 48 : 23
war zerbrochen und wurde
auf Stadtkosten 1919 neu
aufgestellt. – Das liegende an
der Wegweisersäule nach
Bertelsdorf wurde gehoben
und neu aufgestellt.
141 Mügeln bei Oschatz: In der
Südostecke des Friedhofes
bei der Totengräberwohnung
neu aufgestellt.
153 Oberau bei Meißen a. E.:
Ausgegraben und am selben
Orte neu aufgestellt.
187a Rochlitz: Im Museum. Drei
Kreuze aus der Rochlitzer
Gegend.
222 Weißig bei Dresden: Am Bahnhof
weggenommen und nördlich
der Straße unter alten
Bäumen in der Wiese neu
aufgestellt.
b) Neuentdeckte Kreuze
Zahl
Nr. Ort der Erwähnung
Kreuze
19 Falkenstein i. V. – Das Kreuz war mit der Zeichnung
eines ungespannten Bogens und
eines Pfeils versehen. (Mitteilung
von Lehrer L. Viehweg in Bad
Elster von 1919.)
28 Helmsdorf – Abgebildet in »Über Berg und Tal«,
1904, S. 300.
33 Königsbrück 1 Das fünfte der dortigen Kreuze (Nr.
109–111) ist 1908 beim Bau
eines Schuppens am
Krankenhaus mit in die Erde
geworfen worden.
68 Falkenstein i. V. 1 Bis zum großen Brand der achtziger
Jahre in einer engen Gasse nach
Grünbach zu. Mitteilung von
Fräulein E. v. Cotta.
69 Gottleuba, am 1 Nach einer Aktennotiz vom Jahre
Hellendorfer 1500 an einen Bauer als
Weg Schleifstein verkauft worden.
70 Kamenz 1 Vgl. Störzner: Was die Heimat
erzählt. S. 252 und 285.
71 Nieder- 1 Beim Aufgang zum Schloß auf dem
Reinsberg b. Mühlgrundstück in der Nähe des
Nossen Mühlgrabens. Mitteilung von W.
Krumbiegel, Klotzsche.
72 Schöneck i. V. 3 Bis 1882 auf einer Wiese vor der
Stadt. Mitteilung von Fräulein E.
v. Cotta.
73 Trieb bei 1 Früher an der Falkensteiner Straße.
Falkenstein i. Beim Bau eines Bauernhauses
V. als Mauerstein verwendet.
Heimatschutzakten betr.
Kulturdenkmale, S. 39.
74 Unterlauterbach 1 Beim Dungerschen Gute. Beim
Straßenbau zerschlagen worden.
Heimatschutzakten betr.
Kulturdenkmale, S. 39.
III. Literaturverzeichnis
Charles Darwin, Journal of Researches into the Natural History
and Geology of the Countries visited during the voyage of H. M.
S. Beagle: Round the world. London. Verlag John Murray 1860.
Seite 26 enthält eine Notiz vom 19. April 1832 über einen
Ausflug von Rio de Janeiro: »The road is often marked by
crosses in the place of milestones, to signify where human
blood has been spilled«.
Vogtländischer Anzeiger und Tageblatt vom 13. August 1916,
S. 14. Beschreibung der Kreuze von Kürbitz und
Kemnitzbachtal.
Neues Archiv für Sächsische Geschichte und
Alterstumskunde. XL, Heft 1/2, S. 189. Zur
Steinkreuzforschung. Von Alfred Meiche. Besprechung der
Arbeit von Dr. Kuhfahl, in Mitteilungen 1914 bis 1916, mit
Angabe neuer Sühneurkunden usw.
Dresdner Anzeiger vom 20. April 1919. Dr. Kuhfahl: Zur
Steinkreuzforschung. Ebenda vom 6. Mai 1914, Dr. Kuhfahl:
Aus dem Sagenkreis der alten Steinkreuze. Ebenda vom 11.
Mai 1924 mit illustrierter Beilage: Alte Steinkreuze im Dresdner
Weichbild, von Dr. Kuhfahl.
Monatsschrift für Photographie, März 1919, Berlin. Dr. Kuhfahl.
Photographische Steinkreuzforschung.
Emil Obst, Über Mord- und Sühnekreuze in den Muldenkreisen
Bitterfeld und Delitzsch. 2. Auflage. Selbstverlag. Bitterfeld
1921.
Dr. Franz Přicryl, Denkmale der Heiligen Konstantin und
Methodius in Europa. Wien 1920. Verlag von Heinrich Kirsch.
Max Walter, Ernsttal, Baden. Steinkreuze des hinteren Odenwalds
in »Vom Bodensee zum Main«, Heimatblätter Nr. 25. 1923.
Wilhelm Lange, Über Steinkreuze in Touristische Mitteilungen aus
beiden Hessen usw. 1909 Nr. 2 und 3, 1910 Nr. 5.
(Besprechung hessischer Standorte.)
Gustav Metscher, Märkische Sühnekreuze in Deutsche Zeitung
vom 23. Juli 1921.
Karl Zimmermann, Zur Steinkreuzforschung, in Mitteilungen des
Nordböhmischen Vereins für Heimatforschung. Leipa 1919, Heft
2 bis 4, S. 80. (Besprechung der Dr. Kuhfahlschen Arbeit von
1914 bis 1915. Kleinere Nachrichten.)
E. Mogk, Zur Deutung der Steinkreuze in Mitteilungen des Vereins
für Sächsische Volkskunde. 1919, Heft 12.
R. Krieg, Die Steinkreuze im Harz. Zeitschrift »Der Harz«,
September 1922, S. 113.
Rottler, Kreuzsteine und Steinkreuze im Bezirk des Landbauamts
Bamberg in »Deutsche Gaue«. 1920, Heft 407 bis 410.
Max Hellwig, Steinerne Zeugen mittelalterlichen Rechts in
Schlesien (Steinkreuze, Bildstöcke, Staupsäulen, Galgen,
Gerichtstische). Liegnitz 1923, Selbstverlag. 8°, 34 S. 13
Bildertafeln.
Über Berg und Tal. 1924. Die alten Steinkreuze der Sächsischen
Schweiz, von Dr. Kuhfahl.
Rund um den Geisingberg, Monatsbeilage des Boten vom
Geising. Januar, Februar und März 1924. Mord- und
Sühnekreuze, von A. Klengel, Meißen a. E. Allgemeine
Schilderung der Steinkreuzsitte, sowie Einzelbeschreibung der
Erzgebirgischen Standorte im Umkreis vom Geising.
Fußnoten:
[1] Vgl. Mitteilungen Bd. IV, Heft 6, S. 202.
[2] Mitteilungen Bd. IV, Heft 6, S. 202.
[3] Vgl. Mitteilungen X 4/6 S. 85.
[4] Dresdner Lokalvisitation samt derselben Instruktion
10599/1539 Blatt 134 b.
[5] Vgl. auch Mitteilung des Vereins für Sächsische Volkskunde
1899. Heft 12, Seite 11.
[6] Nr. 25/1923, Verlag von C. F. Müller, Karlsruhe.
[7] Verlag von Heinrich Kirsch, vorm. Mechitharisten-
Buchhandlung, Wien 1920.
[8] Genauere Angaben und Photographien erbeten.
[9] Aufnahme von Rittergutsbesitzer von Craushaar auf Jauernick.
[10] Aufnahme von Curt Sippel, Plauen i. V.
[11] Aufnahme von Werner Rosenmüller, Hamburg.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookmass.com