Full download Programming with Microsoft Visual Basic 2015 7th Edition Diane Zak pdf docx
Full download Programming with Microsoft Visual Basic 2015 7th Edition Diane Zak pdf docx
com
https://textbookfull.com/product/programming-with-microsoft-
visual-basic-2015-7th-edition-diane-zak/
OR CLICK BUTTON
DOWNLOAD NOW
https://textbookfull.com/product/programming-with-microsoft-visual-
basic-2017-diane-zak/
textboxfull.com
https://textbookfull.com/product/visual-basic-in-easy-steps-covers-
visual-basic-2015-4th-edition-mike-mcgrath/
textboxfull.com
https://textbookfull.com/product/practical-microsoft-visual-
studio-2015-1st-edition-peter-ritchie-auth/
textboxfull.com
https://textbookfull.com/product/sql-server-database-programming-with-
visual-basic-net-concepts-designs-and-implementations-ying-bai/
textboxfull.com
Starting Out With Visual Basic (8th Edition) Tony Gaddis
https://textbookfull.com/product/starting-out-with-visual-basic-8th-
edition-tony-gaddis/
textboxfull.com
https://textbookfull.com/product/microsoft-visual-basic-2017-for-
windows-web-and-database-applications-comprehensive-1st-edition-
corinne-hoisington/
textboxfull.com
https://textbookfull.com/product/visual-basic-for-kids-a-step-by-step-
computer-programming-tutorial-philip-conrod/
textboxfull.com
https://textbookfull.com/product/essentials-of-modern-business-
statistics-with-microsoft-excel-7th-edition-david-anderson/
textboxfull.com
https://textbookfull.com/product/beginning-c-7-programming-with-
visual-studio-2017-1st-edition-benjamin-perkins/
textboxfull.com
PROGRAMMING WITH
MICROSOFT® VISUAL BASIC® 2015
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Seventh Edition
PROGRAMMING
WITH MICROSOFT®
VISUAL BASIC® 2015
DIANE ZAK
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
This is an electronic version of the print textbook. Due to electronic rights restrictions,
some third party content may be suppressed. Editorial review has deemed that any suppressed
content does not materially affect the overall learning experience. The publisher reserves the right
to remove content from this title at any time if subsequent rights restrictions require it. For
valuable information on pricing, previous editions, changes to current editions, and alternate
formats, please visit www.cengage.com/highered to search by ISBN#, author, title, or keyword for
materials in your areas of interest.
Important Notice: Media content referenced within the product description or the product
text may not be available in the eBook version.
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Programming with Microsoft® Visual Basic® © 2016 Cengage Learning
2015, Seventh Edition
WCN: 02-200-203
Diane Zak
Product Director: Kathleen McMahon ALL RIGHTS RESERVED. No part of this work covered by the copyright
herein may be reproduced, transmitted, stored or used in any form or by
Product Team Manager: Kristin McNary any means graphic, electronic, or mechanical, including but not limited to
Senior Product Manager: Jim Gish photocopying, recording, scanning, digitizing, taping, Web distribution,
Senior Content Developer: Alyssa Pratt information networks, or information storage and retrieval systems, except
as permitted under Section 107 or 108 of the 1976 United States Copyright
Product Assistant: Abigail Pufpaff
Act, without the prior written permission of the publisher.
Marketing Manager: Eric LaScola
Senior Production Director:
For product information and technology assistance, contact us at
Wendy Troeger Cengage Learning Customer & Sales Support, 1-800-354-9706
Production Director: Patty Stephan For permission to use material from this text or product, submit all
Senior Content Project Manager: requests online at www.cengage.com/permissions
Jennifer K. Feltri-George Further permissions questions can be emailed to
[email protected]
Managing Art Director: Jack Pendleton
Cover image(s):
Library of Congress Control Number: 2015940168
© Rudchenko Liliia/Shutterstock.com
ISBN: 978-1-285-86026-8
Unless otherwise noted all screenshots are
Cengage Learning
courtesy of Microsoft Corporation
20 Channel Center Street
Open Clip art source: OpenClipArt Boston, MA 02210
USA
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
v
Brief Contents
Pref ace . . . . . . . . . . . . . . . . . . . . . . . . . xv i i
Read T h is B ef o re You Begi n . . . . . . . . . . . . . . . . xxi i
O verview An In t ro du ct io n to Programmi ng . . . . . . . . . . . . . . . 1
Chapter 1 An In t ro du ct io n to V i sual Basi c 2 0 1 5 . . . . . . . . . . . . . 9
Chapter 2 Des ig n in g Applicati ons . . . . . . . . . . . . . . . . . . 59
Chapter 3 U s in g Var iables and Constants . . . . . . . . . . . . . . . 111
Chapter 4 T h e Select io n Structure . . . . . . . . . . . . . . . . . . 179
Chapter 5 M o re o n t h e Selecti on Structure . . . . . . . . . . . . . . 247
Chapter 6 T h e Repet it io n Structure . . . . . . . . . . . . . . . . . 315
Chapter 7 Su b an d F u n ct ion Procedures . . . . . . . . . . . . . . . 389
Chapter 8 St r in g M an ipu lati on . . . . . . . . . . . . . . . . . . . . 449
Chapter 9 Ar r ays . . . . . . . . . . . . . . . . . . . . . . . . . 499
Chapter 10 St r u ct u res an d Sequenti al Access Fi l es . . . . . . . . . . . 559
Chapter 11 Clas s es an d Obj ects . . . . . . . . . . . . . . . . . . . 609
Chapter 12 Web Applicat io ns . . . . . . . . . . . . . . . . . . . . . 671
Chapter 13 Wo r k in g w it h Access Databases and LI NQ . . . . . . . . . . 723
Chapter 14 Acces s Dat abases and SQL . . . . . . . . . . . . . . . . 777
A ppendix A F in din g an d F ixing Program Errors . . . . . . . . . . . . . 821
A ppendix B GU I Des ig n Gu idel i nes . . . . . . . . . . . . . . . . . . 839
A ppendix C V is u al B as ic Co nv ersi on Functi ons . . . . . . . . . . . . . 845
A ppendix D V is u al B as ic 201 5 Cheat Sheet . . . . . . . . . . . . . . 847
A ppendix E Cas e Pro ject s . . . . . . . . . . . . . . . . . . . . . . 865
A ppendix F M u lt iple F o r m s and Di al og Box es . . . . . . . . . . . . O nl i ne
Index . . . . . . . . . . . . . . . . . . . . . . . . . . 869
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
vi
Contents
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
vii
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
viii
Contents
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
ix
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
x
Contents
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xi
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xii
Contents
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xiii
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xiv
Contents
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xv
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xvi
Contents
I n dex . . . . . . . . . . . . . . . . . . . . . . . . . . 869
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xvii
Preface
Programming with Microsoft Visual Basic 2015, Seventh Edition uses Visual Basic 2015, an
object-oriented language, to teach programming concepts. This book is designed for a beginning
programming course. However, it assumes students are familiar with basic Windows skills and
file management.
Approach
Programming with Microsoft Visual Basic 2015, Seventh Edition teaches programming concepts
using a task-driven rather than a command-driven approach. By working through the chapters,
which are each motivated by a realistic case, students learn how to develop applications they
are likely to encounter in the workplace. This is much more effective than memorizing a list of
commands out of context. The book motivates students by demonstrating why they need to
learn the concepts and skills covered in each chapter.
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xviii
P r e fa c e Organization and Coverage
Features
Programming with Microsoft Visual Basic 2015, Seventh Edition is an exceptional textbook
because it also includes the following features:
READ THIS BEFORE YOU BEGIN This section is consistent with Cengage Learning’s
unequaled commitment to helping instructors introduce technology into the classroom.
Technical considerations and assumptions about hardware, software, and default settings are
listed in one place to help instructors save time and eliminate unnecessary aggravation.
YOU DO IT! BOXES These boxes provide simple applications that allow students to
demonstrate their understanding of a concept before moving on to the next concept. The YOU
DO IT! boxes are located almost exclusively in Lesson A of each chapter.
VISUAL STUDIO 2015 METHODS The book focuses on Visual Studio 2015 methods rather
than on Visual Basic functions. Exceptions to this are the Val and Format functions, which are
introduced in Chapter 2. These functions are covered in the book simply because it is likely that
students will encounter them in existing Visual Basic programs. However, in Chapter 3, the
student is taught to use the TryParse method and the Convert class methods rather than the
Val function. Also in Chapter 3, the Format function is replaced with the ToString method.
OPTION STATEMENTS All programs include the Option Explicit, Option Strict, and Option
Infer statements.
START HERE ARROWS These arrows indicate the beginning of a tutorial steps section in
the book.
DATABASES, LINQ, AND SQL The book includes two chapters (Chapters 13 and 14) on
databases. LINQ is covered in Chapter 13. SQL is covered in Chapter 14.
FIGURES Figures that introduce new statements, functions, or methods contain both the
syntax and examples of using the syntax. Including the syntax in the figures makes the examples
more meaningful, and vice versa.
CHAPTER CASES Each chapter begins with a programming-related problem that students
could reasonably expect to encounter in business, followed by a demonstration of an application
that could be used to solve the problem. Showing the students the completed application before
they learn how to create it is motivational and instructionally sound. By allowing the students to
see the type of application they will be able to create after completing the chapter, the students
will be more motivated to learn because they can see how the programming concepts they are
about to learn can be used and, therefore, why the concepts are important.
LESSONS Each chapter is divided into three lessons—A, B, and C. Lesson A introduces
the programming concepts that will be used in the completed application. The concepts are
illustrated with code examples and sample applications. The user interface for each sample
application is provided to the student. Also provided are tutorial-style steps that guide the
student on coding, running, and testing the application. Each sample application allows the
student to observe how the current concept can be used before the next concept is introduced.
In Lessons B and/or C, the student creates the application required to solve the problem
specified in the Chapter Case.
APPENDICES Appendix A, which can be covered after Chapter 3, teaches students how to locate
and correct errors (syntax, logic, and run time) in their code. The appendix shows
students how to step through their code and also how to create breakpoints. Appendix B
summarizes the GUI design guidelines taught in the chapters, making it easier for the student to
follow the guidelines when designing an application’s interface. Appendix C lists the Visual Basic
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xix
Organization and Coverage
conversion functions. Appendix D contains a Cheat Sheet that summarizes important concepts
covered in the chapters, such as the syntax of statements, methods, and so on. The Cheat Sheet
provides a convenient place for students to locate the information they need as they are creating and
coding their applications. Appendix E contains Case Projects that can be assigned after completing
specific chapters in the book. Appendix F, which is available online at CengageBrain.com, covers
multiple-form applications and the FontDialog, ColorDialog, and TabControl tools.
GUI DESIGN TIP BOXES The GUI DESIGN TIP boxes contain guidelines and
recommendations for designing applications that follow Windows standards. Appendix B
provides a summary of the GUI design guidelines covered in the chapters.
TIP These notes provide additional information about the current concept. Examples
include alternative ways of writing statements or performing tasks, as well as warnings
about common mistakes made when using a particular command and reminders of related
concepts learned in previous chapters.
SUMMARY Each lesson contains a Summary section that recaps the concepts covered in
the lesson.
KEY TERMS Following the Summary section in each lesson is a listing of the key terms
introduced throughout the lesson, along with their definitions.
REVIEW QUESTIONS Each lesson contains Review Questions designed to test a student’s
understanding of the lesson’s concepts.
EXERCISES The Review Questions in each lesson are followed by Exercises, which provide
students with additional practice of the skills and concepts they learned in the lesson. The
Exercises are designated as INTRODUCTORY, INTERMEDIATE, ADVANCED, DISCOVERY,
and SWAT THE BUGS. The DISCOVERY Exercises encourage students to challenge and
independently develop their own programming skills while exploring the capabilities of Visual
Basic 2015. The SWAT THE BUGS Exercises provide an opportunity for students to detect and
correct errors in an application’s code.
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xx
P r e fa c e MindTap
Instructor Resources
The following teaching tools are available for download at our Instructor Companion Site.
Simply search for this text at sso.cengage.com. An instructor login is required.
INSTRUCTOR’S MANUAL The Instructor’s Manual that accompanies this textbook includes
additional instructional material to assist in class preparation, including items such as Sample
Syllabi, Chapter Outlines, Technical Notes, Lecture Notes, Quick Quizzes, Teaching Tips,
Discussion Topics, and Additional Case Projects.
TEST BANK Cengage Learning Testing Powered by Cognero is a flexible, online system that
allows you to:
•• author, edit, and manage test bank content from multiple Cengage Learning solutions
•• create multiple test versions in an instant
•• deliver tests from your LMS, your classroom or wherever you want
POWERPOINT PRESENTATIONS This book offers Microsoft PowerPoint slides for each
chapter. These are included as a teaching aid for classroom presentation, to make available
to students on the network for chapter review, or to be printed for classroom distribution.
Instructors can add their own slides for additional topics they introduce to the class.
SOLUTION FILES Solutions to the Lesson applications and the end-of-lesson Review
Questions and Exercises are provided.
DATA FILES Data Files are necessary for completing the computer activities in this book.
Data Files can also be downloaded by students at CengageBrain.com.
MindTap
MindTap is a personalized teaching experience with relevant assignments that guide students to
analyze, apply, and improve thinking, allowing you to measure skills and outcomes with ease.
•• Personalized Teaching: Becomes yours with a Learning Path that is built with key student
objectives. Control what students see and when they see it. Use it as-is or match to your
syllabus exactly–hide, rearrange, add and create your own content.
•• Guide Students: A unique learning path of relevant readings, multimedia and activities
that move students up the learning taxonomy from basic knowledge and comprehension to
analysis and application.
•• Promote Better Outcomes: Empower instructors and motivate students with analytics
and reports that provide a snapshot of class progress, time in course, engagement and
completion rates.
The MindTap for Programming with Microsoft Visual Basic 2015 includes videos, study tools,
and interactive quizzing, all integrated into a full eReader that contains the full content from
the printed text.
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xxi
Acknowledgments
Acknowledgments
Writing a book is a team effort rather than an individual one. I would like to take this
opportunity to thank my team, especially Alyssa Pratt (Senior Content Developer), Heidi Aguiar
(Full Service Project Manager), Serge Palladino and John Freitas (Quality Assurance), Jennifer
Feltri-George (Senior Content Project Manager), and the compositors at GEX Publishing
Services. Thank you for your support, enthusiasm, patience, and hard work. Last, but certainly
not least, I want to thank the following reviewers for their invaluable ideas and comments: Cliff
Brozo, Monroe College; Anthony Cameron, Fayetteville Technical Community College, and
Tatyana Feofilaktova, ASA College. And a special thank you to Sally Douglas (College of Central
Florida) for suggesting the YOU DO IT! boxes several editions ago.
Diane Zak
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xxii
Technical Information
Data Files
You will need data files to complete the computer activities in this book. Your instructor may
provide the data files to you. You may obtain the files electronically at CengageBrain.com and
then navigating to the page for this book.
Each chapter in this book has its own set of data files, which are stored in a separate folder
within the VB2015 folder. The files for Chapter 1 are stored in the VB2015\Chap01 folder.
Similarly, the files for Chapter 2 are stored in the VB2015\Chap02 folder. Throughout this book,
you will be instructed to open files from or save files to these folders.
You can use a computer in your school lab or your own computer to complete the steps and
Exercises in this book.
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xxiii
Technical Information
To start and configure Visual Studio to match the figures and tutorial
steps in this book:
1. Use the steps on Page 11 to start Visual Studio.
2. Use the steps on Pages 12 and 13 to configure Visual Studio.
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xxiv
Read This Technical Information
7. Click the OK button to close the Choose Toolbox Items dialog box. If the message “The
following controls were successfully added to the toolbox but are not enabled in the
active designer:” appears, click the OK button. The PrintForm control (as well as any
other PowerPacks controls you selected) will not appear in the Toolbox window until
you either create a new Visual Basic application or open an existing one. You will learn
how to perform both of those tasks in Chapter 1.
Figures
The figures in this book reflect how your screen will look if you are using Microsoft Visual
Studio Ultimate 2015 and a Microsoft Windows 8 system. Your screen may appear slightly
different in some instances if you are using another version of either Microsoft Visual Studio or
Microsoft Windows.
To the Instructor
To complete the computer activities in this book, your students must use a set of data files.
These files can be obtained on the Instructor Companion Site or at CengageBrain.com.
The material in this book was written using Microsoft Visual Studio Ultimate 2015 on a
Microsoft Windows 8 system. It was Quality Assurance tested using Microsoft Visual Studio
Ultimate 2015 on a Microsoft Windows 10 system.
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
OVERVIEW
An Introduction to
Programming
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
2
OVERVIEW An Introduction to Programming
Programming a Computer
In essence, the word programming means giving a mechanism the directions to accomplish a
task. If you are like most people, you have already programmed several mechanisms, such as
your digital video recorder (DVR), cell phone, or coffee maker. Like these devices, a computer
also is a mechanism that can be programmed.
The directions (typically called instructions) given to a computer are called computer programs
or, more simply, programs. The people who write programs are called programmers.
Programmers use a variety of special languages, called programming languages, to
communicate with the computer. Some popular programming languages are Visual Basic, C#,
C++, and Java. In this book, you will use the Visual Basic programming language.
Employment Opportunities
When searching for a job in computer programming, you will encounter ads for “computer
programmers” as well as for “computer software engineers.” Although job titles and
descriptions vary, computer software engineers typically are responsible for designing an
Overview-Programmer appropriate solution to a user’s problem, while computer programmers are responsible
Qualities for translating the solution into a language that the computer can understand—a process
called coding. Software engineering is a higher-level position that requires the ability to
envision solutions. Using a construction analogy, software engineers are the architects, while
programmers are the carpenters.
Keep in mind that depending on the employer as well as the size and complexity of the user’s
problem, the design and coding tasks may be performed by the same employee, no matter what
his or her job title is. In other words, it is not unusual for a software engineer to code his or her
solution or for a programmer to have designed the solution he or she is coding.
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
3
Visual Basic 2015
Programmers and software engineers need to have strong problem-solving and analytical skills,
as well as the ability to communicate effectively with team members, end users, and other
nontechnical personnel. Typically, computer software engineers are expected to have at least
a bachelor’s degree in software engineering, computer science, or mathematics, along with
practical work experience, especially in the industry in which they are employed. Computer
programmers usually need at least an associate’s degree in computer science, mathematics, or
information systems, as well as proficiency in one or more programming languages.
Computer programmers and software engineers are employed by companies in almost every
industry, such as telecommunications companies, software publishers, financial institutions,
insurance carriers, educational institutions, and government agencies. The U.S. Bureau of
Labor Statistics predicts that employment of computer software engineers will increase by
22% from 2012 to 2022. The employment of computer programmers, on the other hand,
will increase by 8% over the same period. In addition, consulting opportunities for freelance
programmers and software engineers are expected to increase as companies look for ways to
reduce their payroll expenses.
There is a great deal of competition for programming and software engineering jobs, so
jobseekers need to keep up to date with the latest programming languages and technologies.
A competitive edge may be gained by obtaining vendor-specific or language-specific
certifications, as well as knowledge of a prospective employer’s business. More information
about computer programmers and computer software engineers can be found on the U.S.
Bureau of Labor Statistics Web site at www.bls.gov.
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Exploring the Variety of Random
Documents with Different Content
“Oh, I’m on the cross.” He knew that she was “pattering the flash”
for being in thievery; but he answered solemnly:
“Your mother is on the Cross, too, Molly.”
“Poor old thing! I’m sorry for her, but it don’t do her no good for me
to hang there with her.”
He entreated her to go home, and promised that the judge would
free her at his request, but Molly was honest enough to say:
“It wouldn’t work, Mister RoBards. I ain’t built for that life. I’ve
outgrowed it.”
He spoke to the judge, who sent her to the Magdalen Home
instead of to Sing Sing.
But the odor of sanctity was as stifling to Molly’s quivering nostrils
as the smell of new-mown hay, and she broke loose from pious
restraint and returned to her chosen career. She joined destinies with
a young crossman. As she would have put it in her new language,
she became the file of a gonof who was caught by a nab while
frisking a fat of his fawney, his dummy, and his gold thimble. Molly
went on a bender when her chuck was jugged, and a star took her
back to the Magdalen Home.
And of this it seemed to RoBards better to leave Mrs. Lasher in
ignorance than to certify the ghastly truth. He had trouble enough in
store for him within his own precincts.
War, for one thing, shook the nation. President Polk called for men
and money to confirm the annexation of the Texas Republic and to
suppress the Mexican Republic.
With a wife and children to support and the heritage of bills from
his father-in-law to pay, RoBards felt that patriotism was a luxury
beyond his means. But Harry Chalender went out with the first
troops, and by various illegitimate devices managed to worm himself
into the very forefront of danger.
Other sons of important families bribed their way to the zone of
death and won glory or death or both at Cerro Gordo, Chapultepec
and Churubusco. New York had a good laugh over the capture of
General Santa Ana’s wooden leg and the return of the troops was a
glorious holiday.
Harry Chalender had been the second man to enter the gates of
Mexico City and he marched home with “Captain” in front of his
name and his arm in a graceful sling.
When he met Patty he said: “Thank the Lord the Greasers left me
one wing to throw round you.”
He hugged her hard and kissed her, and then wrung the hand of
RoBards, who could hardly attack a wounded hero, or deny him
some luxury after a hard campaign. RoBards saw with dread that his
wife had grown fifteen years younger under the magic of her old
lover’s salute; her cheek was stained with a blush of girlish
confusion.
That night as she dressed for a ball in honor of the soldiers, Patty
begged her husband once more to lend a hand at pulling her corset
laces. When he refused sulkily, she laughed and kissed him with that
long-lost pride in his long-dormant jealousy. But her amusement cost
him dear, and his youth was not restored by hers.
For months his heart seemed to be skewered and toasted like the
meat on the turning spit in the restaurant windows.
And then the word California assumed a vast importance, like a
trumpet call on a stilly afternoon. It advertised a neglected strip of
territory of which Uncle Sam had just relieved the prostrate Mexico.
People said that it was built upon a solid ledge of gold. Much as
RoBards would have liked to be rich, he could not shake off his
chains.
But Harry Chalender joined the Argonauts. His finances were in
need of some heaven-sent bonanza, and he had no scruples against
leaving his creditors in the lurch.
When he called to pay his farewells RoBards chanced to be at
home. He waited with smoldering wrath to resent any effort to salute
Patty’s cheek. The returned soldier had perhaps some license, but
the outbound gold-seeker could be knocked down or kicked on his
way if he presumed.
The always unexpectable Chalender stupefied him by fastening
his eyes not on Patty, but on Immy, and by daring to say:
“You’re just the age, Immy, just the image of your mother when I
first asked her to marry me. The first nugget of gold I find in
California I’ll bring back for our wedding ring.”
This frivolity wrought devastation in RoBards’ soul. It wakened him
for the first time to the fact that his little daughter had stealthily
become a woman. He blenched to see on her cheek the blush that
had returned of late to Patty’s, to see in her eyes a light of enamored
maturity. She was formed for love and ready for it, nubile, capable of
maternity, tempting, tempted.
The shock of discovery filled RoBards with disgust of himself. He
felt faint, and averting his gaze from his daughter, turned to her
mother to see how the blow struck her. Patty had not been so
unaware of Immy’s advance. But her shock was one of jealousy and
of terror at the realization that she was on the way to
grandmotherhood.
RoBards was so hurt for her in her dismay that he could have
sprung at Chalender and beaten him to the floor, crying, “How dare
you cease to flirt with my beautiful wife?”
But this was quite too impossible an impulse to retain for a
moment in his revolted soul. He stood inept and smirked with Patty
and murmured, “Good-by! Good luck!”
They were both pale and distraught when Chalender had gone.
But Immy was rosy and intent.
CHAPTER XXXI
THE next morning RoBards heard her voice again. It was loud and
rough, drowning the angry voice of her brother, Keith. She was
saying:
“I was a fool to tell him! And I was a fool to tell you I told him!”
“I’ll beat him to death when I find him, that’s all I’ll do!” Keith
roared, with his new bass voice.
“If you ever touch him or mention my name to him—or his name to
me,” Immy stormed, “I’ll—I’ll kill—I’ll kill myself. Do you understand?”
“Aw, Immy, Immy!” Keith pleaded with wonderful pity in his voice.
Then she wept, long, piteously, in stabbing sobs that tore the heart of
her father.
He knew that she was in her brother’s arms, for he could hear his
voice deep with sympathy. But RoBards dared not make a third
there. It was no place for a father.
He went to his library and stood staring at the marble hearthstone.
Somewhere down there was what was left of Jud Lasher. He had not
been destroyed utterly, for he was still abroad like a fiend, wreaking
cruel harm.
Immy spoke and RoBards was startled, for he had not heard her
come in:
“Papa.”
“Yes, my darling!”
“Do you think Jud Lasher will ever come back?”
“I know he won’t.”
“How do you know?”
“Oh, I just feel sure. He’d never dare come back.”
“If he did would I belong to him?”
“Would a lamb belong to a sheep-killing dog that mangled it?”
“That’s so. Thank you, Papa.” And she was gone.
A boy on a horse brought her a note that afternoon. She told no
one its contents and when Patty asked who sent it, Immy did not
answer. RoBards was sure it came from Ernest Chirnside, for the
youth never appeared. But RoBards felt no right to ask.
Somehow he felt that there was no place for him as a father in
Immy’s after-conduct. She returned to her wildness, like a deer that
has broken back to the woods and will not be coaxed in again.
How could he blame her? What solemn monition could he parrot
to a soul that had had such an experience with honesty, such a
contact with virtue?
Young Chirnside never came to the house. But he was the only
youth in the countryside, it seemed, that kept away. Patty tried to
curb Immy’s frantic hilarities, but she had such insolence for her
pains that she was stricken helpless.
Then Immy decided that the country was dull. The young men
went back to town, or to their various colleges. Keith went to
Columbia College, which was still in Park Place, though plans were
afoot for moving it out into the more salubrious rural district of Fiftieth
Street and Madison Avenue.
Keith met Chirnside on the campus, but he could not force a
quarrel without dragging Immy’s name into it. So he let slip the
opportunity for punishment, as his father had let slip the occasion for
punishing Chalender. Father and son were curiously alike in their
passion for secrets.
Keith had little interest in the classic studies that made up most of
the curriculum. He could not endure Latin and the only thing he
found tolerable in Cæsar was the description of the bridge that
baffled the other students with its difficulties.
He was an engineer by nature. He had never recovered from his
ambition to be an hydraulic savior of the city. And it looked as if the
town would soon need another redemption.
The citizens had treated the Croton as a toy at first. The hydrants
were free and the waste was ruinous. This blessing, like the
heavenly manna, became contemptible with familiarity. Children
made a pastime of sprinkling the yards and the streets. The habit of
bathing grew until many were soaking their hides every day. During
the winter the householders let the water run all day and all night
through the open faucets, to prevent the pipes from freezing. There
were twelve thousand people, too, who had water in their houses!
Already in 1846 the Commissioners had begun to talk of a costly
new reservoir as a necessity. For thirteen days that year the supply
had to be shut off while the aqueduct was inspected and leaks
repaired. What if another great fire had started?
In 1849 the Water Commissioners were dismissed and the Croton
Aqueduct Department entrusted with the priesthood of the river god
and his elongated temple.
So Keith looked forward to the time when he should be needed by
New York and by other cities. And he studied hard. But he played
hard, too. The students were a lawless set, and drunkenness and
religious infidelity were rival methods for distressing their teachers.
Up at New Haven the Yale boys in a certain class, feeling
themselves wronged by a certain professor, had disguised
themselves as Indians and with long knives whittled all the study
benches into shavings while the terrified instructor cowered on his
throne and watched.
Vice of every sort seemed to be the chief study of such of the
students as were not aiming at the ministry. As one of the college
graduates wrote:
“Hot suppers, midnight carousals were too frequent with us and
sowed the seed of a vice that in a few years carried off a fearful
proportion of our members to an untimely grave.”
There was grave anxiety for the morals of the whole nation. The
city was growing too fast. By 1850 it had passed the half-million
mark! The churches were not numerous enough to hold a quarter of
the population, yet most of them were sparsely attended.
The American home was collapsing. Dr. Chirnside preached on
the exalted cost of living, and stated that church weddings were on
the decrease. The hotel was ruining the family. Rents were so
exorbitant, servants so scarce and incompetent, that people were
giving up the domesticity of the good old days.
Business detained the husband downtown, and he took his
midday dinner at Sweeny’s or Delmonico’s, where he could have
poultry or sirloin steak for a shilling and sixpence. And his wife and
daughters, unwilling to eat alone, went to Weller’s or Taylor’s and
had a fricandeau, an ice, or a meringue. Ladies’ saloons were
numerous and magnificent and wives could buy ready-made meals
there; so they forgot how to cook. The care of children no longer
concerned them. Women were losing all the retiring charm that had
hitherto given them their divine power over men.
The clergy bewailed the approaching collapse of a nation that had
forgotten God—or had never remembered him. There was a
movement afoot to amend the Constitution with an acknowledgment
of the Deity and “take the stain of atheism from that all-important
document.”
These were the Sunday thoughts.
In contrast were the Fourth of July thoughts, when the country
sang its own hallelujahs and, like another deity, contentedly
meditated its own perfections. On these occasions every American
man was better than any foreigner, and American women were all
saints.
And there were the Election Day moods, when the country split up
into parties for a few weeks, and played tennis with mutual charges
of corruption, thievery, treason. Then there was Christmas, when
everybody loved everybody; and New Year’s Day, when everybody
called on everybody and got a little drunk on good wishes and the
toasts that went with them.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
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.
textbookfull.com