2. including photocopying, recording, or by any information
storage and retrieval
system, without permission in writing from the copyright owner.
Requests for permission to make copies of any part of the work
should be
mailed to Copyright Permissions, Penn Foster, 925 Oak Street,
Scranton,
Pennsylvania 18515.
Printed in the United States of America
All terms mentioned in this text that are known to be trademarks
or service
marks have been appropriately capitalized. Use of a term in this
text should not be
regarded as affecting the validity of any trademark or service
mark.
INSTRUCTION TO STUDENTS
1
LESSON ASSIGNMENTS
5
LESSON 1: INTRODUCTION TO PROGRAMMING
7
GRADED PROJECT—LESSON 1
15
LESSON 2: MAKING DECISIONS
17
3. GRADED PROJECT—LESSON 2
27
LESSON 3: ARRAYS AND MENU-DRIVEN
PROGRAMS
29
GRADED PROJECT—LESSON 3
37
LESSON 4: ADVANCED PROGRAMMING
39
GRADED PROJECT—LESSON 4
51
iii
C
o
n
t
e
n
t
s
C
o
n
t
4. e
n
t
s
YOUR COURSE
Welcome to your course in computer programming. In this
course, you’ll learn the basics of computer programming and
logic. You won’t learn a specific programming language; rather,
you’ll examine the basic logic common to all programming
languages. You’ll come away from this course with solid
knowledge of how to create your own programs. You’ll also
learn guidelines on how to incorporate good design into your
programs. You’ll walk away from this course with a solid
understanding of programming concepts that you can use in
your own designs.
This course is designed for beginner programmers. You don’t
need any previous programming experience or an extensive
math background; the text is written in nontechnical lan-
guage, making it easy for beginners to follow the logic. You
also don’t need to focus on a specific programming language.
This course focuses on basic guidelines and best practices for
developing good programming skills.
OBJECTIVES
When you complete this course, you’ll be able to
n Describe basic programming steps
n Create modules and hierarchy charts
n Use Boolean expressions
5. n Create loops
n Add control breaks
n Create arrays
n Search and sort arrays
n Validate input
1
In
s
t
r
u
c
t
io
n
s
In
s
t
r
u
c
6. t
io
n
s
n Solve problems with recursion
n Use UML diagrams to design classes
n Design graphical user interfaces
n Write event handlers
YOUR TEXTBOOK
Your textbook for this course is Programming Logic and
Design,
Third Edition, by Tony Gaddis. The textbook contains the
material on which you’ll be tested. You should become familiar
with this text prior to beginning your studies.
Begin by skimming the brief contents on page v. Here, you’ll
see a list of the chapter titles, which give you an overall idea
of what you’ll learn in this course. The contents, which begins
on page vii, provides a more detailed listing of the topics
you’ll learn in each chapter. Read the preface beginning on
page xiii to explore how the text is organized.
The main part of your textbook (pages 1–583) is the study
material for the course. Each chapter begins with a list of
topics, followed by the study material itself. Each chapter
also includes checkpoints to make sure you understand the
content. At the end of each chapter are review questions and
7. exercises; you’ll find the answers to these questions and
exercises on your student Web site. Log in to the Student
Area at http://www.pennfoster.edu, go to Student portal,
and look for the
Solution
s link associated with your course.
Three appendices—A, B, and C—are located at the end of
the text. An index begins on page 601. A fourth appendix
is located on the CD included at the back of the textbook.
This appendix includes answers to the checkpoints in the
text. The index includes important topics covered in your
textbook, along with page references where you can locate
material relating to each term.
Instructions to Students2
Instructions to Students
COURSE MATERIALS
This course includes the following materials:
8. 1. This study guide, which contains an introduction to your
course, plus
n A lesson assignments page with a schedule of
study assignments
n Assignment introductions emphasizing the main
points in the textbook
n Four graded projects, one for each of the lessons in
this course
2. Your course textbook, Programming Logic and Design,
Third Edition, which contains the assigned reading mate-
rial for this course
A STUDY PLAN
1. Note the pages for each assignment and read the intro-
ductory material in this study guide.
2. Study the assigned pages, paying attention to all details,
especially the main concepts.
9. 3. Complete the checkpoints in the textbook. After answering
the checkpoints, check your answers with those provided
in Appendix D on the CD. If you miss any of the ques-
tions, review the pages in the textbook that cover those
questions. These questions are designed to reveal weak
points that you should review. Do not send the answers to
these questions to the school. They’re for only you to eval-
uate your understanding of the material.
3. Complete the review questions and all assigned exercises at
the end of the chapter to review the material. When you’re
finished, go to http://www.pennfoster.edu and log in to
your Student Area. Go to student portal and look for the