SlideShare a Scribd company logo
1 of 9
Study Guide
Introduction to
Programming
By
Lisa T. Cordeiro
About the Author
Lisa T. Cordeiro served in the Marines Corps in Okinawa,
Japan,
working in telecommunications. She later earned two bachelor
degrees from the University of Massachusetts at Amherst and a
master’s degree from Harvard University’s Extension School.
Ms.
Cordeiro has worked as a Web manager and technical writer and
editor for 13 years. She has written several study guides for
Penn
Foster on topics such as the Internet, Microsoft Office, and
Adobe
products. In addition, Ms. Cordeiro has written articles and
books.
Copyright © 2015 by Penn Foster, Inc.
All rights reserved. No part of the material protected by this
copyright may be
reproduced or utilized in any form or by any means, electronic
or mechanical,
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
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
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
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
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
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:
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.
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

More Related Content

Similar to Study GuideIntroduction toProgrammingByLisa T. Cor.docx

Due Date 1159 p.m. EST, Sunday of Unit 7 Points 10.docx
 Due Date  1159 p.m. EST, Sunday of Unit 7 Points  10.docx Due Date  1159 p.m. EST, Sunday of Unit 7 Points  10.docx
Due Date 1159 p.m. EST, Sunday of Unit 7 Points 10.docx
ShiraPrater50
 
As a team, you are to do your research and develop a PowerPoint wi.docx
As a team, you are to do your research and develop a PowerPoint wi.docxAs a team, you are to do your research and develop a PowerPoint wi.docx
As a team, you are to do your research and develop a PowerPoint wi.docx
davezstarr61655
 
WEEK2-English for Academic and Professional Purposes.pptx
WEEK2-English for Academic and Professional Purposes.pptxWEEK2-English for Academic and Professional Purposes.pptx
WEEK2-English for Academic and Professional Purposes.pptx
JeonJihyeon1
 
Table of Contents1Individual Assignment21.1Aims of the assignm.docx
Table of Contents1Individual Assignment21.1Aims of the assignm.docxTable of Contents1Individual Assignment21.1Aims of the assignm.docx
Table of Contents1Individual Assignment21.1Aims of the assignm.docx
ssuserf9c51d
 
6b. sample of a study guide
6b. sample of a study guide6b. sample of a study guide
6b. sample of a study guide
Gambari Isiaka
 
Select a topic to research. For your research, you must use Google.docx
Select a topic to research. For your research, you must use Google.docxSelect a topic to research. For your research, you must use Google.docx
Select a topic to research. For your research, you must use Google.docx
bagotjesusa
 
EH 1020, English Composition II Course Syllabus Course Descri.docx
 EH 1020, English Composition II Course Syllabus Course Descri.docx EH 1020, English Composition II Course Syllabus Course Descri.docx
EH 1020, English Composition II Course Syllabus Course Descri.docx
MARRY7
 
Drexel University, College of Engineering2015-2016 Academic Year.docx
Drexel University, College of Engineering2015-2016 Academic Year.docxDrexel University, College of Engineering2015-2016 Academic Year.docx
Drexel University, College of Engineering2015-2016 Academic Year.docx
jacksnathalie
 
BA634 Current & Emerging Technology Research Paper 1 .docx
BA634 Current & Emerging Technology Research Paper 1  .docxBA634 Current & Emerging Technology Research Paper 1  .docx
BA634 Current & Emerging Technology Research Paper 1 .docx
wilcockiris
 

Similar to Study GuideIntroduction toProgrammingByLisa T. Cor.docx (17)

Due Date 1159 p.m. EST, Sunday of Unit 7 Points 10.docx
 Due Date  1159 p.m. EST, Sunday of Unit 7 Points  10.docx Due Date  1159 p.m. EST, Sunday of Unit 7 Points  10.docx
Due Date 1159 p.m. EST, Sunday of Unit 7 Points 10.docx
 
