Programming Like a Pro for Teens
Are you ready to learn how to program a computer? You'll do just that in this book. PROGRAMMING LIKE A PRO FOR TEENS is written in a friendly, unassuming voice that makes it possible for you to master the ideas and concepts that professionals use for programming every day. You learn algorithmic thinking and problem-solving in addition to the C++ language. This book takes a different approach than others that teach programming. It focuses on problem-solving techniques and thought processes and introduces features at your level of complexity. Introductory problem-solving techniques pave the way toward increasingly more advanced techniques. This approach allows you to engage in meaningful programming experiences early in the book, which motivates you to continue. Solutions to end-of-chapter exercises, source code, and other learning materials are included on the companion website.
Features of Programming Like a Pro for Teens
- Facilitates comprehension with a clear, straightforward writing style that won't bog you down with computer jargon.
- Allows quick and easy access to the information you need with a logical organization based on activities and tasks.
- Encourages the application of key concepts by including a small-, medium-, and large-scale problem in each chapter and closing each chapter with domain-centered challenges.
- Enhances the learning experience with a companion website that includes example programs from the book.
How to Use This Book
This book introduces computer programming to teens using ideas and concepts that professionals use for programming every day. The book is suitable for any beginning programming course or CS1 course at the high school or collegiate level. It has been structured so that the C++ content of the book can be used to solve all the exercises at the end of each chapter. You should not use this book as a C++ reference book because it does not cover every aspect of the C++ language. If you would like to have a complete C++ reference as a companion to this book, look for The C++ Programming Language by Bjarne Stroustrup (C++ inventor) or C++: The Complete Reference by Herbert Schlidt.
Each chapter of this book presents a collection of ideas and concepts that are related to computer programming and C++. Each chapter has notes and sidebars to provide additional information about given topics. In addition, each chapter has complete pseudocode or C++ programs. You are encouraged to trace the pseudocode and compile and test the C++ programs for better understanding. At the end of each chapter are a handful of exercises to apply the knowledge of the chapter and previous chapters. The majority of the concepts that you need for solving an exercise are in that chapter; however, you need to keep previous chapters' concepts in mind as well.
How This Book Is Organized
Chapter 1, "Getting Started," contains background information on computers, programming languages, and computer systems.
Chapter 2, "The Nature of the Problems and Solutions," introduces algorithms, pseudocode, and flowcharts.
Chapter 3, "Introduction to the Core C++ Language," covers the most often used components of the C++ language that are directly translatable from pseudocode and flowcharts.
Chapter 4, "Numerical Problems," presents some of the issues related to solving numerical problems and the C++ library to support mathematics functions, formatted I/O, C++ user-defined functions, and for loops.
Chapter 5, "Divide and Conquer," introduces the divide-and-conquer problem-solving approach and how it is related to C++ iteration and recursive functions.
Chapter 6, "Small-Scale Problems," discusses two small-scale problems in the areas of games and social science along with complete C++ solutions. It also introduces the C++ library for character processing and C++ switch statements.
Chapter 8, "Bottom-Up Design," covers the bottom-up design methodology and its application for designing a Blackjack game. This provides a contrast to the top-down approach shown in Chapter 7.
Chapter 9, "Medium-Scale Problems," discusses medium-scale problems that require more functions and more data processing using Blackjack and an expense report management program as the examples. In addition, it explains additional C++ concepts, including parallel arrays, multidimensional arrays, dynamic memory allocation, pass-by-reference parameter passing, file manipulation, and records.
Chapter 10, "Introduction to Object-Oriented Design," introduces the object-oriented design methodology. It revisits the Blackjack application as an object-oriented design for consistency across the design chapters.
Chapter 11, "Object-Oriented Programming in C++: Part I," discusses how object-oriented programming is supported in C++. It presents C++ classes in the context of creating user-defined types using two case-study examples: Cyber Bank and a Fractions data type.
Chapter 12, "Object-Oriented Programming in C++: Part II," presents other C++ object-oriented programming support, including pointers to objects, inheritance, and polymorphism. This chapter presents version 2 of Cyber Bank.
The Appendix, "Installing Development Software," gives step-by-step instructions for installing free C++ developer software on the Windows and Mac OS X platforms.