Download ebooks file Programming Like a Pro for Teens 1st Edition Charles R. Hardnett all chapters
Download ebooks file Programming Like a Pro for Teens 1st Edition Charles R. Hardnett all chapters
com
https://ebookname.com/product/programming-like-a-pro-for-
teens-1st-edition-charles-r-hardnett/
OR CLICK HERE
DOWLOAD NOW
https://ebookname.com/product/game-programming-for-teens-second-
edition-maneesh-sethi/
ebookname.com
https://ebookname.com/product/python-mastery-a-code-like-a-pro-guide-
for-python-beginners-1st-edition-jonathan-bates/
ebookname.com
https://ebookname.com/product/visual-c-game-programming-for-teens-1st-
edition-jonathan-s-harbour/
ebookname.com
https://ebookname.com/product/1-2-3-magic-for-teachers-effective-
classroom-discipline-pre-k-through-grade-8-1st-edition-thomas-w-
phelan-phd/
ebookname.com
Cliffs AP English Language and Composition 2nd Edition
Barbara V. Swovelin
https://ebookname.com/product/cliffs-ap-english-language-and-
composition-2nd-edition-barbara-v-swovelin/
ebookname.com
https://ebookname.com/product/lalita-trishati-a-comprehensive-
treatise-1st-edition-v-ravi/
ebookname.com
https://ebookname.com/product/the-spirit-paraclete-in-the-gospel-of-
john-george-johnston/
ebookname.com
https://ebookname.com/product/heat-treating-including-quenching-and-
control-of-distortion-1st-edition-fred-specht/
ebookname.com
https://ebookname.com/product/the-english-bible-in-the-early-modern-
world-1st-edition-robert-armstrong/
ebookname.com
The Changing Face of Anti Semitism From Ancient Times to
the Present Day 1st Edition Walter Laqueur
https://ebookname.com/product/the-changing-face-of-anti-semitism-from-
ancient-times-to-the-present-day-1st-edition-walter-laqueur/
ebookname.com
Programming
Like a Pro
for Teens
Charles R. Hardnett
Australia . Brazil . Japan . Korea . Mexico . Singapore . Spain . United Kingdom . United States
Programming Like a Pro for Teens © 2012 Course Technology, a part of Cengage Learning.
Charles R. Hardnett ALL RIGHTS RESERVED. No part of this work covered by the copyright
Publisher and General Manager, herein may be reproduced, transmitted, stored, or used in any form or
Course Technology PTR: Stacy L. Hiquet by any means graphic, electronic, or mechanical, including but not
limited to photocopying, recording, scanning, digitizing, taping, Web
Associate Director of Marketing:
distribution, information networks, or information storage and retrieval
Sarah Panella
systems, except as permitted under Section 107 or 108 of the 1976
Manager of Editorial Services: United States Copyright Act, without the prior written permission of the
Heather Talbot publisher.
Marketing Manager: Mark Hughes
Senior Acquisitions Editor: Mitzi Koontz For product information and technology assistance, contact us at
Project/Copy Editor: Karen A. Gill Cengage Learning Customer & Sales Support, 1-800-354-9706.
Teen Reviewer: J. T. Hiquet For permission to use material from this text or product,
Technical Reviewer: Keith Davenport submit all requests online at www.cengage.com/permissions.
Further permissions questions can be emailed to
Interior Layout Tech: MPS Limited,
[email protected].
a Macmillan Company
Cover Designer: Mike Tanamachi
Indexer: Sharon Shock Microsoft, Windows, Internet Explorer, Visual Studio, Visual C++, and
Visual C++ Express are registered trademarks of Microsoft Corporation
Proofreader: Gene Redding in the United States and/or other countries.
Macintosh, Xcode, and Mac OS X are registered trademarks of Apple
Inc., registered in the U.S. and other countries.
All other trademarks are the property of their respective owners.
All images © Cengage Learning unless otherwise noted.
ISBN-13: 978-1-4354-5924-3
ISBN-10: 1-4354-5924-5
eISBN-10: 1-4354-5925-3
This type of project does not happen without the help of others. I would like to
thank the following colleagues for their input as I developed ideas for this book:
Andrea Lawrence, Alfred R. Watkins, and Iretta B. Kearse.
I would also like to thank the entire staff at Course Technology and Cengage
Learning. In particular, I’d like to thank Mitzi Koontz for her project manage-
ment, Karen Gill for her awesome editing, J.T. Hiquet for his insightful input from
the teen perspective, and Keith Davenport for his technical comments and code
testing.
About the Author
Charles R. Hardnett has developed C++ software for more than 20 years and has
taught C++ programming courses to college and adult students for more than
15 years. After studying computer science at Prairie View A & M University and
Georgia Institute of Technology, he developed professional and high-end research
software in the areas of data communications, telecommunications, high-
performance compilers for parallel computers, and compilers for embedded
systems. He has taught computer science courses at Georgia Institute of Tech-
nology, Spelman College, and Gwinnett Technical College. Currently, he is
teaching at Gwinnett Technical College, developing mobile applications for
iPhone and Android phones, and managing his own nonprofit organization
called SMART Academy (www.smartacademyonline.org).
Charles currently resides in a suburb of Atlanta, Georgia, with his wife and two
children.
Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
vi
Contents vii
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
Introduction
Hello, world! I like using this greeting for my books about computer program-
ming. It’s tradition in computer programming to introduce a programming
language by writing a Hello World program. The program simply outputs the
words Hello World. A website is devoted to storing the Hello World programs for
programming languages, located at www.roesler-ac.de/wolfram/hello.htm.
There are many programming languages in the world; the aforementioned
website boasts that it has more than 400 languages represented as Hello World
programs, and that number is rising. An organization called ACM History of
Programming Languages (HOPL) hosts conferences and produces journals for
anyone interested in studying the history and genealogy of programming lan-
guages. This website, found at http://hopl.murdoch.edu.au/, has a list of more
than 8,000 programming languages! Even more surprisingly, that astounding
number of programming languages was developed in a relatively short amount of
time. If you assume that the first programming languages were invented in the late
19th century, then on average about 50 languages are being created per year, or
around 1 per week!
No matter how many programming languages there are, they all have a common
purpose. There are many human languages, such as English, Spanish, Swahili, and
Chinese, but their common purpose is communication between humans. In the
same vein, programming languages are designed to enable communication
between humans and computers. A programmer communicates an algorithmic
xi
xii Introduction
solution to a problem to a computer so that the computer can solve the problem
quickly and efficiently. The algorithm is a step-by-step process or sequence of
actions. The actions are simple on their own, but the algorithms created can be as
simple as adding numbers or as complicated as processing the graphics and
animation of your favorite 3D video game. The ability to encode algorithms is the
common attribute of all programming languages. Thus, mastering algorithmic
thinking is a great asset to being a productive and efficient programmer.
In this book, you learn concepts related to algorithmic thinking and problem-
solving. In addition, you learn the C++ language. C++ is a popular, general-
purpose and object-oriented programming language that can be used in a variety
of application domains. These domains may include personal, business, gaming,
scientific, and multimedia applications. In addition, C++ is used for creating
programs to execute on a number of computing platforms, including desktops,
laptops, supercomputers, mobile devices, and gaming consoles.
Are you ready to learn how to program a computer? If so, you are in the right
place. This book introduces you to the way a computer scientist or computer
programmer thinks when creating software.
n “Records”
n “Pointers”
n “Classes and Introduction to OOP”
Many successful books have been organized this way, which is fine for creating a
reference book for the language. However, it is not necessarily the best organi-
zation for teaching how to develop software solutions using a particular language.
This type of organization has a negative impact on many students and does not
help them learn how to build software. This organization forces authors to
introduce too many alternative concepts in a single chapter. For example, in the
chapter about conditional statements, an author may decide to introduce if-then,
if-then-else, switch/case, and arithmetic if statements. In addition, there
might be some discussion about Boolean expressions and nesting of if-then and
if-then-else. Those who write these types of chapters realize all the syntactical
and semantic rules that must be explained and understood first. However, in most
cases, readers are not very advanced at this stage of the book and are not likely to
use all these concepts in any program they are writing unless the program is
contrived to introduce the language feature. How much do beginners really learn
from this exercise? How much confusion do they experience when trying to apply
these different constructs to a software solution? The problem here is that the
focus for the reader is now on the language, and not on solving problems with the
language.
This book has a different paradigm that puts the focus on the problem-solving
techniques and thought processes; the language features are secondary. In addi-
tion, this book introduces features at your level of complexity. For example, you
will most likely use the switch statement in specific circumstances, such as for
menu processing, which is best shown after learning loops. The problem also
requires more complex software. Therefore, the complexity and sophistication of
solutions for a class of problems should motivate or drive the introduction to
language concepts. For example, instead of your seeing the switch statement in
Chapter 5 and then in Chapter 6 or 7 being presented with a menu-driven
program that is perfect for it (and requiring you to recall the switch statement and
use it), this book introduces the switch statement as an alternative compact
solution to the menu problem. At this time, you are engaged and interested in
learning about the switch statement. In addition, you have a firm foundation of
experience with the if-then statement to ease the understanding of the switch
xiv Introduction
« Mon âme hors de cette ombre qui gît flottante sur le plancher
Ne s’élèvera jamais plus. » [113]
[113] Dernière strophe du Corbeau.
PREMIÈRE PARTIE
Préface 9
Lamennais : la crise de sa chute 15
Une auxiliatrice de Lacordaire : Anna Moës 39
Le catholicisme de Barbey d’Aurevilly 68
Villiers de l’Isle-Adam 107
Le Greco de Maurice Barrès 141
Maurice Barrès et sa pensée religieuse dans la Colline
inspirée 150
Georges Dumesnil 158
Histoire de mon amitié pour Camille Saint-Saëns 170
DEUXIÈME PARTIE
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.
ebookname.com