As a team, you are to do your research and develop a PowerPoint wi.docx
As a team, you are to do your research and develop a PowerPoint wi.docxAs a team, you are to do your research and develop a PowerPoint wi.docx
As a team, you are to do your research and develop a PowerPoint wi.docx
 
English102_CourseSyllabus_Summer2017
English102_CourseSyllabus_Summer2017English102_CourseSyllabus_Summer2017
English102_CourseSyllabus_Summer2017
 
Course guide
Course guideCourse guide
Course guide
 
Hybrid Statistics Course Development
Hybrid Statistics Course DevelopmentHybrid Statistics Course Development
Hybrid Statistics Course Development
 
Information Policy Analysis Syllabus
Information Policy Analysis SyllabusInformation Policy Analysis Syllabus
Information Policy Analysis Syllabus
 
WEEK2-English for Academic and Professional Purposes.pptx
WEEK2-English for Academic and Professional Purposes.pptxWEEK2-English for Academic and Professional Purposes.pptx
WEEK2-English for Academic and Professional Purposes.pptx
 
Table of Contents1Individual Assignment21.1Aims of the assignm.docx
Table of Contents1Individual Assignment21.1Aims of the assignm.docxTable of Contents1Individual Assignment21.1Aims of the assignm.docx
Table of Contents1Individual Assignment21.1Aims of the assignm.docx
 
6b. sample of a study guide
6b. sample of a study guide6b. sample of a study guide
6b. sample of a study guide
 
Select a topic to research. For your research, you must use Google.docx
Select a topic to research. For your research, you must use Google.docxSelect a topic to research. For your research, you must use Google.docx
Select a topic to research. For your research, you must use Google.docx
 
EH 1020, English Composition II Course Syllabus Course Descri.docx
 EH 1020, English Composition II Course Syllabus Course Descri.docx EH 1020, English Composition II Course Syllabus Course Descri.docx
EH 1020, English Composition II Course Syllabus Course Descri.docx
 
EAPP-week-5-outlining.pptx
EAPP-week-5-outlining.pptxEAPP-week-5-outlining.pptx
EAPP-week-5-outlining.pptx
 
note_taking_facilitator_guide(goerzen2011)
note_taking_facilitator_guide(goerzen2011)note_taking_facilitator_guide(goerzen2011)
note_taking_facilitator_guide(goerzen2011)
 
ENG 121 Enhance teaching / snaptutorial.com
ENG 121 Enhance teaching / snaptutorial.comENG 121 Enhance teaching / snaptutorial.com
ENG 121 Enhance teaching / snaptutorial.com
 
Drexel University, College of Engineering2015-2016 Academic Year.docx
Drexel University, College of Engineering2015-2016 Academic Year.docxDrexel University, College of Engineering2015-2016 Academic Year.docx
Drexel University, College of Engineering2015-2016 Academic Year.docx
 
How to Structure a Computer Science Dissertation For a Doctoral Degree? - Phd...
How to Structure a Computer Science Dissertation For a Doctoral Degree? - Phd...How to Structure a Computer Science Dissertation For a Doctoral Degree? - Phd...
How to Structure a Computer Science Dissertation For a Doctoral Degree? - Phd...
 
BA634 Current & Emerging Technology Research Paper 1 .docx
BA634 Current & Emerging Technology Research Paper 1  .docxBA634 Current & Emerging Technology Research Paper 1  .docx
BA634 Current & Emerging Technology Research Paper 1 .docx
 

More from picklesvalery

Now that you have had an opportunity to explore ethics formally, cre.docx
Now that you have had an opportunity to explore ethics formally, cre.docxNow that you have had an opportunity to explore ethics formally, cre.docx
Now that you have had an opportunity to explore ethics formally, cre.docx
picklesvalery
 
Notifications My CommunityHomeBBA 3551-16P-5A19-S3, Inform.docx
Notifications My CommunityHomeBBA 3551-16P-5A19-S3, Inform.docxNotifications My CommunityHomeBBA 3551-16P-5A19-S3, Inform.docx
Notifications My CommunityHomeBBA 3551-16P-5A19-S3, Inform.docx
picklesvalery
 
