MIS410 1 - Information Systems
Please check the book and slides in order to provide a detailed answer
Computing with
Business
Applications
1: Programming Logic and Design (comprehensive); by Joyce Farrell, Ninth
Edition, Cengage Learning.
2: VBA for Modelers: Developing Decision Support Systems with Microsoft Office
Excel; by Albright 5th edition, South Western Cengage Learning.
Chapter 1
An Introduction to Programming
1: Programming Logic and Design (comprehensive); by Joyce Farrell, Ninth
Edition, Cengage Learning.
pages: 1-37
Objectives
In this chapter, you will learn about:
• Computer systems
• Simple program logic
• The steps involved in the program development cycle
• Pseudocode statements and flowchart symbols
• Using a sentinel value to end a program
• Programming and user environments
• The evolution of programming models
3© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Understanding Computer Systems
• Computer system
• Combination of all the components required to process and store data using a
computer
• Hardware
• Equipment associated with a computer
• Software
• Computer instructions
• Tells the hardware what to do
• Programs
• Instructions written by programmers
4© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Understanding Computer Systems
(continued)
• Application software such as word processing, spreadsheets, payroll and
inventory, even games
• System software such as operating systems like Windows, Linux, or UNIX
• Computer hardware and software accomplish three major operations
• Input
• Data items such as text, numbers, images, and sound
• Processing
• Calculations and comparisons performed by the central processing unit (CPU)
5© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Understanding Computer Systems
(continued)
• Output
• Resulting information that is sent to a printer,
a monitor, or storage devices after processing
• Programming language
• Used to write computer instructions
• Examples
• Visual Basic, C#, C++, or Java
• Syntax
• Rules governing word usage and punctuation
6© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Understanding Computer Systems
(continued)
• Computer memory
• Computer’s temporary, internal storage – random access memory (RAM)
• Volatile memory – lost when the power is off
• Permanent storage devices
• Nonvolatile memory
• Compiler or interpreter
• Translates source code into machine language (binary language) statements
called object code
• Checks for syntax errors
7© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Understanding Simple Program Logic
• Program executes or runs
• Input will be accepted, some processing will occur, and results will be output
• Programs with syntax errors cannot execute
• Logical errors
• Errors in program logic produce incorrect output
• Logic of the computer program
• Sequence of specific instructions in specific order
• Variable
• Named memory location whose value can vary
8© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Understanding the Program
Development Cycle
• Program development cycle
• Understand the problem
• Plan the logic
• Code the program
• Use software (a compiler or interpreter) to translate the program into
machine language
• Test the program
• Put the program into production
• Maintain the program
9© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Understanding the Program
Development Cycle (continued)
10
Figure 1-1 The program development cycle
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Understanding the Problem
• One of the most difficult aspects of programming
• Users or end users
• People for whom a program is written
• Documentation
• Supporting paperwork for a program
11© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Planning the Logic
• Heart of the programming process
• Most common planning tools
• Flowcharts
• Pseudocode
• IPO charts (input, processing, and output)
• TOE charts (tasks, objects, and events)
• Desk-checking
• Walking through a program’s logic on paper before you actually write the
program
12© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Coding the Program
• Hundreds of programming languages available
• Choose based on features
• Similar in their basic capabilities
• Easier than the planning step
13© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Using Software to Translate the Program into
Machine Language
• Translator program
• Compiler or interpreter
• Changes the programmer’s English-like high-level programming language into
the low-level machine language
• Syntax error
• Misuse of a language’s grammar rules
• Programmer corrects listed syntax errors
• Might need to recompile the code several times
14© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Using Software to Translate the Program into Machine
Language (continued)
Figure 1-2 Creating an executable program
15© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Testing the Program
• Logical error
• Results when a syntactically correct statement, but the wrong one for the
current context, is used
• Test
• Execute the program with some sample data to see whether the results are
logically correct
• Debugging is the process of finding and correcting program errors
• Programs should be tested with many sets of data
16© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Putting the Program into Production
• Process depends on program’s purpose
• May take several months
• Conversion
• The entire set of actions an organization must take to switch over to using a
new program or set of programs
17© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Maintaining the Program
• Maintenance
• Making changes after the program is put into production
• Common first programming job
• Maintaining previously written programs
• Make changes to existing programs
• Repeat the development cycle
18© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Using Pseudocode Statements
and Flowchart Symbols
• Pseudocode
• English-like representation of the logical steps it takes to solve a problem
• Flowchart
• Pictorial representation of the logical steps it takes to solve a problem
19© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Writing Pseudocode
• Pseudocode representation of a number-doubling problem
start
input myNumber
set myAnswer = myNumber * 2
output myAnswer
stop
20© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Writing Pseudocode (continued)
• Programmers preface their pseudocode with a beginning statement
like start and end it with a terminating statement like stop
• Flexible planning tool
21© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Drawing Flowcharts
• Create a flowchart
• Draw geometric shapes that contain the individual statements
• Connect shapes with arrows
• Input symbol
• Indicates input operation
• Parallelogram
• Processing symbol
• Contains processing statements such as arithmetic
• Rectangle
22© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Drawing Flowcharts (continued)
• Output symbol
• Represents output statements
• Parallelogram
• Flowlines
• Arrows that connect steps
• Terminal symbols
• Start/stop symbols
• Shaped like a racetrack
• Also called lozenges
23© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Drawing Flowcharts (continued)
Figure 1-6 Flowchart and pseudocode of program that doubles a number
24© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Repeating Instructions
• Program in Figure 1-6 only works for one number
• Not feasible to run the program over and over 10,000 times
• Not feasible to add 10,000 lines of code to a program
• Create a loop (repetition of a series of steps) instead
• Avoid an infinite loop (repeating flow of logic that never ends)
25© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Repeating Instructions (continued)
Figure 1-8 Flowchart of infinite number-doubling program
26© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Using a Sentinel Value to End
a Program
• Making a decision
• Testing a value
• Decision symbol
• Diamond shape
• Dummy value
• Data-entry value that the user will never need
• Sentinel value
• eof (“end of file”)
• Marker at the end of a file that automatically acts as a sentinel
27© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Using a Sentinel Value to End
a Program (continued)
Figure 1-9 Flowchart of number-doubling program with sentinel value of 0
28© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Using a Sentinel Value to End
a Program (continued)
Figure 1-10 Flowchart using eof
29© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Understanding Programming
and User Environments
• Many options for programming and user environments
• Planning
• Flowchart
• Pseudocode
• Coding
• Text editors
• Executing
• Input from keyboard, mouse, microphone
• Outputting
• Text, images, sound
30© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Understanding Programming Environments
• Use a keyboard to type program statements into an editor
• Plain text editor
• Similar to a word processor but without as many features
• Text editor that is part of an integrated development environment (IDE)
• Software package that provides an editor, a compiler, and other programming tools
31© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Understanding Programming Environments
(continued)
Figure 1-12 A C# number-doubling program in Visual Studio
32© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Understanding User Environments
• Command line
• Location on your computer screen where you type text entries to
communicate with the computer’s operating system
• Graphical user interface (GUI)
• Allows users to interact with a program in a graphical environment
33© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Understanding User Environments
(continued)
Figure 1-13 Executing a number-doubling program
in a command-line environment
34© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Understanding User Environments
(continued)
Figure 1-14 Executing a number-doubling program
in a GUI environment
35© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Understanding the Evolution
of Programming Models
• People have been writing modern computer programs since the
1940s
• Newer programming languages
• Look much more like natural language
• Are easier to use
• Create self-contained modules or program segments that can be pieced
together in a variety of ways
36© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Understanding the Evolution
of Programming Models (continued)
• Major models or paradigms used by programmers
• Procedural programming
• Focuses on the procedures that programmers create
• Object-oriented programming
• Focuses on objects, or “things,” and describes their features (or attributes) and their
behaviors
• This text
• Focuses on procedural programming techniques
37© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Summary
• Hardware and software accomplish input, processing, and output
• Logic must be developed correctly
• Logical errors are much more difficult to locate than syntax errors
• Use flowcharts, pseudocode, IPO charts, and TOE charts to plan the
logic
• Avoid infinite loops by testing for a sentinel value
• Use a text editor or an IDE to enter your program statements
38© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from
the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
COMPREHENSIVE
Joyce Farrell
Ninth Edition
Logic & Design
Programming
N
in
th
E
d
itio
n
C
O
M
P
R
E
H
E
N
S
IV
E
P
ro
g
ra
m
m
in
g
L
o
g
ic
&
D
e
sig
n
Jo
yce Farrell
To register or access your online learning solution or purchase materials
for your course, visit www.cengagebrain.com.
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-300
Buy. Rent. Access.
Access student data fi les and other study
tools on cengagebrain.com.
For detailed instructions visit
http://solutions.cengage.com/ctdownloads/
Store your Data Files on a USB drive for maximum effi ciency in
organizing and working with the fi les.
Macintosh users should use a program to expand WinZip or PKZip archives.
Ask your instructor or lab coordinator for assistance.
Untitled-1.indd 1 10/12/16 3:56 PM
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-300
PROGRAMMING LOGIC
AND DESIGN
COMPREHENSIVE
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-300
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-300
PROGRAMMING LOGIC
AND DESIGN
COMPREHENSIVE
J O Y C E FA R R E L L
N I N T H E D I T I O N
Australia • Brazil • Japan • Korea • Mexico • Singapore • Spain • United Kingdom • United St ates
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-300
Programming Logic and Design,
Comprehensive
Ninth Edition
Joyce Farrell
Senior Product Director:
Kathleen McMahon
Product Team Leader: Kristin McNary
Associate Product Manager: Kate Mason
Senior Content Developer: Alyssa Pratt
Senior Content Project Manager:
Jennifer Feltri-George
Manufacturing Planner: Julio Esperas
Art Director: Diana Graham
Production Service/Composition:
SPi Global
Cover Photo:
Colormos/Photodisc/Getty Images
Printed in the United States of America
Print Number: 01 Print Year: 2018
© 2018 Cengage Learning®
ALL RIGHTS RESERVED. No part of this work covered by the
copyright herein may be reproduced or distributed in any form
or by any means, except as permitted by U.S. copyright law,
without the prior written permission of the copyright owner.
For product information and technology assistance, contact us at
Cengage Learning Customer & Sales Support, 1-800-354-9706
For permission to use material from this text or product,
submit all requests online at www.cengage.com/permissions
Further permissions questions can be emailed to
[email protected]
Cengage Learning
20 Channel Center Street
Boston, MA 02210
USA
Unless otherwise noted all items © Cengage Learning.
Cengage Learning is a leading provider of customized learning
solutions with employees residing in nearly 40 different coun-
tries and sales in more than 125 countries around the world.
Find your local representative at www.cengage.com.
Cengage Learning products are represented in Canada by
Nelson Education, Ltd.
To learn more about Cengage Learning Solutions, visit
www.cengage.com
Purchase any of our products at your local college store or at
our preferred online store www.cengagebrain.com
Library of Congress Control Number: 2016959742
ISBN: 978-1-337-10207-0
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-300
Brief Contents
P re f a c e � � � � � � � � � � � � � � � � x v i
C H A P T E R 1 A n O v e r v i e w o f C o m p u t e r s a n d P ro g r a m m i n g � 1
C H A P T E R 2 E l e m e n t s o f H i g h - Q u a l i t y P ro g r a m s � � � � � 3 8
C H A P T E R 3 U n d e r s t a n d i n g S t r u c t u re � � � � � � � � � � 8 7
C H A P T E R 4 M a k i n g D e c i s i o n s � � � � � � � � � � � � 1 2 4
C H A P T E R 5 L o o p i n g � � � � � � � � � � � � � � � � 1 7 6
C H A P T E R 6 A r r a y s � � � � � � � � � � � � � � � � � 2 2 7
C H A P T E R 7 F i l e H a n d l i n g a n d A p p l i c a t i o n s � � � � � � 2 7 2
C H A P T E R 8 A d v a n c e d D a t a H a n d l i n g C o n c e p t s � � � � � 3 2 1
C H A P T E R 9 A d v a n c e d M o d u l a r i z a t i o n Te c h n i q u e s � � � 3 6 6
C H A P T E R 1 0 O b j e c t - O r i e n t e d P ro g r a m m i n g � � � � � � � 4 2 0
C H A P T E R 1 1 M o re O b j e c t - O r i e n t e d P ro g r a m m i n g
C o n c e p t s � � � � � � � � � � � � � � � 4 6 4
C H A P T E R 1 2 E v e n t - D r i v e n G U I P ro g r a m m i n g ,
M u l t i t h re a d i n g , a n d A n i m a t i o n � � � � � � 5 0 7
A P P E N D I X A U n d e r s t a n d i n g N u m b e r i n g S y s t e m s
a n d C o m p u t e r C o d e s � � � � � � � � � � 5 3 9
A P P E N D I X B S o l v i n g D i f f i c u l t S t r u c t u r i n g P ro b l e m s � � � 5 4 7
G l o s s a r y � � � � � � � � � � � � � � � � 5 5 6
I n d e x � � � � � � � � � � � � � � � � � 5 7 1
v
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-300
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-300
Contents
P re f a c e � � � � � � � � � � � � � � � � x v i
C H A P T E R 1 A n O v e r v i e w o f C o m p u t e r s a n d P ro g r a m m i n g � 1
Understanding Computer Systems � � � � � � � � � � � � � 2
Understanding Simple Program Logic � � � � � � � � � � � � 5
Understanding the Program Development Cycle � � � � � � � 8
Understanding the Problem � � � � � � � � � � � � � � � � 8
Planning the Logic � � � � � � � � � � � � � � � � � � � 10
Coding the Program � � � � � � � � � � � � � � � � � � 10
Using Software to Translate the Program into Machine
Language � � � � � � � � � � � � � � � � � � � � � � 11
Testing the Program � � � � � � � � � � � � � � � � � � 12
Putting the Program into Production� � � � � � � � � � � 13
Maintaining the Program � � � � � � � � � � � � � � � � 14
Using Pseudocode Statements and Flowchart Symbols � � � 15
Writing Pseudocode � � � � � � � � � � � � � � � � � � 15
Drawing Flowcharts � � � � � � � � � � � � � � � � � � 17
Repeating Instructions � � � � � � � � � � � � � � � � � 19
Using a Sentinel Value to End a Program � � � � � � � � � 20
Understanding Programming and User Environments � � � � 23
Understanding Programming Environments � � � � � � � 23
Understanding User Environments � � � � � � � � � � � 25
Understanding the Evolution of Programming Models � � � � 27
Chapter Summary � � � � � � � � � � � � � � � � � � � � 28
Key Terms � � � � � � � � � � � � � � � � � � � � � � � 29
Exercises � � � � � � � � � � � � � � � � � � � � � � � � 32
C H A P T E R 2 E l e m e n t s o f H i g h - Q u a l i t y P ro g r a m s � � � � � 3 8
Declaring and Using Variables and Constants � � � � � � � 39
Understanding Data Types � � � � � � � � � � � � � � � 39
Understanding Unnamed, Literal Constants � � � � � � � 39
Working with Variables � � � � � � � � � � � � � � � � � 40
Understanding a Declaration’s Data Type � � � � � � � � 41
vii
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-300
Understanding a Declaration’s Identifier � � � � � � � � � 42
Assigning Values to Variables � � � � � � � � � � � � � � 45
Declaring Named Constants � � � � � � � � � � � � � � 46
Performing Arithmetic Operations � � � � � � � � � � � � � 47
The Integer Data Type � � � � � � � � � � � � � � � � � 50
Understanding the Advantages of Modularization � � � � � � 51
Modularization Provides Abstraction� � � � � � � � � � � 52
Modularization Helps Multiple Programmers to Work
on a Problem � � � � � � � � � � � � � � � � � � � � 53
Modularization Allows You to Reuse Work � � � � � � � � 53
Modularizing a Program � � � � � � � � � � � � � � � � 54
Declaring Variables and Constants within Modules � � � � � 58
Understanding the Most Common Configuration
for Mainline Logic � � � � � � � � � � � � � � � � � � � 60
Creating Hierarchy Charts � � � � � � � � � � � � � � � 64
Features of Good Program Design � � � � � � � � � � � � 66
Using Program Comments � � � � � � � � � � � � � � � 67
Choosing Identifiers � � � � � � � � � � � � � � � � � � 69
Designing Clear Statements � � � � � � � � � � � � � � 71
Writing Clear Prompts and Echoing Input � � � � � � � � 72
Maintaining Good Programming Habits � � � � � � � � � � 74
Chapter Summary � � � � � � � � � � � � � � � � � � � � 75
Key Terms � � � � � � � � � � � � � � � � � � � � � � � 76
Exercises � � � � � � � � � � � � � � � � � � � � � � � � 79
C H A P T E R 3 U n d e r s t a n d i n g S t r u c t u re � � � � � � � � � � 8 7
The Disadvantages of Unstructured Spaghetti Code � � � � 88
Understanding the Three Basic Structures � � � � � � � � � 90
The Sequence Structure � � � � � � � � � � � � � � � � 90
The Selection Structure � � � � � � � � � � � � � � � � 91
The Loop Structure � � � � � � � � � � � � � � � � � � 92
Combining Structures � � � � � � � � � � � � � � � � � 93
Using a Priming Input to Structure a Program � � � � � � � 99
Understanding the Reasons for Structure � � � � � � � � � 106
Recognizing Structure � � � � � � � � � � � � � � � � � � 107
Structuring and Modularizing Unstructured Logic � � � � � � 110
Chapter Summary � � � � � � � � � � � � � � � � � � � � 115
Key Terms � � � � � � � � � � � � � � � � � � � � � � � 115
Exercises � � � � � � � � � � � � � � � � � � � � � � � � 117
C O N T E N T S
viii
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-300
C H A P T E R 4 M a k i n g D e c i s i o n s � � � � � � � � � � � � 1 2 4
The Selection Structure � � � � � � � � � � � � � � � � � 125
Using Relational Comparison Operators � � � � � � � � � � 129
Avoiding a Common Error with Relational Operators � � � 133
Understanding AND Logic � � � � � � � � � � � � � � � � 134
Nesting AND Decisions for Efficiency � � � � � � � � � � 137
Using the AND Operator � � � � � � � � � � � � � � � � 139
Avoiding Common Errors in an AND Selection � � � � � � 141
Understanding OR Logic � � � � � � � � � � � � � � � � � 143
Writing OR Selections for Efficiency � � � � � � � � � � � 145
Using the OR Operator � � � � � � � � � � � � � � � � � 147
Avoiding Common Errors in an OR Selection � � � � � � � 147
Understanding NOT Logic � � � � � � � � � � � � � � � � 153
Avoiding a Common Error in a NOT Expression � � � � � � 154
Making Selections within Ranges � � � � � � � � � � � � � 155
Avoiding Common Errors When Using Range Checks � � � 157
Understanding Precedence When Combining
AND and OR Operators � � � � � � � � � � � � � � � � � 160
Understanding the case Structure � � � � � � � � � � � � 163
Chapter Summary � � � � � � � � � � � � � � � � � � � � 165
Key Terms � � � � � � � � � � � � � � � � � � � � � � � 166
Exercises � � � � � � � � � � � � � � � � � � � � � � � � 167
C H A P T E R 5 L o o p i n g � � � � � � � � � � � � � � � � 1 7 6
Appreciating the Advantages of Looping � � � � � � � � � � 177
Using a Loop Control Variable � � � � � � � � � � � � � � 179
Using a Definite Loop with a Counter � � � � � � � � � � 179
Using an Indefinite Loop with a Sentinel Value � � � � � � 181
Understanding the Loop in a Program’s Mainline Logic � � 183
Nested Loops � � � � � � � � � � � � � � � � � � � � � � 185
Avoiding Common Loop Mistakes � � � � � � � � � � � � � 190
Mistake: Failing to Initialize the Loop Control Variable � � � 190
Mistake: Neglecting to Alter the Loop Control Variable � � 191
Mistake: Using the Wrong Type of Comparison When
Testing the Loop Control Variable � � � � � � � � � � � 192
Mistake: Including Statements Inside the Loop Body
that Belong Outside the Loop � � � � � � � � � � � � � 194
Using a for Loop � � � � � � � � � � � � � � � � � � � � 199
Using a Posttest Loop � � � � � � � � � � � � � � � � � � 201
Recognizing the Characteristics Shared
by Structured Loops � � � � � � � � � � � � � � � � � � 203
ix
C O N T E N T S
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-300
Common Loop Applications � � � � � � � � � � � � � � � 205
Using a Loop to Accumulate Totals � � � � � � � � � � � 205
Using a Loop to Validate Data � � � � � � � � � � � � � 209
Limiting a Reprompting Loop � � � � � � � � � � � � � � 209
Validating a Data Type � � � � � � � � � � � � � � � � � 212
Validating Reasonableness and Consistency of Data � � � 213
Comparing Selections and Loops � � � � � � � � � � � � � 214
Chapter Summary � � � � � � � � � � � � � � � � � � � � 218
Key Terms � � � � � � � � � � � � � � � � � � � � � � � 218
Exercises � � � � � � � � � � � � � � � � � � � � � � � � 220
C H A P T E R 6 A r r a y s � � � � � � � � � � � � � � � � � 2 2 7
Storing Data in Arrays � � � � � � � � � � � � � � � � � � 228
How Arrays Occupy Computer Memory � � � � � � � � � 228
How an Array Can Replace Nested Decisions� � � � � � � � 231
Using Constants with Arrays � � � � � � � � � � � � � � � 238
Using a Constant as the Size of an Array � � � � � � � � 238
Using Constants as Array Element Values � � � � � � � � 239
Using a Constant as an Array Subscript � � � � � � � � � 239
Searching an Array for an Exact Match � � � � � � � � � � 240
Using Parallel Arrays � � � � � � � � � � � � � � � � � � 244
Improving Search Efficiency � � � � � � � � � � � � � � 248
Searching an Array for a Range Match� � � � � � � � � � � 250
Remaining within Array Bounds � � � � � � � � � � � � � � 255
Understanding Array Size � � � � � � � � � � � � � � � 255
Understanding Subscript Bounds � � � � � � � � � � � � 255
Using a for Loop to Process an Array � � � � � � � � � � 258
Chapter Summary � � � � � � � � � � � � � � � � � � � � 260
Key Terms � � � � � � � � � � � � � � � � � � � � � � � 261
Exercises � � � …
CATEGORIES
Economics
Nursing
Applied Sciences
Psychology
Science
Management
Computer Science
Human Resource Management
Accounting
Information Systems
English
Anatomy
Operations Management
Sociology
Literature
Education
Business & Finance
Marketing
Engineering
Statistics
Biology
Political Science
Reading
History
Financial markets
Philosophy
Mathematics
Law
Criminal
Architecture and Design
Government
Social Science
World history
Chemistry
Humanities
Business Finance
Writing
Programming
Telecommunications Engineering
Geography
Physics
Spanish
ach
e. Embedded Entrepreneurship
f. Three Social Entrepreneurship Models
g. Social-Founder Identity
h. Micros-enterprise Development
Outcomes
Subset 2. Indigenous Entrepreneurship Approaches (Outside of Canada)
a. Indigenous Australian Entrepreneurs Exami
Calculus
(people influence of
others) processes that you perceived occurs in this specific Institution Select one of the forms of stratification highlighted (focus on inter the intersectionalities
of these three) to reflect and analyze the potential ways these (
American history
Pharmacology
Ancient history
. Also
Numerical analysis
Environmental science
Electrical Engineering
Precalculus
Physiology
Civil Engineering
Electronic Engineering
ness Horizons
Algebra
Geology
Physical chemistry
nt
When considering both O
lassrooms
Civil
Probability
ions
Identify a specific consumer product that you or your family have used for quite some time. This might be a branded smartphone (if you have used several versions over the years)
or the court to consider in its deliberations. Locard’s exchange principle argues that during the commission of a crime
Chemical Engineering
Ecology
aragraphs (meaning 25 sentences or more). Your assignment may be more than 5 paragraphs but not less.
INSTRUCTIONS:
To access the FNU Online Library for journals and articles you can go the FNU library link here:
https://www.fnu.edu/library/
In order to
n that draws upon the theoretical reading to explain and contextualize the design choices. Be sure to directly quote or paraphrase the reading
ce to the vaccine. Your campaign must educate and inform the audience on the benefits but also create for safe and open dialogue. A key metric of your campaign will be the direct increase in numbers.
Key outcomes: The approach that you take must be clear
Mechanical Engineering
Organic chemistry
Geometry
nment
Topic
You will need to pick one topic for your project (5 pts)
Literature search
You will need to perform a literature search for your topic
Geophysics
you been involved with a company doing a redesign of business processes
Communication on Customer Relations. Discuss how two-way communication on social media channels impacts businesses both positively and negatively. Provide any personal examples from your experience
od pressure and hypertension via a community-wide intervention that targets the problem across the lifespan (i.e. includes all ages).
Develop a community-wide intervention to reduce elevated blood pressure and hypertension in the State of Alabama that in
in body of the report
Conclusions
References (8 References Minimum)
*** Words count = 2000 words.
*** In-Text Citations and References using Harvard style.
*** In Task section I’ve chose (Economic issues in overseas contracting)"
Electromagnetism
w or quality improvement; it was just all part of good nursing care. The goal for quality improvement is to monitor patient outcomes using statistics for comparison to standards of care for different diseases
e a 1 to 2 slide Microsoft PowerPoint presentation on the different models of case management. Include speaker notes... .....Describe three different models of case management.
visual representations of information. They can include numbers
SSAY
ame workbook for all 3 milestones. You do not need to download a new copy for Milestones 2 or 3. When you submit Milestone 3
pages):
Provide a description of an existing intervention in Canada
making the appropriate buying decisions in an ethical and professional manner.
Topic: Purchasing and Technology
You read about blockchain ledger technology. Now do some additional research out on the Internet and share your URL with the rest of the class
be aware of which features their competitors are opting to include so the product development teams can design similar or enhanced features to attract more of the market. The more unique
low (The Top Health Industry Trends to Watch in 2015) to assist you with this discussion.
https://youtu.be/fRym_jyuBc0
Next year the $2.8 trillion U.S. healthcare industry will finally begin to look and feel more like the rest of the business wo
evidence-based primary care curriculum. Throughout your nurse practitioner program
Vignette
Understanding Gender Fluidity
Providing Inclusive Quality Care
Affirming Clinical Encounters
Conclusion
References
Nurse Practitioner Knowledge
Mechanics
and word limit is unit as a guide only.
The assessment may be re-attempted on two further occasions (maximum three attempts in total). All assessments must be resubmitted 3 days within receiving your unsatisfactory grade. You must clearly indicate “Re-su
Trigonometry
Article writing
Other
5. June 29
After the components sending to the manufacturing house
1. In 1972 the Furman v. Georgia case resulted in a decision that would put action into motion. Furman was originally sentenced to death because of a murder he committed in Georgia but the court debated whether or not this was a violation of his 8th amend
One of the first conflicts that would need to be investigated would be whether the human service professional followed the responsibility to client ethical standard. While developing a relationship with client it is important to clarify that if danger or
Ethical behavior is a critical topic in the workplace because the impact of it can make or break a business
No matter which type of health care organization
With a direct sale
During the pandemic
Computers are being used to monitor the spread of outbreaks in different areas of the world and with this record
3. Furman v. Georgia is a U.S Supreme Court case that resolves around the Eighth Amendments ban on cruel and unsual punishment in death penalty cases. The Furman v. Georgia case was based on Furman being convicted of murder in Georgia. Furman was caught i
One major ethical conflict that may arise in my investigation is the Responsibility to Client in both Standard 3 and Standard 4 of the Ethical Standards for Human Service Professionals (2015). Making sure we do not disclose information without consent ev
4. Identify two examples of real world problems that you have observed in your personal
Summary & Evaluation: Reference & 188. Academic Search Ultimate
Ethics
We can mention at least one example of how the violation of ethical standards can be prevented. Many organizations promote ethical self-regulation by creating moral codes to help direct their business activities
*DDB is used for the first three years
For example
The inbound logistics for William Instrument refer to purchase components from various electronic firms. During the purchase process William need to consider the quality and price of the components. In this case
4. A U.S. Supreme Court case known as Furman v. Georgia (1972) is a landmark case that involved Eighth Amendment’s ban of unusual and cruel punishment in death penalty cases (Furman v. Georgia (1972)
With covid coming into place
In my opinion
with
Not necessarily all home buyers are the same! When you choose to work with we buy ugly houses Baltimore & nationwide USA
The ability to view ourselves from an unbiased perspective allows us to critically assess our personal strengths and weaknesses. This is an important step in the process of finding the right resources for our personal learning style. Ego and pride can be
· By Day 1 of this week
While you must form your answers to the questions below from our assigned reading material
CliftonLarsonAllen LLP (2013)
5 The family dynamic is awkward at first since the most outgoing and straight forward person in the family in Linda
Urien
The most important benefit of my statistical analysis would be the accuracy with which I interpret the data. The greatest obstacle
From a similar but larger point of view
4 In order to get the entire family to come back for another session I would suggest coming in on a day the restaurant is not open
When seeking to identify a patient’s health condition
After viewing the you tube videos on prayer
Your paper must be at least two pages in length (not counting the title and reference pages)
The word assimilate is negative to me. I believe everyone should learn about a country that they are going to live in. It doesnt mean that they have to believe that everything in America is better than where they came from. It means that they care enough
Data collection
Single Subject Chris is a social worker in a geriatric case management program located in a midsize Northeastern town. She has an MSW and is part of a team of case managers that likes to continuously improve on its practice. The team is currently using an
I would start off with Linda on repeating her options for the child and going over what she is feeling with each option. I would want to find out what she is afraid of. I would avoid asking her any “why” questions because I want her to be in the here an
Summarize the advantages and disadvantages of using an Internet site as means of collecting data for psychological research (Comp 2.1) 25.0\% Summarization of the advantages and disadvantages of using an Internet site as means of collecting data for psych
Identify the type of research used in a chosen study
Compose a 1
Optics
effect relationship becomes more difficult—as the researcher cannot enact total control of another person even in an experimental environment. Social workers serve clients in highly complex real-world environments. Clients often implement recommended inte
I think knowing more about you will allow you to be able to choose the right resources
Be 4 pages in length
soft MB-920 dumps review and documentation and high-quality listing pdf MB-920 braindumps also recommended and approved by Microsoft experts. The practical test
g
One thing you will need to do in college is learn how to find and use references. References support your ideas. College-level work must be supported by research. You are expected to do that for this paper. You will research
Elaborate on any potential confounds or ethical concerns while participating in the psychological study 20.0\% Elaboration on any potential confounds or ethical concerns while participating in the psychological study is missing. Elaboration on any potenti
3 The first thing I would do in the family’s first session is develop a genogram of the family to get an idea of all the individuals who play a major role in Linda’s life. After establishing where each member is in relation to the family
A Health in All Policies approach
Note: The requirements outlined below correspond to the grading criteria in the scoring guide. At a minimum
Chen
Read Connecting Communities and Complexity: A Case Study in Creating the Conditions for Transformational Change
Read Reflections on Cultural Humility
Read A Basic Guide to ABCD Community Organizing
Use the bolded black section and sub-section titles below to organize your paper. For each section
Losinski forwarded the article on a priority basis to Mary Scott
Losinksi wanted details on use of the ED at CGH. He asked the administrative resident