November-December 2013 • Vol. 22No. 6 359Beverly Waller D.docx
November-December 2013 • Vol. 22No. 6 359Beverly Waller D.docxNovember-December 2013 • Vol. 22No. 6 359Beverly Waller D.docx
November-December 2013 • Vol. 22No. 6 359Beverly Waller D.docx
picklesvalery
 
NOTE Everything in BOLD are things that I need to turn in for m.docx
NOTE Everything in BOLD are things that I need to turn in for m.docxNOTE Everything in BOLD are things that I need to turn in for m.docx
NOTE Everything in BOLD are things that I need to turn in for m.docx
picklesvalery
 
Note I’ll provide my sources in the morning, and lmk if you hav.docx
Note I’ll provide my sources in the morning, and lmk if you hav.docxNote I’ll provide my sources in the morning, and lmk if you hav.docx
Note I’ll provide my sources in the morning, and lmk if you hav.docx
picklesvalery
 
Note Please follow instructions to the T.Topic of 3 page pape.docx
Note Please follow instructions to the T.Topic of 3 page pape.docxNote Please follow instructions to the T.Topic of 3 page pape.docx
Note Please follow instructions to the T.Topic of 3 page pape.docx
picklesvalery
 

More from picklesvalery (20)

NPV, IRR, Payback period,— PA1Correlates with CLA2 (NPV portion.docx
NPV, IRR, Payback period,— PA1Correlates with CLA2 (NPV portion.docxNPV, IRR, Payback period,— PA1Correlates with CLA2 (NPV portion.docx
NPV, IRR, Payback period,— PA1Correlates with CLA2 (NPV portion.docx
 
Now that you have had the opportunity to review various Cyber At.docx
Now that you have had the opportunity to review various Cyber At.docxNow that you have had the opportunity to review various Cyber At.docx
Now that you have had the opportunity to review various Cyber At.docx
 
Now that you have completed a series of assignments that have led yo.docx
Now that you have completed a series of assignments that have led yo.docxNow that you have completed a series of assignments that have led yo.docx
Now that you have completed a series of assignments that have led yo.docx
 
Now that you have completed your paper (ATTACHED), build and deliver.docx
Now that you have completed your paper (ATTACHED), build and deliver.docxNow that you have completed your paper (ATTACHED), build and deliver.docx
Now that you have completed your paper (ATTACHED), build and deliver.docx
 
Now that you have identified the revenue-related internal contro.docx
Now that you have identified the revenue-related internal contro.docxNow that you have identified the revenue-related internal contro.docx
Now that you have identified the revenue-related internal contro.docx
 
Now that you have read about Neandertals and modern Homo sapiens.docx
Now that you have read about Neandertals and modern Homo sapiens.docxNow that you have read about Neandertals and modern Homo sapiens.docx
Now that you have read about Neandertals and modern Homo sapiens.docx
 
Now that you have had an opportunity to explore ethics formally, cre.docx
Now that you have had an opportunity to explore ethics formally, cre.docxNow that you have had an opportunity to explore ethics formally, cre.docx
Now that you have had an opportunity to explore ethics formally, cre.docx
 
Novel Literary Exploration EssayWrite a Literary Exploration Ess.docx
Novel Literary Exploration EssayWrite a Literary Exploration Ess.docxNovel Literary Exploration EssayWrite a Literary Exploration Ess.docx
Novel Literary Exploration EssayWrite a Literary Exploration Ess.docx
 
Notifications My CommunityHomeBBA 3551-16P-5A19-S3, Inform.docx
Notifications My CommunityHomeBBA 3551-16P-5A19-S3, Inform.docxNotifications My CommunityHomeBBA 3551-16P-5A19-S3, Inform.docx
Notifications My CommunityHomeBBA 3551-16P-5A19-S3, Inform.docx
 
November-December 2013 • Vol. 22No. 6 359Beverly Waller D.docx
November-December 2013 • Vol. 22No. 6 359Beverly Waller D.docxNovember-December 2013 • Vol. 22No. 6 359Beverly Waller D.docx
November-December 2013 • Vol. 22No. 6 359Beverly Waller D.docx
 
NOTEPlease pay attention to the assignment instructionsZero.docx
NOTEPlease pay attention to the assignment instructionsZero.docxNOTEPlease pay attention to the assignment instructionsZero.docx
NOTEPlease pay attention to the assignment instructionsZero.docx
 
NOTE Use below Textbooks only. 400 WordsTopic Which doctrine.docx
NOTE Use below Textbooks only. 400 WordsTopic Which doctrine.docxNOTE Use below Textbooks only. 400 WordsTopic Which doctrine.docx
NOTE Use below Textbooks only. 400 WordsTopic Which doctrine.docx
 
NOTE Everything in BOLD are things that I need to turn in for m.docx
NOTE Everything in BOLD are things that I need to turn in for m.docxNOTE Everything in BOLD are things that I need to turn in for m.docx
NOTE Everything in BOLD are things that I need to turn in for m.docx
 
Note Be sure to focus only on the causes of the problem in this.docx
Note Be sure to focus only on the causes of the problem in this.docxNote Be sure to focus only on the causes of the problem in this.docx
Note Be sure to focus only on the causes of the problem in this.docx
 
Note I’ll provide my sources in the morning, and lmk if you hav.docx
Note I’ll provide my sources in the morning, and lmk if you hav.docxNote I’ll provide my sources in the morning, and lmk if you hav.docx
Note I’ll provide my sources in the morning, and lmk if you hav.docx
 
Note Here, the company I mentioned was Qualcomm 1. Email is the.docx
Note Here, the company I mentioned was Qualcomm 1. Email is the.docxNote Here, the company I mentioned was Qualcomm 1. Email is the.docx
Note Here, the company I mentioned was Qualcomm 1. Email is the.docx
 
Note Please follow instructions to the T.Topic of 3 page pape.docx
Note Please follow instructions to the T.Topic of 3 page pape.docxNote Please follow instructions to the T.Topic of 3 page pape.docx
Note Please follow instructions to the T.Topic of 3 page pape.docx
 
Note A full-sentence outline differs from bullet points because e.docx
Note A full-sentence outline differs from bullet points because e.docxNote A full-sentence outline differs from bullet points because e.docx
Note A full-sentence outline differs from bullet points because e.docx
 
Notable photographers 1980 to presentAlmas, ErikAraki, No.docx
Notable photographers 1980 to presentAlmas, ErikAraki, No.docxNotable photographers 1980 to presentAlmas, ErikAraki, No.docx
Notable photographers 1980 to presentAlmas, ErikAraki, No.docx
 
Note 2 political actions that are in line with Socialism and explain.docx
Note 2 political actions that are in line with Socialism and explain.docxNote 2 political actions that are in line with Socialism and explain.docx
Note 2 political actions that are in line with Socialism and explain.docx
 

Recently uploaded

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
SanaAli374401
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Recently uploaded (20)

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 

Study GuideIntroduction toProgrammingByLisa T. Cor.docx

  • 1. Study Guide Introduction to Programming By Lisa T. Cordeiro About the Author Lisa T. Cordeiro served in the Marines Corps in Okinawa, Japan, working in telecommunications. She later earned two bachelor degrees from the University of Massachusetts at Amherst and a master’s degree from Harvard University’s Extension School. Ms. Cordeiro has worked as a Web manager and technical writer and editor for 13 years. She has written several study guides for Penn Foster on topics such as the Internet, Microsoft Office, and Adobe products. In addition, Ms. Cordeiro has written articles and books. Copyright © 2015 by Penn Foster, Inc. All rights reserved. No part of the material protected by this copyright may be reproduced or utilized in any form or by any means, electronic or mechanical,
  • 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