100% found this document useful (1 vote)
47 views

2392Where can buy Programming with Microsoft Visual Basic 2017 Diane Zak ebook with cheap price

Basic

Uploaded by

lekwaariam53
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
47 views

2392Where can buy Programming with Microsoft Visual Basic 2017 Diane Zak ebook with cheap price

Basic

Uploaded by

lekwaariam53
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Download the Full Version of textbook for Fast Typing at textbookfull.

com

Programming with Microsoft Visual Basic 2017 Diane


Zak

https://textbookfull.com/product/programming-with-microsoft-
visual-basic-2017-diane-zak/

OR CLICK BUTTON

DOWNLOAD NOW

Download More textbook Instantly Today - Get Yours Now at textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Programming with Microsoft Visual Basic 2015 7th Edition


Diane Zak

https://textbookfull.com/product/programming-with-microsoft-visual-
basic-2015-7th-edition-diane-zak/

textboxfull.com

Microsoft Visual Basic 2017 for Windows, Web, and Database


Applications: Comprehensive 1st Edition Corinne Hoisington

https://textbookfull.com/product/microsoft-visual-basic-2017-for-
windows-web-and-database-applications-comprehensive-1st-edition-
corinne-hoisington/
textboxfull.com

Beginning C 7 Programming with Visual Studio 2017 1st


Edition Benjamin Perkins

https://textbookfull.com/product/beginning-c-7-programming-with-
visual-studio-2017-1st-edition-benjamin-perkins/

textboxfull.com

SQL Server Database Programming With Visual Basic NET


Concepts Designs and Implementations Ying Bai

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

Visual Basic For Kids A Step by Step Computer Programming


Tutorial Philip Conrod

https://textbookfull.com/product/visual-basic-for-kids-a-step-by-step-
computer-programming-tutorial-philip-conrod/

textboxfull.com

Visual Basic in easy steps Covers Visual Basic 2015 4th


Edition Mike Mcgrath

https://textbookfull.com/product/visual-basic-in-easy-steps-covers-
visual-basic-2015-4th-edition-mike-mcgrath/

textboxfull.com

Programming for beginners The fundamentals Basic


introduction to programming concepts with fractals Bjørn I
F Westerheim
https://textbookfull.com/product/programming-for-beginners-the-
fundamentals-basic-introduction-to-programming-concepts-with-fractals-
bjorn-i-f-westerheim/
textboxfull.com

Programming Microsoft ASP NET MVC Dino Esposito

https://textbookfull.com/product/programming-microsoft-asp-net-mvc-
dino-esposito/

textboxfull.com
8th

DIANE ZAK
EDITION

progr a mming w i t h

MICROSOFT ® VISUAL BASIC ® 2017


MICROSOFT
®

progr a mming w i t h
VISUAL BASIC
®

20 17

To register or access your online learning solution or purchase materials


for your course, visit www.cengagebrain.com. 8th
EDITION

DIANE ZAK
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
PROGRAMMING WITH
MICROSOFT® VISUAL BASIC® 2017

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
EIGHTH EDITION

PROGRAMMING
WITH MICROSOFT®
VISUAL BASIC® 2017

DIANE ZAK

Australia • Brazil • Mexico • Singapore • United Kingdom • United States

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Programming with Microsoft® Visual Basic® © 2018 Cengage Learning
2017, Eighth Edition
Diane Zak 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 any means
graphic, electronic, or mechanical, including but not limited to photocopying,
SVP, GM Science, Technology & Math: Balraj S. recording, scanning, digitizing, taping, Web distribution, information
Kalsi networks, or information storage and retrieval systems, except as permitted
under Section 107 or 108 of the 1976 United States Copyright Act, without the
Product Director: Kathleen McMahon
prior written permission of the publisher.
Product Team Manager: Kristin McNary

Associate Content Developer: Brianna Vorce


For product information and technology assistance, contact us at
Associate Product Manager: Kate Mason Cengage Learning Customer & Sales Support, 1-800-354-9706

Senior Director, Development: Julia Caballero For permission to use material from this text or product, submit all
requests online at www.cengage.com/permissions.
Product Assistant: Jake Toth
Further permissions questions can be e-mailed to
Marketing Director: Michele McTighe [email protected]

Marketing Manager: Stephanie Albracht

Senior Production Director: Wendy Troeger Library of Congress Control Number: 2017940681

Production Director: Patty Stephan Softcover ISBN-13: 978-1-337-10212-4


LLF ISBN: 978-1-337-68573-3
Senior Content Project Manager: Jennifer K.
Feltri-George Cengage
20 Channel Center Street
Art Director: Diana Graham
Boston, MA 02210
Cover image(s): saemilee/DigitalVision Vectors/ USA
Getty Images
Cengage Learning is a leading provider of customized learning solutions
Cover Designer: Lisa Buckley
with employees residing in nearly 40 different countries and sales in more
Unless otherwise noted all screenshots are than 125 countries around the world. Find your local representative at
courtesy of Microsoft Corporation www.cengage.com.

Open Clip art source: OpenClipArt Cengage Learning products are represented in Canada by Nelson Education, Ltd.

Unless otherwise noted, all content is © Cengage.


To learn more about Cengage Learning, visit www.cengage.com

Purchase any of our products at your local college store or at our preferred
online store www.cengagebrain.com

Notice to the Reader


Publisher does not warrant or guarantee any of the products described herein
or perform any independent analysis in connection with any of the product
information contained herein. Publisher does not assume, and expressly disclaims,
any obligation to obtain and include information other than that provided to it by
the manufacturer. The reader is expressly warned to consider and adopt all safety
precautions that might be indicated by the activities described herein and to avoid
all potential hazards. By following the instructions contained herein, the reader
willingly assumes all risks in connection with such instructions. The publisher
makes no representations or warranties of any kind, including but not limited to,
the warranties of fitness for particular purpose or merchantability, nor are any
such representations implied with respect to the material set forth herein, and the
publisher takes no responsibility with respect to such material. The publisher shall
Printed in the United States of America not be liable for any special, consequential, or exemplary damages resulting, in
Print Number: 01 Print Year: 2017 whole or part, from the readers’ use of, or reliance upon, this material.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
v

Brief Contents

Pref ace . . . . . . . . . . . . . . . . . . . . . . . . . xi v
Read T h is Bef o re You Begi n . . . . . . . . . . . . . . . . xvi i i
CHAP TER 1 An In t ro du ct i o n to V i sual Studi o 2 0 1 7 and V i sual Ba s i c . . . . . 1
CHAP TER 2 Plan n in g Appl i cati ons and Desi gni ng I nter faces . . . . . . . . 49
CHAP TER 3 Co din g w it h Vari abl es, Named Constants, and Cal cul a ti ons . . . 73
CHAP TER 4 T h e Select i o n Structure . . . . . . . . . . . . . . . . . . 119
CHAP TER 5 T h e Repeti t i o n Structure . . . . . . . . . . . . . . . . . 181
CHAP TER 6 Su b an d Funct i on Procedures . . . . . . . . . . . . . . . 237
CHAP TER 7 St r in g M ani pul ati on . . . . . . . . . . . . . . . . . . . . 287
CHAP TER 8 Ar r ays . . . . . . . . . . . . . . . . . . . . . . . . . 341
CHAP TER 9 Sequ en t ial A ccess Fi l es and Menus . . . . . . . . . . . . . 392
CHAP TER 10 Clas s es an d Obj ects . . . . . . . . . . . . . . . . . . . 427
CHAP TER 11 SQL Ser ve r Dat abases . . . . . . . . . . . . . . . . . . 475
CHAP TER 12 Dat abas e Queri es wi th SQL . . . . . . . . . . . . . . . . 529
CHAP TER 13 Web Sit e Appl i cati ons . . . . . . . . . . . . . . . . . . . 565
APPEN DIX A GU I Des ig n Gui del i nes . . . . . . . . . . . . . . . . . . 599
APPEN DIX B Addit io n al To pi cs . . . . . . . . . . . . . . . . . . . . . 604
APPEN DIX C F in din g and Fi x i ng Program Errors . . . . . . . . . . . . . 632
APPEN DIX D V is u al B asi c 2 0 1 7 Cheat Sheet . . . . . . . . . . . . . . 647
APPEN DIX E Cas e Pro je ct s . . . . . . . . . . . . . . . . . . . . . . 667
Index . . . . . . . . . . . . . . . . . . . . . . . . . . 671

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
vi

Contents

Pref ace . . . . . . . . . . . . . . . . . . . . . . . . . xi v
Read T h is B ef o re Yo u Begi n . . . . . . . . . . . . . . . . xv i i i

CHAPTER 1 An In t ro du ct io n t o V i sual Studi o 2 0 1 7 and V i sual Basi c . . . . . 1


F OCUS ON THE CO NC EPTS LESSON . . . . . . . . . . . . . . . . . . 2
F-1 Computer Programming Terminology . . . . . . . . . . . . . . . . . . . . . . 2
F-2 The Programmer’s Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
F-3 The Visual Basic Programming Language . . . . . . . . . . . . . . . . . . . . 3
F-4 The Visual Studio IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
F-5 Assigning Names to Objects . . . . . . . . . . . . . . . . . . . . . . . . . . 7

APPLY THE CONCEPTS LESSON . . . . . . . . . . . . . . . . . . . . 9


A-1 Start and Configure Visual Studio Community 2017 . . . . . . . . . . . . . . . 9
A-2 Create a Windows Forms Application . . . . . . . . . . . . . . . . . . . . . 11
A-3 Manage the Windows in the IDE . . . . . . . . . . . . . . . . . . . . . . . 13
A-4 Change a Form File’s Name . . . . . . . . . . . . . . . . . . . . . . . . . 14
A-5 Change the Properties of a Form . . . . . . . . . . . . . . . . . . . . . . . 15
The Name Property������������������������������������������������������������������������������������������ 17
The Font Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
The MaximizeBox, StartPosition, and Text Properties . . . . . . . . . . . . . . . 17
A-6 Save a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
A-7 Close and Open a Solution . . . . . . . . . . . . . . . . . . . . . . . . . . 18
A-8 Add a Control to a Form . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
A-9 Use the Format Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
A-10 Lock the Controls on the Form   . . . . . . . . . . . . . . . . . . . . . . . 24
A-11 Start and End an Application . . . . . . . . . . . . . . . . . . . . . . . . 25
A-12 Enter Code and Comments in the Code Editor Window . . . . . . . . . . . . 28
The Me.Close() Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Assignment Statements and Comments . . . . . . . . . . . . . . . . . . . . . 31
A-13 Print an Application’s Code and Interface . . . . . . . . . . . . . . . . . . 32
A-14 Exit Visual Studio and Run an Executable File . . . . . . . . . . . . . . . . 33
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
vii
 

CHAP TER 2 Plan n in g Appl i cati ons and Desi gni ng I nter faces . . . . . . . . 49
FOCUS ON THE CONCEPTS LESSON . . . . . . . . . . . . . . . . . . 50
F-1 Planning a Windows Forms Application . . . . . . . . . . . . . . . . . . . . 50
F-2 Windows Standards for Interfaces . . . . . . . . . . . . . . . . . . . . . . 52
Guidelines for Identifying Labels and Buttons . . . . . . . . . . . . . . . . . . 53
Guidelines for Including Graphics . . . . . . . . . . . . . . . . . . . . . . . . 53
Guidelines for Selecting Fonts . . . . . . . . . . . . . . . . . . . . . . . . . 53
Guidelines for Using Color . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
F-3 Access Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
F-4 Tab Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

APPLY THE C ONCEPTS LESSON . . . . . . . . . . . . . . . . . . . . 58


A-1 Create a Planning Chart for a Windows Forms Application . . . . . . . . . . . 58
A-2 Design an Interface Using the Windows Standards . . . . . . . . . . . . . . . 59
A-3 Add a Label Control to the Form . . . . . . . . . . . . . . . . . . . . . . . 60
A-4 Add a Text Box to the Form . . . . . . . . . . . . . . . . . . . . . . . . . 62
A-5 Set the Tab Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

CHAP TER 3 Co din g w i t h Vari abl es, Named Constants, and Cal cu l a ti ons . . . 73
FOCUS ON THE CONCEPTS LESSON . . . . . . . . . . . . . . . . . . 74
F-1 Pseudocode and Flowcharts . . . . . . . . . . . . . . . . . . . . . . . . . 74
F-2 Main Memory of a Computer . . . . . . . . . . . . . . . . . . . . . . . . . 76
F-3 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Selecting an Appropriate Data Type . . . . . . . . . . . . . . . . . . . . . . 77
Selecting an Appropriate Name . . . . . . . . . . . . . . . . . . . . . . . . 78
Examples of Variable Declaration Statements . . . . . . . . . . . . . . . . . . 79
F-4 TryParse Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
F-5 Arithmetic Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
F-6 Assigning a Value to an Existing Variable . . . . . . . . . . . . . . . . . . . 85
F-7 ToString Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
F-8 Option Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
F-9 Named Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

APPLY THE C ONCEPTS LESSON . . . . . . . . . . . . . . . . . . . . 94


A-1 Determine a Memory Location’s Scope and Lifetime . . . . . . . . . . . . . . 94
A-2 Use Procedure-Level Variables . . . . . . . . . . . . . . . . . . . . . . . . 95
A-3 Use Procedure-Level Named Constants . . . . . . . . . . . . . . . . . . . . 97
A-4 Use a Class-Level Variable . . . . . . . . . . . . . . . . . . . . . . . . . . 98
A-5 Use a Static Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . .101
A-6 Use a Class-Level Named Constant . . . . . . . . . . . . . . . . . . . . . .103
A-7 Professionalize Your Application’s Interface . . . . . . . . . . . . . . . . . .104
Coding the TextChanged Event Procedure . . . . . . . . . . . . . . . . . . . .104
Coding the Enter Event Procedure . . . . . . . . . . . . . . . . . . . . . . .105

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
viii
C ontents 

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .108
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112

CHAPTER 4 T h e Select io n St ruct ure . . . . . . . . . . . . . . . . . . 119


F OCUS ON THE CONC EPTS LESSON . . . . . . . . . . . . . . . . . 120
F-1 Selection Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
F-2 If…Then…Else Statement . . . . . . . . . . . . . . . . . . . . . . . . . .122
F-3 Comparison Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Comparison Operator Example: Total Due Application . . . . . . . . . . . . . . 124
Comparison Operator Example: Net Income/Loss Application . . . . . . . . . . .125
F-4 Logical Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .128
Logical Operator Example: Gross Pay Calculator Application . . . . . . . . . . .131
F-5 Summary of Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
F-6 String Comparisons . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135
String Comparison Example: Shipping Application . . . . . . . . . . . . . . . .137
F-7 Nested Selection Structures . . . . . . . . . . . . . . . . . . . . . . . . .139
F-8 Multiple-Alternative Selection Structures . . . . . . . . . . . . . . . . . . . 143
F-9 Select Case Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Specifying a Range of Values in a Case Clause . . . . . . . . . . . . . . . . . 147

APPLY THE CONCE PTS LESSON . . . . . . . . . . . . . . . . . . . 151


A-1 Add a Check Box to a Form . . . . . . . . . . . . . . . . . . . . . . . . .151
A-2 Code an Interface That Contains Check Boxes . . . . . . . . . . . . . . . . .151
CheckBox’s CheckedChanged Event . . . . . . . . . . . . . . . . . . . . . . 153
A-3 Add a Radio Button to a Form . . . . . . . . . . . . . . . . . . . . . . . .154
A-4 Code an Interface That Contains Radio Buttons . . . . . . . . . . . . . . . .154
RadioButton’s CheckedChanged Event . . . . . . . . . . . . . . . . . . . . . 156
Using the Select Case Statement with Radio Buttons . . . . . . . . . . . . . . .157
A-5 Group Objects Using a Group Box Control . . . . . . . . . . . . . . . . . . .157
A-6 Professionalize Your Application’s Interface . . . . . . . . . . . . . . . . . .159
Coding a Text Box’s KeyPress Event Procedure . . . . . . . . . . . . . . . . .159
A-7 Professionalize Your Code Using Arithmetic Assignment Operators . . . . . . . 161
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .165
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .172

CHAPTER 5 T h e Repet it io n St ruct ure . . . . . . . . . . . . . . . . . 181


F OCUS ON THE CONC EPTS LESSON . . . . . . . . . . . . . . . . . 182
F-1 Repetition Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . .182
F-2 Do…Loop Statement (Pretest Loop) . . . . . . . . . . . . . . . . . . . . . 184
F-3 String Concatenation . . . . . . . . . . . . . . . . . . . . . . . . . . . .186
F-4 Infinite Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187
F-5 Do…Loop Statement (Posttest Loop) . . . . . . . . . . . . . . . . . . . . .188
F-6 Counters and Accumulators . . . . . . . . . . . . . . . . . . . . . . . . .190
F-7 For…Next Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . .192
Comparing the For…Next and Do…Loop Statements . . . . . . . . . . . . . . .195
Flowcharting a For…Next Loop . . . . . . . . . . . . . . . . . . . . . . . . 195

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
ix
 

APPLY THE C ONCEPTS LESSON . . . . . . . . . . . . . . . . . . . 197


A-1 Use a Loop, a Counter, and an Accumulator . . . . . . . . . . . . . . . . . .197
A Different Version of the Projected Sales Application . . . . . . . . . . . . . .200
A-2 Add a List Box to a Form . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Using the String Collection Editor to Add Items to a List Box . . . . . . . . . . .203
The Sorted Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
The SelectedItem and SelectedIndex Properties . . . . . . . . . . . . . . . . .204
The SelectedValueChanged and SelectedIndexChanged Events . . . . . . . . . .205
A-3 Use the Methods and a Property of the Items Collection . . . . . . . . . . . .206
Count Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .208
Clearing the Items from a List Box . . . . . . . . . . . . . . . . . . . . . . .208
A-4 Calculate a Periodic Payment . . . . . . . . . . . . . . . . . . . . . . . . 208
ListBox, Loop, and Financial.Pmt Example: Monthly Payment Application . . . . . .210
A-5 Nest Repetition Structures . . . . . . . . . . . . . . . . . . . . . . . . . .213
Nested Repetition Structure Example: Savings Account Application . . . . . . . .214
A Caution About Real Numbers . . . . . . . . . . . . . . . . . . . . . . . . .216
A-6 Professionalize Your Application’s Interface . . . . . . . . . . . . . . . . . .218
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .221
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .228

CHAPTER 6 Su b an d Funct i on Procedures . . . . . . . . . . . . . . . 237


FOCUS ON THE CONCEPTS LESSON . . . . . . . . . . . . . . . . . 238
F-1 Event-Handling Sub Procedures . . . . . . . . . . . . . . . . . . . . . . . 238
F-2 Independent Sub Procedures . . . . . . . . . . . . . . . . . . . . . . . . .240
No Parameters/Arguments Example: History Grade Application . . . . . . . . . .242
F-3 Passing Information to a Procedure . . . . . . . . . . . . . . . . . . . . . .245
Passing Variables by Value Example: Gross Pay Application . . . . . . . . . . . .245
Passing Variables by Reference Example: Concert Tickets Application . . . . . . .248
F-4 Rounding Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . .250
F-5 Function Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252

APPLY THE C ONCEPTS LESSON . . . . . . . . . . . . . . . . . . . 256


A-1 Add a Combo Box to the Form . . . . . . . . . . . . . . . . . . . . . . . .256
A-2 Add Items to a Combo Box and Select a Default Item . . . . . . . . . . . . . 260
A-3 Code a Combo Box’s KeyPress Event Procedure . . . . . . . . . . . . . . . .261
A-4 Create an Event-Handling Sub Procedure . . . . . . . . . . . . . . . . . . .261
A-5 Calculate Federal Withholding Tax . . . . . . . . . . . . . . . . . . . . . . 262
A-6 Invoke an Independent Sub Procedure and a Function . . . . . . . . . . . . . 264
A-7 Create an Independent Sub Procedure . . . . . . . . . . . . . . . . . . . . 266
A-8 Create a Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .267
A-9 Validate an Application’s Code . . . . . . . . . . . . . . . . . . . . . . . .269
A-10 Professionalize Your Application’s Interface . . . . . . . . . . . . . . . . . 271
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .277
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .282

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
x
C ontents 

CHAPTER 7 S t r in g M an ipu lat io n . . . . . . . . . . . . . . . . . . . 287


F OCUS ON THE CONC EPTS LESSON . . . . . . . . . . . . . . . . . 288
F-1 Length Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
The Product ID Application . . . . . . . . . . . . . . . . . . . . . . . . . . 288
F-2 Insert Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
F-3 PadLeft and PadRight Methods . . . . . . . . . . . . . . . . . . . . . . . .290
The Net Pay Application . . . . . . . . . . . . . . . . . . . . . . . . . . . .291
F-4 Contains and IndexOf Methods . . . . . . . . . . . . . . . . . . . . . . . .293
The City and State Application . . . . . . . . . . . . . . . . . . . . . . . . .294
F-5 Substring Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .296
The Rearrange Name Application . . . . . . . . . . . . . . . . . . . . . . . .296
F-6 Character Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
The First Name Application . . . . . . . . . . . . . . . . . . . . . . . . . . 299
F-7 Remove Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
F-8 Trim, TrimStart, and TrimEnd Methods . . . . . . . . . . . . . . . . . . . . 302
The Tax Calculator Application . . . . . . . . . . . . . . . . . . . . . . . . .303
F-9 Replace Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
F-10 Like Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .305
Inventory Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . .307

APPLY THE CONCEPTS LESSON . . . . . . . . . . . . . . . . . . . 309


A-1 Code the Check Digit Application . . . . . . . . . . . . . . . . . . . . . . .309
A-2 Code the Password Application . . . . . . . . . . . . . . . . . . . . . . . 314
A-3 Generate Random Integers . . . . . . . . . . . . . . . . . . . . . . . . . 317
A-4 Code the Guess a Letter Application . . . . . . . . . . . . . . . . . . . . .318
Use the Enabled Property and Focus Method . . . . . . . . . . . . . . . . . . 319
A-5 Code the Guess the Word Game Application . . . . . . . . . . . . . . . . . .322
Coding the btnNewWord_Click Procedure . . . . . . . . . . . . . . . . . . . .323
Coding the btnTryLetter_Click Procedure . . . . . . . . . . . . . . . . . . . .325
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .330
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .335

CHAPTER 8 Ar r ays . . . . . . . . . . . . . . . . . . . . . . . . . 341


F OCUS ON THE CONC EPTS LESSON . . . . . . . . . . . . . . . . . 342
F-1 Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .342
F-2 Declaring One-Dimensional Arrays . . . . . . . . . . . . . . . . . . . . . . 342
Storing Data in a One-Dimensional Array . . . . . . . . . . . . . . . . . . . . 345
Determining the Number of Elements in a One-Dimensional Array . . . . . . . . .346
Determining the Highest Subscript in a One-Dimensional Array . . . . . . . . . . 346
Traversing a One-Dimensional Array . . . . . . . . . . . . . . . . . . . . . . 347
F-3 For Each...Next Statement . . . . . . . . . . . . . . . . . . . . . . . . . .349
F-4 Calculating the Average Array Value . . . . . . . . . . . . . . . . . . . . . 350
F-5 Finding the Highest Array Value . . . . . . . . . . . . . . . . . . . . . . . 353
F-6 Sorting a One-Dimensional Array . . . . . . . . . . . . . . . . . . . . . . .355
F-7 Two-Dimensional Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . .358
Declaring a Two-Dimensional Array . . . . . . . . . . . . . . . . . . . . . . .358
Storing Data in a Two-Dimensional Array . . . . . . . . . . . . . . . . . . . . 360

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
xi
 

Determining the Highest Subscript in a Two-Dimensional Array . . . . . . . . . . 361


Traversing a Two-Dimensional Array . . . . . . . . . . . . . . . . . . . . . . 361
Totaling the Values Stored in a Two-Dimensional Array . . . . . . . . . . . . . .363
APPLY THE C ONCEPTS LESSON . . . . . . . . . . . . . . . . . . . 366
A-1 Associate an Array with a Collection . . . . . . . . . . . . . . . . . . . . .366
A-2 Create Accumulator and Counter Arrays . . . . . . . . . . . . . . . . . . . 367
A-3 Create Parallel One-Dimensional Arrays . . . . . . . . . . . . . . . . . . . .371
A-4 Search a Two-Dimensional Array . . . . . . . . . . . . . . . . . . . . . . .374
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .378
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .383

CHAP TER 9 Sequ en t ia l A ccess Fi l es and Menus . . . . . . . . . . . . . 392


FOCUS ON THE CONCEPTS LESSON . . . . . . . . . . . . . . . . . 393
F-1 Sequential Access Files . . . . . . . . . . . . . . . . . . . . . . . . . . .393
F-2 Sequential Access Output Files . . . . . . . . . . . . . . . . . . . . . . . .393
Output File Example: Game Show Application . . . . . . . . . . . . . . . . . .395
F-3 Sequential Access Input Files . . . . . . . . . . . . . . . . . . . . . . . . 397
ReadToEnd Method Example: Game Show Application . . . . . . . . . . . . . . 399
ReadLine Method Example: Game Show Application . . . . . . . . . . . . . . . 401

APPLY THE C ONCEPTS LESSON . . . . . . . . . . . . . . . . . . . 404


A-1 Add a Menu to a Form . . . . . . . . . . . . . . . . . . . . . . . . . . . .404
GUI Guidelines for Menus . . . . . . . . . . . . . . . . . . . . . . . . . . .404
Menu Example: Continents Application . . . . . . . . . . . . . . . . . . . . . 405
A-2 Code the Items on a Menu . . . . . . . . . . . . . . . . . . . . . . . . . .408
A-3 Modify a Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .410
A-4 Accumulate the Values Stored in a File . . . . . . . . . . . . . . . . . . . .412
A-5 Sort the Data Contained in a File . . . . . . . . . . . . . . . . . . . . . . .414
A-6 Professionalize Your Application’s Interface . . . . . . . . . . . . . . . . . .416
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .418
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .420

CHAP TER 10 Clas s es a nd Obj ects . . . . . . . . . . . . . . . . . . . 427


FOCUS ON THE CONCEPTS LESSON . . . . . . . . . . . . . . . . . 428
F-1 Object-Oriented Programming . . . . . . . . . . . . . . . . . . . . . . . . 428
F-2 Creating a Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
F-3 Instantiating an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
F-4 Attributes Section of a Class . . . . . . . . . . . . . . . . . . . . . . . . .431
Attributes Section Example: Franklin Decks Application . . . . . . . . . . . . . 433
F-5 Behaviors Section of a Class . . . . . . . . . . . . . . . . . . . . . . . . .436
Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .436
Methods Other than Constructors . . . . . . . . . . . . . . . . . . . . . . . 437
Behaviors Section Example: Franklin Decks Application . . . . . . . . . . . . . 438
Using the Rectangle Class: Franklin Decks Application . . . . . . . . . . . . . .438

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
xii
C ontents 

F-6 Adding a Parameterized Constructor to a Class . . . . . . . . . . . . . . . .443


F-7 Reusing a Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447

APPLY THE CONCEPTS LESSON . . . . . . . . . . . . . . . . . . . 452


A-1 Use a ReadOnly Property . . . . . . . . . . . . . . . . . . . . . . . . . . 452
A-2 Create Auto-Implemented Properties . . . . . . . . . . . . . . . . . . . . .457
A-3 Overload Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .466
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .469

CHAPTER 11 S QL Ser ver Dat abases . . . . . . . . . . . . . . . . . . 475


F OCUS ON THE CONC EPTS LESSON . . . . . . . . . . . . . . . . . 476
F-1 Basic Database Terminology . . . . . . . . . . . . . . . . . . . . . . . . .476
F-2 Creating a SQL Server Database . . . . . . . . . . . . . . . . . . . . . . .478
F-3 Adding a Table to a Database . . . . . . . . . . . . . . . . . . . . . . . . 480
F-4 Adding Records to a Table . . . . . . . . . . . . . . . . . . . . . . . . . .483
F-5 Data Source Configuration Wizard . . . . . . . . . . . . . . . . . . . . . . 484
F-6 Binding the Objects in a Dataset . . . . . . . . . . . . . . . . . . . . . . .487
Having the Computer Create a Bound Control . . . . . . . . . . . . . . . . . .488
F-7 DataGridView Control . . . . . . . . . . . . . . . . . . . . . . . . . . . .491
F-8 Copy to Output Directory Property . . . . . . . . . . . . . . . . . . . . . .495
F-9 Try...Catch Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . .497
F-10 Two-Table Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . .499
Relating the Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .502
Creating a Database Query . . . . . . . . . . . . . . . . . . . . . . . . . . 504
Displaying the Query Information . . . . . . . . . . . . . . . . . . . . . . . .506

APPLY THE CONCEPTS LESSON . . . . . . . . . . . . . . . . . . . 508


A-1 Create a Data Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . .508
A-2 Bind Field Objects to Existing Controls . . . . . . . . . . . . . . . . . . . .511
A-3 Perform Calculations on the Fields in a Dataset . . . . . . . . . . . . . . . .513
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .517
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .520

CHAPTER 12 Dat abas e Qu er ies w i t h SQL . . . . . . . . . . . . . . . . 529


F OCUS ON THE CONC EPTS LESSON . . . . . . . . . . . . . . . . . 530
F-1 SELECT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . .530
F-2 Creating a Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .533
F-3 Parameter Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . .540
F-4 Saving a Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .544
F-5 Invoking a Query from Code . . . . . . . . . . . . . . . . . . . . . . . . .547

APPLY THE CONCEPTS LESSON . . . . . . . . . . . . . . . . . . . 549


A-1 Add a Calculated Field to a Dataset . . . . . . . . . . . . . . . . . . . . . 549
A-2 Use the SQL Aggregate Functions . . . . . . . . . . . . . . . . . . . . . . 552
A-3 Professionalize Your Application’s Interface . . . . . . . . . . . . . . . . . .556

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
xiii
 

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .557
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .560

CHAP TER 13 Web Sit e A ppl i cati ons . . . . . . . . . . . . . . . . . . 565


FOCUS ON THE CONCEPTS LESSON . . . . . . . . . . . . . . . . . 566
F-1 Basic Web Terminology ��������������������������������������������������������������������������������566
F-2 Creating a Web Site Application ���������������������������������������������������������������������568
F-3 Starting a Web Application�����������������������������������������������������������������������������571
F-4 Modifying the Site.master Page ���������������������������������������������������������������������573
F-5 Personalizing the Default.aspx Page���������������������������������������������������������������576
F-6 Personalizing the About.aspx Page�����������������������������������������������������������������577
F-7 Testing with Different Browsers ���������������������������������������������������������������������579
F-8 Closing and Opening a Web Site Application�����������������������������������������������������579

APPLY THE C ONCEPTS LESSON . . . . . . . . . . . . . . . . . . . 580


A-1 Repurpose an Existing Web Page��������������������������������������������������������������������580
A-2 Add a Table and Controls to a Web Page���������������������������������������������������������582
A-3 Code a Control on a Web Page�����������������������������������������������������������������������585
A-4 Use a Validation Control��������������������������������������������������������������������������������587
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .590
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .592

APPEN DIX A GU I Des ign Gui del i nes . . . . . . . . . . . . . . . . . . 599

APPE N DIX B Addit io n al To pi cs . . . . . . . . . . . . . . . . . . . . 604

APPE N DIX C F in din g and Fi x i ng Program Errors . . . . . . . . . . . . . 632

APPEN DIX D V is u al B asi c 2 0 1 7 Cheat Sheet . . . . . . . . . . . . . . 647

APPEN DIX E Cas e Pro je ct s . . . . . . . . . . . . . . . . . . . . . . 667

Index . . . . . . . . . . . . . . . . . . . . . . . . . . 671

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
xiv

Preface

Programming with Microsoft Visual Basic 2017, Eighth Edition uses Visual Basic 2017, an
object-oriented language, to teach programming concepts. This book is designed for a beginning
programming course. However, it assumes that students are familiar with basic Windows skills
and file management.

Organization and Coverage


Programming with Microsoft Visual Basic 2017, Eighth Edition contains 13 chapters that
present concepts along with hands-on instruction; it also contains five appendices (A through E).
In the chapters, students with no previous programming experience learn how to plan and
create their own interactive Windows applications. GUI design skills, OOP concepts, and
planning tools (such as Planning Charts, pseudocode, and flowcharts) are covered in the book.
The chapters show students how to work with objects and write Visual Basic statements such as
If...Then...Else, Select Case, Do...Loop, For...Next, and For Each...Next. Students also learn how
to create and manipulate variables, constants, strings, sequential access files, classes, and arrays.
In Chapters 11 and 12, students learn how to create SQL Server databases and then use them
in applications. They also learn how to use Structured Query Language (SQL) to access specific
fields and records from the database and also to create calculated fields. Chapter 13 shows
students how to create both static and dynamic Web Site applications.
Appendix A contains a summary of the GUI design guidelines mentioned in the chapters.
Appendix B contains additional topics that can be covered along with (or anytime after) a
specified chapter. Appendix C teaches students how to locate and correct errors in their
code. The appendix shows students how to step through their code and also how to create
breakpoints. The Visual Basic 2017 Cheat Sheet contained in Appendix D 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.

Approach
Each chapter in Programming with Microsoft Visual Basic 2017, Eighth Edition contains two
lessons titled Focus on the Concepts and Apply the Concepts. Each lesson has its own set of
objectives. The Focus lessons concentrate on programming concepts, using examples along with
sample applications designed to reinforce the concepts being taught. The Apply the Concepts
lessons show students how to apply the concepts from the chapter’s Focus lesson in different
ways. The Apply lessons also expand on the concepts taught in the Focus lesson. Both lessons
provide tutorial-style steps that guide the student on coding, running, and testing applications.
Each sample application allows the student to observe how the current concept can be used
before the next concept is introduced.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
xv
Organization and Coverage 

Features
Programming with Microsoft Visual Basic 2017, Eighth 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.
OPTION STATEMENTS All applications 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.
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.
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 chapter contains a Summary section that recaps the concepts covered in the
chapter.
KEY TERMS Following the Summary section in each chapter is a list of the key terms
introduced throughout the chapter, along with their definitions.
REVIEW QUESTIONS Each chapter contains Review Questions designed to test a student’s
understanding of the chapter’s concepts.

New to This Edition!


NEW CHAPTERS All of the chapters in the book have been revamped. A list of the changes
made to the chapters is available via the optional MindTap for this text.
LESSONS Each chapter is divided into two lessons: Focus on the Concepts and Apply the
Concepts. Each lesson has its own set of objectives. The Focus lessons introduce programming
concepts, which are illustrated with code examples and sample applications. The Apply lessons
show students how to apply the concepts from the chapter’s Focus lesson in different ways. The
Apply lessons also expand on the concepts taught in the Focus lesson. Both lessons provide
tutorial-style steps that guide the student on coding, running, and testing applications. The
applications allow students to observe how the current concept can be used before the next
concept is introduced.
MINI-QUIZ BOXES Mini-quiz boxes are strategically placed to test students’ knowledge at
various points in the chapter. Answers to the quiz questions are printed upside down in the
boxes, allowing students to determine whether they have mastered the material covered thus
far before continuing with the chapter.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
xvi
P reface Instructor Resources

SQL SERVER DATABASES AND SQL The book includes two chapters (Chapters 11 and 12)
on SQL Server databases and SQL.
NEW EXERCISES The Review Questions in each chapter are followed by Exercises, which
provide students with additional practice of the skills and concepts they learned in the chapter.
The Exercises are designated as INTRODUCTORY, INTERMEDIATE, ADVANCED, ON
YOUR OWN, and FIX IT. The ON YOUR OWN Exercises encourage students to challenge and
independently develop their own programming skills while exploring the capabilities of Visual
Basic 2017. Students are given minimum guidelines to follow when creating the ON YOUR
OWN applications. The FIX IT Exercises provide an opportunity for students to detect and
correct errors in an application’s code.
APPENDICES Appendix A summarizes the GUI design guidelines mentioned in the chapters,
making it easier for the student to follow the guidelines when designing an application’s interface.
Appendix B contains additional topics that can be covered along with (or anytime after) a
specified chapter. Appendix C 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 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.
UPDATED VIDEOS These notes direct students to videos that accompany many
chapters in the book. The videos explain and/or demonstrate one or more of the
chapter’s concepts. The videos have been revised from the previous edition and are
available via the optional MindTap for this text.

Steps and Figures


The tutorial-style steps and figures in the book assume you are using Microsoft Visual Studio
Community 2017 and a system running Microsoft Windows 10. Your screen may appear slightly
different in some instances if you are using a different version of Microsoft Windows.

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

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
xvii
Acknowledgments 

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 chapter applications and the end-of-chapter 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 2017 includes videos, study tools,
and interactive quizzing, all integrated into a full eReader that contains the full content from the
printed text.

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 Jennifer Feltri-George (Senior Content Project
Manager), Prathiba Rajagopal (Senior Project Manager), Nicole Spoto (Quality Assurance),
Alyssa Pratt (Senior Content Developer), Brianna Vorce (Associate Content Developer),
and the compositors at SPi Global. Thank you for your support, enthusiasm, patience, and
hard work. And a special thank you to all of the past and present reviewers, as well as to
Sally Douglas (College of Central Florida), who suggested the YOU DO IT! boxes several
editions ago.
Diane Zak

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
xviii

Read This Before


You Begin

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 VB2017 folder. The files for Chapter 1 are stored in the VB2017\Chap01 folder.
Similarly, the files for Chapter 2 are stored in the VB2017\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.

Using Your Own Computer


To use your own computer to complete the computer activities in this book, you will need the
following:
•• A Pentium® 4 processor, 1.6 GHz or higher, personal computer running Microsoft Windows.
This book was written and Quality Assurance tested using Microsoft Windows 10.
•• Microsoft Visual Studio 2017 installed on your computer. (You need to install the .NET
desktop development component to complete Chapters 1 through 12. You need to install
the ASP.NET and web development component to complete Chapter 13.) This book was
written and Quality Assurance tested using Microsoft Visual Studio Community 2017.
At the time of this writing, you can download a free copy of the Community Edition at
https://www.visualstudio.com/downloads.

To control the display of filename extensions in Windows 10:


1. Press and hold down the Windows logo key on your keyboard as you tap the letter x.
(Or, right-click the Windows Start button on the taskbar.) Click Control Panel, click
Appearance and Personalization, click File Explorer Options, and then click the
View tab.
2. Deselect the Hide extensions for known file types check box to show the extensions; or,
select the check box to hide them. Click the OK button and then close the Appearance
and Personalization window.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
xix
Technical Information 

To always display the underlined letters (called access keys)


in Windows 10:
1. Press and hold down the Windows logo key on your keyboard as you tap the letter x.
(Or, right-click the Windows Start button on the taskbar.) Click Control Panel and then
click Appearance and Personalization.
2. In the Ease of Access Center section, click Turn on easy access keys, and then select the
Underline keyboard shortcuts and access keys check box. Click the OK button and then
close the Ease of Access Center window.

To start and configure Visual Studio to match the figures


and tutorial steps in this book:
1. Use the steps on Pages 9 through 11 in Chapter 1.
2. If you are using the Professional or Enterprise editions of Visual Studio, you may
also need to click Tools, click Options, expand the Text Editor node, expand the
All Languages node, click CodeLens, and then deselect Enable CodeLens.

Figures
The figures in this book reflect how your screen will look if you are using Microsoft Visual
Studio Community 2017 and a Microsoft Windows 10 system. Your screen may appear slightly
different in some instances if you are using another version of either Microsoft Visual Studio or
Microsoft Windows.

Visit Our Web Site


Additional materials designed for this textbook might be available at CengageBrain.com.
Search this site for more details.

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 and Quality Assurance tested using Microsoft Visual
Studio Community 2017 on a Microsoft Windows 10 system.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
CHAPTER 1
An Introduction
to Visual Studio 2017
and Visual Basic
In this chapter’s Focus on the Concepts lesson, you will learn the definitions for
many of the terms used by programmers. The lesson also introduces you to
Microsoft’s newest integrated development environment (IDE): Visual Studio 2017.
The IDE contains the latest version of the Visual Basic programming language. You
will use the IDE and language to create the applications in this book. As stated in
the Read This Before You Begin section of this book, the steps and figures in this
book assume you are using the Community edition of Visual Studio 2017. Your
steps and screen might differ slightly in some instances if you are using a different
edition of Visual Studio 2017.

In the Apply the Concepts lesson, you will apply the concepts covered in the Focus
lesson. The Apply lesson is designed to help you get comfortable with both the
Visual Studio IDE and the Visual Basic programming language.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
2
CHAPTER 1 An Introduction to Visual Studio 2017 and Visual Basic

❚ FOC U S O N TH E C O N CE P TS L E S S O N
Concepts covered in this lesson:
•• F-1 Computer programming terminology
•• F-2 The programmer’s job
•• F-3 The Visual Basic programming language
•• F-4 The Visual Studio IDE
•• F-5 Assigning names to objects

F-1 Computer Programming Terminology


In essence, the word programming means giving a mechanism the directions to accomplish a
task. When the mechanism is a computer, the directions are typically referred to as instructions.
A set of instructions that tells a computer how to accomplish a task is called a computer
program or, more simply, a program.
Programs are written by programmers using a variety of special languages called programming
languages. Some popular programming languages are Visual Basic, C#, C11, and Java. In
this book, you will write your programs using the Visual Basic programming language, which
is built into Microsoft’s newest integrated development environment: Visual Studio 2017. An
integrated development environment (IDE) is an environment that contains all of the tools
and features you need to create, run, and test your programs. You also will use the IDE to create
graphical user interfaces for your programs. A graphical user interface (or GUI) is what the
person using your program (referred to as the user) sees and interacts with while your program
is running. The user interface and its program instructions are referred to as an application.
Figure 1-1 shows the user interface and program instructions for the Good Morning application.

Figure 1-1 Good Morning application

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
3
F-3 The Visual Basic Programming Language 

To run the Good Morning application: S TA R T HER E

1. Use Windows to locate and then open the VB2017\Chap01 folder on your computer’s hard
disk or on the device designated by your instructor. Double-click Good Morning.exe in
the list of filenames. (Depending on how Windows is set up on your computer, you might
not see the .exe extension on the filename. Refer to the Read This Before You Begin section
to learn how to show filename extensions.) The application’s user interface appears on the
screen with a blinking “It’s time to get up!!!!” message.
2. Click the Exit button to close the application.

F-2 The Programmer’s Job


When a company has a problem that requires a computer solution, typically it is a programmer
who comes to the rescue. The programmer might be an employee of the company; or he or she
might be a freelance programmer, who works on temporary contracts rather than for a long-
term employer.
First, the programmer meets with the person (or people) responsible for describing the problem.
This person might be the one who will eventually use the solution; or he or she might be a
software developer, who serves as an intermediary between the user and the programmer. The
software developer will meet with the user and then outline the problem specification for the
programmer. After the programmer understands the problem, he or she will begin planning
an appropriate solution. After the planning is complete, the programmer will translate the
solution into computer instructions—a process called coding. The programmer then will test
the program rigorously with sample data to make sure it works both correctly and to the user’s
satisfaction. Depending on the complexity of the problem, multiple programmers might be
involved in the planning and coding phases. Programming teams often contain subject matter
experts, who might or might not be programmers. For example, an accountant might be part of
a team working on a program that requires accounting expertise.

F-3 The Visual Basic Programming Language


Visual Basic is an object-oriented programming language, which is a language that allows the
programmer to use objects to accomplish a program’s goal. In object-oriented programming, or
OOP, an object is anything that can be seen, touched, or used. In other words, an object is nearly
any thing. Programs written for the Windows environment typically use objects such as check
boxes, list boxes, and buttons.
Every object in an object-oriented program is created from a class, which is a pattern that the
computer uses to create the object. The class contains the instructions that tell the computer
how the object should look and behave. An object created from a class is called an instance of
the class and is said to be instantiated from the class. An analogy involving a cookie cutter and
cookies is often used to describe a class and its objects: The class is the cookie cutter, and the
objects instantiated from the class are the cookies. You will learn more about classes and objects
throughout this book.
In the following set of steps, you will run two Visual Basic applications that employ many of the
objects you will learn about in this book.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
4
CHAPTER 1 An Introduction to Visual Studio 2017 and Visual Basic

S TA RT H ERE To run the applications:


1. If necessary, open the VB2017\Chap01 folder. Double-click Payment.exe. After a few
moments, the Monthly Payment Calculator application shown in Figure 1-2 appears on
the screen. (If some of the letters on your screen are not underlined, press the Alt key.)
The interface contains a text box, a list box, buttons, radio buttons, and labels. You can
use the application to calculate the monthly payment for a car loan.

text box

list box
radio buttons

labels

buttons

Figure 1-2 Monthly Payment Calculator application

2. First, you will use the application to calculate the monthly payment for a $15,000
loan at 3.5% interest for five years. Type 15000 in the Principal text box. Scroll down
the Interest list box and then click 3.50 %. Finally, click the Calculate button. The
application indicates that your monthly payment would be $272.88. See Figure 1-3.

Figure 1-3 Computed monthly payment

3. Next, you will determine what your monthly payment would be if you borrowed $4,500
at 2.75% interest for four years. Type 4500 in the Principal text box, click 2.75 % in the
Interest list box, click the 4 years radio button, and then click the Calculate button.
The Monthly payment box shows $99.11.
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
5
F-3 The Visual Basic Programming Language 

4. Click the Exit button to close the application.


5. Now double-click Einstein.exe. (The file is located in the VB2017\Chap01 folder.)
Click the Show equation button to display Einstein’s famous equation. See Figure 1-4.
The interface contains picture boxes and buttons. (If some of the letters on your screen
are not underlined, press the Alt key.)

picture boxes

buttons

Figure 1-4 Equation shown in the interface

6. Click the Hide equation button to hide the equation, and then click the Exit button to
close the application.

Mini-Quiz 1-1
1. What is a computer program?
2. What is a GUI?
3. What is the process of translating a solution into a computer program called?
4. In object-oriented programming, what is a class?
an object.
what the user sees and interacts with when using an application. 3) Coding 4) A pattern used to instantiate (create)
1) A set of instructions that tells a computer how to accomplish a task. 2) Stands for Graphical User Interface. It is

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
6
CHAPTER 1 An Introduction to Visual Studio 2017 and Visual Basic

F-4 The Visual Studio IDE


The Visual Studio IDE contains many different windows, each with its own special purpose.
The four windows you will use most often when designing your user interfaces are shown in
Figure 1-5.

designer window

Solution Explorer
Toolbox window
window

Properties
window

Figure 1-5 Visual Studio IDE

The designer window is where you create (or design) your application’s GUI. A Windows Form
object, or form, appears in the designer window shown in Figure 1-5. A form is the foundation
for the user interface in an application created for the Windows environment. As you learned
earlier, all objects in an object-oriented program are instantiated (created) from a class. A form,
for example, is an instance of the Windows Form class. The form (an object) is automatically
instantiated for you when you create a Windows Forms application in Visual Basic.
You use the Toolbox window to add other objects, called controls, to the form. Each tool listed
in the Toolbox window represents a class. You add an object by clicking its corresponding tool
(class) in the toolbox and then dragging it with your mouse pointer to the form. When you
drag the tool to the form, Visual Basic creates (instantiates) an instance of the class (an object)
and places it on the form. For example, the two picture box objects shown in Figure 1-5 were
instantiated (created) by dragging the PictureBox tool from the toolbox to the form. Similarly,
the three button objects were instantiated using the Button tool.
Each object has a set of attributes that determine its appearance and behavior. The attributes,
called properties, are listed in the Properties window when the object is selected in the
designer window. In Figure 1-5, the form is selected, and the names of its properties (such as
StartPosition and Text), along with their values (CenterScreen and Einstein’s Famous Equation),
appear in the Properties window. You can use the Properties window to change the value of an
object’s property. For example, you can use it to change the form’s Text property, which appears
in the form’s title bar, from Einstein’s Famous Equation to Guess My Equation.
Windows applications in Visual Basic are composed of solutions, projects, and files. A solution
is a container that stores the projects and files for an entire application. A project is also a
container, but it stores only the files associated with that particular project. The Solution
Explorer window displays a list of the projects contained in the current solution and the items
contained in each project. The Solution Explorer window shown in Figure 1-5 indicates that the
Einstein Solution contains the Einstein Project, which contains several items. The Einstein.png

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
7
F-5 Assigning Names to Objects 

and Equation.png items are the names of files on your disk. These files contain the images that
appear in the picture boxes on the form. The Main Form.vb item is also the name of a file on
your disk. The Main Form.vb file stores the program instructions (code) that tell the three
buttons how to respond when the user clicks them. You enter the code in the Code Editor
window, which is shown in Figure 1-6.

Figure 1-6 Code Editor window

At this point, you are not expected to understand the contents of the Code Editor window
in Figure 1-6; you will learn about the contents in this chapter’s Apply the Concepts lesson.
However, briefly, the green lines of text are comments and are not executed by the computer
when the application is run; they serve simply to internally document the program. The code
on Lines 6 through 9 tell the computer to close (end) the application when the Exit button is
clicked. The code on Lines 11 through 16 indicate that the computer should hide the equation
picture box when the Hide equation button is clicked. The code on Lines 18 through 23 tell the
computer to show the equation picture box when the Show equation button is clicked.

F-5 Assigning Names to Objects


As mentioned earlier, each object has a set of properties attached to it. One of the most
important of these properties is the Name property. This is because you use the Name property
to refer to the object in code. The code in Figure 1-6, for example, refers to objects named
frmMain, btnExit, btnHide, btnShow, and picEquation. Figure 1-7 lists the rules and conventions
this book will follow when naming objects. Typically, you assign names to only objects that are
either coded or referred to in code.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
8
CHAPTER 1 An Introduction to Visual Studio 2017 and Visual Basic

Camel case
refers to the Naming rules (these are required by Visual Basic)
fact that the 1. Each object must have a unique name.
uppercase 2. Each name must begin with a letter and contain only letters, numbers, and the
letters appear underscore character.
as “humps” in the name
because they are taller Naming conventions used in this book
than the lowercase 1. Each name will begin with an ID of three (or more) characters that represents the
letters. object’s type—for example, frm for a form, btn for a button, and txt for a text box.
2. The remaining characters after the ID will indicate the object’s purpose.
3. Each name will be entered using camel case: the ID will be in lowercase, and the first
letter in each subsequent word in the name will be capitalized.

Examples
frmMain the main form in a project
btnExit a button that ends the application when clicked
txtFirstName a text box for entering a customer’s first name
picEquation a picture box that displays an image of an equation
lblTotalDue a label that displays the total amount a customer owes
chkDiscount a check box for specifying whether a customer gets a discount

Figure 1-7 Rules and conventions for naming objects

Mini-Quiz 1-2
1. Which window in the IDE lists the tools you can use to add objects to a form?
2. While designing an interface, which window in the IDE allows you to change the
default value of an object’s property?
3. Using the naming rules and conventions listed in Figure 1-7, which of the following are
valid names and which are not? Explain why the names are not valid.
a. lblTotal
b. txtFirst.Name
c. lblCity&State
d. btnCalc Total
e. txtFirstQuarter
is invalid because it contains an ampersand. Answer d is invalid because it contains a space.
1) Toolbox 2) Properties 3) Answers a and e are valid. Answer b is invalid because it contains a period. Answer c

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Exploring the Variety of Random
Documents with Different Content
He stopped, still gazing, his back full on Quincy.
The night seemed, for a moment, hushed. It was as if, before this subtle
audience, it wished to show its best. The mists gyred before the battlements
of light. And the Park breathed deeply. Quincy wished to get up and leave.
Somehow, he failed. And an impression of his discomfort must have struck
his anonymous companion. The man turned. Then, he stepped forward.
“Why,” he exclaimed, “you’re only a lad!” He came closer. “Tall,
though, for your age.”
Quincy clasped the bench with his two hands. The man stood before
him, calmly observant.
“What’s wrong?” he said. His voice was cool but interested. It had in it
the poise of a physician who is concerned yet unharassed. Quincy could not
speak.
“Have you run away?” the man went on. And then, he began to laugh—
quietly, to himself, as if in retrospect upon some joke. “Good for you,” he
continued. “Good for you.... Tell me, can’t stand your father?”
“That’s not so!” Quincy choked out, indignant yet ignoring exactly why.
“Oh, I see! Father can’t stand you.”
The boy had craned forward. This stroke thrust him back, almost
huddled on his bench. And the man thought he had guessed true.
“I ran away once,” he began, musingly aloof.
There was a pause while he thought. And then, as if for the first time, he
seemed to espy the boy. He stepped still farther forward and grasped his
shoulder with a wiry hand. Of a sudden, he was serious and intense. And he
uttered his words as a man speaks an order in a quick emergency.
“Good for you,” he said. “Good for you, to have come away! And now
—no weakening! No getting sentimental! Ah—I see it. Don’t start thinking
about mother—about how mother’ll carry on. Every man for himself.
Mothers keep you for themselves. Give you a penny-worth of love for the
privilege of sucking your soul. Keep you, but don’t sustain you. Keep you,
but don’t protect you. I know. Tears—that’s their weapon. A coward’s—as
you’d know in any one save a mother. You must be sixteen. Am I right?”
“Fifteen—” Quincy was awed into response.
“Good! Now, heart of steel; thin lips curled slightly downward—that’s
armor to hold you tight. I went back. I thought that was more heroic, harder,
nobler. Well, perhaps it was. Also, it was damn-foolishness!”
He stopped and released Quincy’s shoulder. And again, in a flash, his
mood transformed.
“Good-bye, sonny,” he said, once more aloof and without trace of the
intensity which had cut sharp his former words. “I guess I’ll go below. The
stars may be visible through the mist from the cave’s mouth.” He turned
into the path.
“Blue’s certainly her color—Don’t think of family!” he mused aloud, as
he went down.

Quincy sat, dazed for a while. And then, quite as if the power to do so
had not before been utterly away, he glided rapid and easy into thinking.
Consciousness of where he was—that whose myriad colors had obsessed
him—now went entirely. He had been whirled in a maelstrom of sensation.
Now, he flew along a track of thought. So at least, however wrong, it
appeared to Quincy.
For a while longer he sat. And then, he got up and walked.
He had turned in the direction of his house. Already, he was gone a
considerable distance ere he learned this. He stopped. He did not change his
route. He merely stood stock still, while his future should be born within
him. This also, was how it appeared to Quincy.
He was near a lamp-post. The path he had descended fell abruptly upon
a wider walk that sloped down from it at a right angle, A rustic railing ran
along it. Great clusters of rhododendron filled the sides. Opposite, on the
wider walk, was a sheer rock, ensconced in shrubbery, crowned with a tree.
Beside this, was the lamp. And here stood Quincy. A policeman, rounding
his beat from above, caught sight of him. He also stopped.
He saw a boy, already tall, fixed and intent—but upon what, he could not
discover. The boy stood as if charmed, his face full toward the lamp. The
officer took in his long, dark face over which the tweed cap lay low. He felt
the delicate, firm fibre of his body, disclosed through his tight sack suit. The
boy’s arms were held straight at his sides. He was faintly swaying in his
balance.
Curiosity is a duty if one happen to wear an official uniform. So the
officer drew nearer. He saw now that the boy was slightly shivering and that
his eyes were intent upon no thing other than the lamp itself! His face was
brought out clearly in the sheet of light. The man gleaned the impression of
a tender, nervous, high-wrought mood, such as Park-suicides were supposed
to have. Clearly, here was a case to be investigated.
Marching up close, he spoke: “A bit chilly, young feller?”
Quincy looked sharply. In his eyes were irritation and alarm. Then,
turning his back on the patrolman, he started down the hill.
“Hold on!” cried the Law.
Quincy stopped without turning back. This required of the policeman to
catch up to him. Abreast, they faced each other.
“What you doin’ here?” he demanded. The boy’s demeanor had
dispersed the sympathy which his good clothes aroused.
“What I’m doing?” Quincy got the question by repeating it. “I’m
walking, of course.”
“Is that what you call standin’ in front of a lamp-post fer half an hour,
starin’ like a madman?”
Quincy straightened perceptibly. And then, an angry look came into his
eyes.
“Look here,” he said, “you leave me alone!”
He marched down the walk. And the policeman mounted back to the
height of the hill. For once, Law had been chastened and the individual not
crushed, in their perpetual encounter.

What the man in the Rambles had not done, this last completed.
The boy walked now, sturdily, though slowly, toward the Park gate by
which he had flung in. An acute observer might have remarked, as he
walked on, a curious asymmetry between the force that he seemed to be
requiring as he went and the little speed that he attained. A portion of the
boy’s energies appeared to load his heels and to impede him. The full swing
of his legs was evidently not impressed upon the business of walking. The
jerky, heavy gait that he maintained, despite his efforts, proved a divorce of
purpose. Quincy’s upper body, his head, his arms were in the rhythm of a
steady stride. His legs, somehow, were recalcitrant. And in consequence of
this, the boy moved slowly, veered perceptibly in a way that to a tyro might
have seemed the signal of intoxication.
Doubtless, the strange sermon of the man in the Rambles had let loose
the flow of argument that surged in Quincy. And the rational conclusion to
which his thinking brought him was all of a harmony with that strange
sermon. Yet, Quincy was going home!
Indeed, in this seeming contradiction, lay the crux of his experience.
Quincy was sounding, vividly, the paltriness of logic, the bland
imperviousness to it, of truth. His mind swirled in and out of the channels
of his resentment, his miseries, his hopes. His mind measured, of course, in
flood or ebb, exactly with these channels which it could not escape. And
yet, though their course lay outward, he was going home! Before, while he
thought his mind submerged and gone, he had yet acted by it. His going
forth had been a mental sally though his mind slept. His going-home was an
irrepressible emotion, though his mind clamored against it. What a strange
paradox for fifteen years to glimpse, though the way of sight was only a
pervasive sense of helpless pain, an almost cosmic irritation. Quincy
walked on. And his thoughts surged against his walking. And gradually, as
he walked, he grappled with his thoughts, grimly determined to deflect
them, to turn them back, in stride with his own steps. All of his power went
into this battle. His mind must be convinced, won over! He, long since, and
ere he had so much as guessed it, had been won over. But even now, Quincy
did not know. While he strove to force his intellect into compliance, he
believed himself merely in process of thinking out his problem. The
struggle to bend his mind to the way of his soul came to him merely as the
mechanics of deliberation. Long ago, Quincy was decided. There remained,
now, only to propitiate his mind. And this paltry afterlude assumed within
him the dimensions of the whole. He would perhaps have called it “making
up his mind.” He did not dream that this was an act of kindly reconciliation
—the winning over of an un-needed minority in whose dissent lay, at the
worst, a source of irritation.
But mind holds the channels of our consciousness—controls the self’s
publicity. And from this not inconsiderable power, it has built up a prestige
for itself. It delays the announcement of any state until it has been
approached; and then, it so gives out the news that its consent seems
necessary, not for the mere announcement through its channels, but for the
state itself. And so, the mind’s acknowledgment—often a hard-wrung effort
to make it face a long accomplished fact—seems a protagonist where it is
naught but a chorus, commissioned to explain and to chime in.
The real decision, then, impelling Quincy homeward, was not an affair
of words or of deliberation. It had been born in that deep land of him that is
never heard save through its far remote ambassadors. It had been born of
that will which does not argue, which makes its indomitable revelation and
then subsides, while its deed runs subtly through innumerable channels to
the outer lands. Here then, takes place the clash of denial and of argument.
Within, there is the serenity of fate. But if Quincy’s recognition was to
come only within the shadow of his goal, it was none the less acute for the
delay. However wrong was his belief that, in this struggle of deliberation
which held him now, lay the finality of what he was to do, by means of it he
at least came to understand.
As he walked, he thought of life as it would be, if he did not return. At
once, he had the picture of it, uncensored by the least knowledge of reality.
He saw himself living in a miraculous family, a group of persons who
would respect him, leave him alone, and welcome with attentive eagerness
his least advance. Of course, out of his graciousness, he did advance, at
times. This family knew his worth and felt his tragedy. Under their roof he
grew and his powers spread. And his life became one of great service. But
of pleasure, there was little. He kept to himself, nursing his delicious
sorrow, a beneficent knight-errant, with the bleeding soul of a recluse. But
gradually, the edifice of his good deeds rose into view. And at last, it came
within the ken of those that had driven him away. Partly through age, his
parents’ hair would by now be white; mostly, however, through remorse.
All of his old family, in heroic resolution, had shouldered the guilt for his
departure. And now, he returned to them, magnanimous, loving, and
forgave them. He kissed his father’s wrinkled face down which tears of
contrition fell. Rhoda also was there—husbandless, somehow, chastened,
eyes soft with the wish to be accepted. And he went up to her, and took first
her hands and then, her head, and gave forgiveness. With her came the
others—respectful, humbled, yearning toward him. (His mother was not in
the picture. But he was unaware of this.) He exacted no punishment; he said
no word of sorrowful reminder. He threw open his arms for all and took
them in. And there was happiness.
Here was a roseate arrangement; and yet, to Quincy, one certain of
accomplishment, if only he would face about. But he walked on. Why?
He saw his family, coldly, clearly, in the event of his return. He read the
added sneer of their lips, the arching of brows that meant indulgence for
one who was hopelessly foolish and incompetent. He saw the wrath of his
father at this new turn on his dignity which he had played him; the knowing
whistle of Marsden, discounting childish weakness; the sharp unconcern of
Rhoda, not honoring his adventure even with contempt. And he dramatized
for himself the sensations of his mother. She would be glad to have him
back—oh, yes! But how little she would understand! To her, his going
would seem an escapade luckily done with—a spurt of temper, subsiding
fortunately. She would think thus:
“Quincy was naughty. But thank God, he thought better of it. Thank
God, he was too weak to turn naughtiness into badness. Quincy was too
much of a child to do real injury to me. Thank God, for Quincy’s
childishness!”
In her regard, as in that of all the others, he would have lost. His return
would mean the sacrifice of those few considerations which he had
somehow won. It would mark a new depth for his inferiority, forge a new
weapon for tyranny and contempt and misconstruction. To stay away meant
a path of glory. To return meant skulking back into a cell made dingier and
poorer for him in his absence. And in his act, no single one of them would
see aught but a lack of will, a dearth of spirit, a sickly fall. And yet, in this
direction went his feet!
No tinge of cowardice was there. Quincy knew too little of the world to
be afraid of it, to hesitate in choice between his home that he did know, and
it. His going-out had been the irresistible plunge of a long propped-up
weight, rushing toward the goal of its momentum. In his return—if return
he did—there was no falling; rather, a laborious, painful urging back against
the sweep of that momentum. The one way, craned his thoughts and his
ambition. The way he went, a voice he did not recognize or know of, had
sent a syllable.
But now, he came to feel its nature. The words of the man had been wise
words indeed. That was perhaps a reason for defeating them. They had
singled out the fact of mother, and there dwelt. And though Quincy was
inclined to think him right, these very words had inspired within him a
protest of antithesis. His mother! Was the man wrong in his uncanny
penetration? What had she helped him? How sustained him? how really
served to protect him? Her love was real enough. But was it not a sickly,
swaying plant—roots spread too wide for clinging, leaves thrust too close
within the shadow of others, to have the sun? What did he owe her? Was
her love not in its essence selfish, weakly? Did it not subsist on tears and
sterile moments? Could he conceive of living on such sustenance, of
mounting with such feeble help?
The man had been right. Quincy’s mind agreed. But Quincy in each step
proved that both man and mind were wrong. For Quincy was going back to
this discredited mother. Mentally, he nullified her and discarded her.
Always, she stood there, with outstretched arms, as he rushed toward her.
He thought he knew the formula of her tears, yet they ate deep in him. He
thought he knew the grammar of her words; yet they commanded him.
Quincy was learning.
And now, the Park was behind him. The adventure stood at its climax.
And if there be gods who cease at times their celestial indifference, when
the gleam of a real heroism smarts in their dull eyes from earth, they were
now watching Quincy. Learn the book of life and the nature of the heroic
becomes plain. It is the deliberate negation of what is sense and rote, of that
which the interminable average makes life; it is the disavowal of all laws,
the compliance with what is but a shadow, a shred, and a suggestion. It is
the leaning on an instant and the despising of all time. It is the paradoxical
resolve to prove a spot of star greater and wider and more important than
the mass of earth. It is the truth. And it is even more, for it is the acting on
it.
Quincy knew to what he was returning. He knew that no soul within the
house would feel the power of his temptation to stay away, though it meant
starving. He knew that she for whom he walked back into the shambles
would translate his deed to fit in her own petty scope and wishes and
perturbations. He knew the utter vainness of his act for his own self; the
bitter fruit that it must bear; the insufferable slur that it would cast upon his
fine rush for freedom.
For a moment, he paused, lost in a cloud almost of extinction. And then,
something put force upon his finger. And his finger pressed the bell....
XII
It may have been his mother, the net of impulse which she spun, that swept
Quincy home. But in his act, spontaneously sprang to knowledge a new
state—the sense of challenge. Indeed, the smouldering, grim awareness
deep within him that he had a right to home, a right there to remain and
make demands, had lain upon his mind since the beginning. It had been co-
ordinate there with the sentiments that drove him back. It had, at that outset,
been a sentiment itself, rather than a conviction shot through with thought.
It had been leaven to his strong emotions and had made active the
unarguing voice which ordered his return. But in that period of germination
and later, carrying-out, this sense of challenge was at best subliminal. He
could not have quoted a program by it; he could not have numbered his
rights or his capacities for claiming them. This was a later birth—the
coming into consciousness of this. But as his finger pressed the bell, and the
moment stood before him in all its painful nudity, a great shock went
through Quincy. And with it, Quincy’s sense of challenge grew articulate.
All of his powers needed at such a moment to be summoned. All of his
weapons he needed in his hands. And what was more, he needed not merely
to find them there, but a conscious grasping them and a sharp perfection.
Else, he had foundered. And so, in this general calling forth to arms, to
service, of whatever lay within him, this sense emerged. He felt a state of
right; he knew an order of demands. The door opening for him, there was
Challenge in place of Sacrifice, as he stepped inside.

The door was opened by his father. He was in his vest. By this sure sign,
Quincy learned that he had been anxious. For Josiah always gave way to
worry by taking off his coat. But Quincy did not guess the nature of his
concern. It would not have flattered him. He saw his father’s face, cold,
solemn, bitterly relieved, who stood there, slightly to one side, waiting for
words. Quincy met his arrogant gaze an instant. He felt that he had given
answer, in his own expression. Spontaneously, he stepped past and went up
the stairs.
The door to the sitting room was open. He felt behind him the astounded
figure of his father still near the door, too outraged to act. Within the sitting
room, ere he was on a level to look in, he felt the congregated presence of
the others. Their mood seemed one with the cold gleam they sat in, and
which reached him from above as he marched up the stairs. He turned down
the hall. It was darkened. It gave accent to the light of the room where now
he saw the others. There was a piercing note to his walking through that
narrow, darkened passage, braving the glare where they were, in order to
pass them and mount higher. His mother stood in the threshold. She called
forth his name. And then, rushing into the hall, she caught him up.
He gave way to her warm, silent arms. He allowed himself gladly to be
pressed and kissed and strained against her. For a moment, challenge went
down.
And then, holding him at arm’s length, she looked at him with
questioning eyes. Within, the others sat, mutely, coldly, interested.
“Why did you run away, Quincy?” his mother asked.
The boy was hurled back upon himself.
He felt the curious attention of those others within the room. Their
almost perceptible craning forward to catch his answer ate like acid into his
heart. Below, he heard his father’s steps approaching;—approaching, it
seemed to Quincy, in order to complete the audience. And he the spectacle
—he the victim, while his mother served to show him through his paces!
Why was she so cruelly stupid? Why must she have asked that searing
question? Why could she not have understood how he yearned really to
answer it for her, how her asking it now—under such conditions, before
these!—made that answer vain, and his desire a mockery? Her embraces
given without calculation, had been better. Then, for the moment, she had
been on his side—been as he wanted her. But now, she had fallen over. She
might not have meant it. But did her ignorance allay his pain—bring back
to life the sweet impulse she had killed? She was serving them, siding with
them; and through her hold and his expectancy of better, proving the worst
of them all!
He hated her for it. He hated her for her stupidity; and for the love he
bore her. He hated her for the hope she had, one moment gone, inspired in
him....
He shoved her aside and rushed upstairs—all of the scene, she, they of
the sitting room, his father, like a wide burn upon his brain.
As he reached his room, he heard her sob. And for her suffering, as he
flung himself upon his bed, he hated her the more.
PART TWO
I
The fall of his eighteenth birthday, Quincy went to college. He had
completed his examinations in June; and he had passed them with a single
deficiency. Although his college was out-of-town, these hours of trial had
been set in the city—in a vast, cold gymnasium filled with little stubby
tables and larded with apparatus that in their similarity to instruments of
torture seemed appropriate enough. Here he sat, weighed down with the
stupid sense of the authority about him. He had gazed at the printed slips
with their silly, circumscribed demands upon his knowledge and been
impressed with the irrelevance of higher education. In one instance, he had
been impressed too well. He had failed. And for the purpose of passing off
this failure, he had now to start from home two days before the beginning of
the term.
He took his leave in the sitting room. The family had just returned from
the country. The room was still muffled in camphor draperies and grey-blue
covers. There were no curtains. And the cleaning to which the sedulous
Sarah had subjected it had robbed the room of the one glow of ease and
warmth it might have kept—the dusty deposits of the summer. The room,
then, was cold and harsh. The table shone out with its bare mahogany red.
All else was under the protective cloths.
Quincy came down, suit-case in hand. Upstairs, he had applied the last
minute attentions, putting off the ultimate plunge with a zealous mania for
details, much as a diver sticks his toe into the water. Thrice he had locked
his suit-case and reopened it—to brush his hair again, to take out a letter of
announcement for the Dean, to see if aught was missing. Long he looked at
himself in the mirror, adjusting his fresh collar and his tie. Then he
unfastened his silver watch from its leather chain and placed it before him
on the bureau for constant consultation. Changing his mind, fearful lest he
forget it, he replaced it in his pocket. This also, made him nervous. He
wished to track the lapse of time. So once again, the watch was out before
him. He wondered if his watch was right. It was really too early to leave for
the train. But perhaps it was five minutes later than he thought. In a trice, he
had convinced himself of this imagining,—was ready to act upon it. He
flung on his coat, strapped his suit-case and made for the stairs. He
descended, clumsily, conscious of his feet.
He placed his suit-case in the hall and entered the room, where his
mother and Adelaide were seated.
“Well, is it time to go?” his mother spoke. “Or can you sit down a few
minutes?”
“I’m afraid not, Mama.” The boy shifted nervously from foot to foot.
With this Adelaide got up.
“Have you room for this in your valise?” she asked, handing him a tidily
wrapped box.
Quincy reached out his hand. “What is it?”
“Oh, I thought—perhaps—” she faltered, “now you are to be a college
man—you might want to smoke.” There was a pause. “It is a tin of
cigarettes.”
“Child! Why put the idea into his head?” cried Sarah.
“I had the idea before,” Quincy retorted. And then, he thanked his sister
who stood expectant, not yet knowing whether she had done a thing
extremely felicitous or awkward.
“Even if I don’t smoke there’ll be plenty of the boys who will,” was his
colorless observation. He slipped the box into his pocket.
“Good-bye, Quincy, and good luck.” Adelaide kissed him. “And don’t
get homesick.”
“Homesick? No chance!”
Sarah took his head in her hands. “Won’t you get a little homesick for
me, dear—just once in a while?”
At this, Quincy smiled. He preferred it. Yet of the two, his sister’s had
been the selfless remark.
He kissed them both—unostentatiously, though both longed to linger
with his dark, serious head beside their own. Both of these women loved
him. Yet, at the time, they were no more than momentary details on his path
—obstructions of no import on his vision. So he drew his head away from
their hands and lips as quickly as he could. And then, stung triflingly by
conscience at the fact that he had done just this, he stepped back, half-way
across the room, kissed them again, saw the gleam of tears in their eyes, and
sturdily marched out.
“Don’t come downstairs!”
But they stepped after him. Adelaide helped him on with his new coat.
His mother gave a loving brush to his new hat. And then, Adelaide spoke.
“Oh, Quincy! You’ve fifty minutes yet.” She had espied the parlor clock.
The boy held back, ashamed at his puerile impatience. The girl clapped
her hands with a sudden thought that evidently gave her pleasure.
“I’ll take you to the station, Quincy.”
“No. That’s ridiculous.” He did not want her.
“And why not?” said Sarah. “It’s an excellent idea.”
“Do let me! I’ll just be a minute. I’ll throw on a coat and hat—”
Quincy stood, unable to reject her; lacking the wits for it, yet loathing
this adventitious family concern, clinging upon him on his way to college.
Adelaide dashed upstairs.
“That’s a very good idea,” pondered Sarah. “You’ve lots of time.”
Quincy paced nervously up and down; he was distressed. He did not like
what seemed the significance of this—he did not like the afterthought.
And then an idea came to Sarah that gave her pleasure also.
“Why,” she said, “you might have the machine! I’m sure your father
hasn’t got it.”
“No! No! No!” cried Quincy, heaping on this proposal much of the
vehement denial brought over from the first.
“Why, you silly boy?”
“I don’t want it. I’ll take the car.”
“Nonsense!” Sarah looked uncomprehending, doubting his protest.
Then, she moved toward the telephone.
“Mother,” said Quincy from his position near the door, “I don’t want
your automobile. Do you hear? If you call for it, I’ll not take it. I’ll not take
it, even if it should come this very minute.”
Sarah paused.
“You’re a very ungracious boy,” she said slowly.
His face turned pale, with a white fire.
“Oh, am I?—Very well, then—.” He grasped his suit-case. Thrusting his
hat low over his eyes, he dashed away.
Adelaide returned to the head of the stairs. A cozy rough wool coat was
close against her body; a brown cloth hat clustered with strawberries was
atilt over her wavy hair. She saw her mother standing alone near the open
door.
“Has he gone?” she said.
Sarah sighed. “The usual Quincy—”
And as she went on, Adelaide descended. “I offered him the car and he
flew into a passion—into a passion, and out of the house. Oh! Oh!”
Now Adelaide was beside her.
“One would think, the way he acts, we didn’t love him.”
“We don’t love him right, Mama,” the girl spoke calmly and threw off
her coat.
Sarah turned on her with anger: “How dare you say that? What’s wrong
with you now? What do you mean?”
“Well, it’s true. And he feels it.”
All of Sarah’s suppressed emotion turned on her daughter.
“Didn’t I offer him the machine, out of consideration?” she cried with a
rasp in her voice.
“Yes—at the last minute. For a guest, you’d have thought of it two hours
ago.”
“Well, what about your suggestion. When did you think of offering to go
with him?”
“At the last minute, also, Mama.”
“And does that prove you don’t love him?”
“I didn’t say that.”
“Does that prove you don’t love him enough?”
“I didn’t say that either.”
Sarah threw out her arms in a gesture of bewilderment.
“I said we didn’t love him right,” Adelaide continued.
Sarah gazed in silence at her daughter. She was awed by the conciseness
of the answer, however little she understood it. Then, fronting her, she put
her question.
“Why?”
The girl shook her head.
“It’s not our fault. It’s in the house. It’s the spirit here. I can’t explain.
But you should understand. We can’t help it. But he feels it. Yes,—he feels
it.”
She stopped and the two women were still. Both of them were looking
far, vaguely, beyond the open door.
“He’s gone, now,” said Sarah.

II
The morning of Quincy’s departure, it had rained. Then, it had cleared. To
the plashy gloom of an autumn storm succeeded a sudden cheer of Indian
Summer. When, in his “usual” manner, the boy dashed from the house, the
sky was a shrill blue shredded with fragile clouds. And below foot, were
still the puddles and grey odors of the rain.
Filled with a painful, pleasurable sense of having been unjust, Quincy
boarded a car at the corner. Then he alighted. There was so much time, he
had decided to walk from the place of transfer—a trifling journey.
In the car his thoughts had been at once intensely personal and inchoate.
He was thinking back. He resolved to write his mother an affectionate letter
of apology. Yes: he would write to Adelaide as well. He had not wanted to
bother them. Many a time, they had made him feel—oh, perhaps not these
two, but they—how little it was wise to bother them. He was going to a new
life. He wished to start on it, alone. There was no reason in not cutting
clean, when cut one had to. His last thought gave him pause. He was going
to a new life. A new life. Life....
The car clanked and screeched, the braked wheels slid—to a halt; the
conductor bawled out the place of transfer.
Quincy was suddenly aware only of the pungent dampness in the car. He
pushed his way to the platform, clumsily. But what hindered him was solely
the fact of his suit-case. He stepped down—into a wide, flat puddle. And he
was piqued, only because his shoes were freshly shined. He righted himself,
waiting for a safe chance to cross. With his thoughts had come the need of
moving. And this had stopped his thoughts. He stood midway in the
sopping thoroughfare with the sun’s glad drench above his head. The new
life began.

He heard the voices. The starting, clanking, abruptly halted cars that
swung with groan of wood and iron. The darting flash of wagons, brittle
and uproarious of wheel over the asphalt’s crevices or the weave of tracks.
The heavier trucks, plunging along with perched, gesticulating drivers, that
gave forth their rumble like a flood of undertone shot through with lighter
notes. The dull-rhythmed matrix—the crowd’s shuffle—wherein the
metallic urge of cars, the tangent flurries of light wheels, the impress of
thick masses glowed and hummed and pounded while the air swung
response. And through it all, catching it up, knitting it together, the web—
the web whereof now Quincy grew aware. For it was none of these: not the
traffic’s voice, not the crowd’s shuffle. It was the crowd itself.
Everywhere—interminably movemented, yet inexorably fixed. The base,
the weave, the limits of this cacophony. The web, gapped solitarily by the
air—and air that stifled, died within the web’s cloying interstices.
The crowd closed on Quincy’s heart. And Quincy felt the crowd. He
grasped his burden tightly, and pushed ahead. But meantime, and for the
first time, he was a-feel with this new substance. What it gave him went to
all the senses. It was a sharp, quick taste that drew and a pungent odor that
clouded eyes. It was subtle and it was slight. Yet, once impinged upon his
being, it remained. And now, he recognized it:—
A desire not to go on—a yearning to cease altogether. A weariness,
which in its scope was cosmic, yet in its application seemed almost not to
be!
Still, the boy’s energies pricked him on. There was no tremor of
hesitation in his walk or in his face. But it was as if the spirit that had forged
these energies by which he was now acting, had flickered out. As the light
of a star, after the star has died, pierces through space uncaring, so it
seemed that Quincy pursued his goal, with his source gone. All this about
him seemed to have sapped his soul. It was all so huge and crass and
crushing. It cared so little for him. He was a particle within it, too light to
sink, too heavy to ascend.
The crowd. And the boy on his way to college.
He had not reckoned on this thing. He had lived within it all of his life.
Yet, until this moment, it had been as remote as non-existence. Now, ere he
knew how, it was at work upon him. And already, he was weary!
Quincy knew enough—just enough—to be horrified at this; to feel the
fitness of a venturing spirit, eager, elastic, for a beginning; and to grow sick
at the lack. He did not know enough even to blame the crowd. Nor did he
know that the glad face and joyous limbs of the pioneer are figments of
fable-weaving; that the mood of the morning is ever a grim facing forward
against the soul’s pull backward; and that he shared this weariness that so
distressed him with most men who, aching of sinew and sick of heart, go
out and win.
An impulse murmured to go back. He crushed it. Back, there was all he
yearned to overcome. The impulse which made it preferable to the
unknown filled him with shame. He had not been this shirker, two years
past. He trudged on. Before him, was much unknown, but one thing certain
—Struggle. As he envisaged this, a part of Quincy blanched. It was not
because he feared; because he lacked daring for pain or for discomfort.
Both of these lay behind him. He thought, and rightly, to have sounded
them. What was unbearable in the future was the struggle, the exertion.
Whatever the fruit of it, with struggle the price seemed vain. Whatever the
bitter emptiness he left behind, since he could lie still and without deeds,
seemed welcome. While the world shrieked about him, horrible in its
clangor of steel and its dull delirium of feet, Quincy was filled with the
desire to share nothing with it, to cut loose, aloof, to cast out whatever
element he might conceal in common.
He was weary because this crowd seemed tireless; he craved peace
because it breathed out conflict; he longed for abnegation, though it was
failure, since the crowd was as it was, with its attainment. Subreptively,
unformed, the desire stirred within him, if this hideous pervasion was life,
for non-existence.
And then, he thrust that from him, also. For though the source seemed
cold, the light was flashing forth. Clearly, he knew that he did not court the
future; that he would fain have gone from his past into a region without
measure. But none the less, he had reached the station. While his soul
yearned for a state without time, his eyes had seen the clock and his brain
grasped that it was later than he had surmised. While his soul longed for an
endless truce to goal and striving, he had doubled his pace so as not to miss
his train. And with his heart set against any sequel whatsoever, he had
bought a ticket for the immediate future!
The crowds swirled in eddies and great streams to the narrow gates that
sucked them in. The vibrance of movement and adventure hummed in the
air. The incense of man’s activity reached his nostrils. He, also, was caught
up. His feet carried him down the throbbing passage. The long, silent train
lay out like a mystery, beyond his sight. There was a Song in this
commotion; a Promise in these steps....
Quincy caught hold of the platform bar. And a lithe, eager body swung
aboard the train.

III
Quincy found one of the last seats. A string of cars at the rear had not been
opened. By this means, the astute Company packed its patrons
economically and, as the traffic overflowed, opened another car. The boy
made himself at ease by the window. He hoped fervently that no one would
come beside him. But especially, he hoped that no one of the other fellows
whom he saw grouped and chatting in the corridor, on the platform, would
be his neighbor, if neighbor he must have. Quincy feared that with one of
these there would be danger of a conversation. And he feared that. He
feared it, because he felt that he should have things in common with his
prospective mates. And he had none—that he could think of.
Greatly to his relief, then, just as the filled train glided into motion, a
huge man with a great black slouch hat, sat down beside him.
Quincy gazed steadily out of the window. He half observed his neighbor
open a leather case, draw from it a batch of pamphlets and proceed, quietly,
unflaggingly, to go through them. They were well on their way before the
boy’s interest made him turn for a look at the nature of these pamphlets.
The big man had placed all of them back in his case, save the one he was
reading. This one he held close, vertically, before his face so that Quincy
could not possibly have seen its subject. He did remark, however, that this
man must be very near-sighted. Then he looked at him more keenly. Could
it be that he was a professor? His bad eyes and his portfolio seemed proof.
But his huge, strong body and his western hat belied it. The man had a
strong, yet gentle face. All of his features were large, yet all of them were
soft in an harmonious expression. As he read, he bit nervously at his lips.
His massive, fleshy hands clutched periodically at the fragile paper,
rumpling it. His nostrils distended as he took breath.
And then, of a sudden, as Quincy looked, the man turned from his
reading and their gaze met. The boy was embarrassed. He wished to look
away. But the big brown smile in the man’s eyes held his.
“This your first year?”
“Yes, sir.” He wished to ask whether “freshman” was really writ so large
upon him. But instead, he smiled rather sheepishly.
“This paper,” the man went on, talking with a free confidence, “is so
stupid, that if I go on reading it, I shall be ill-humored by the time I reach
home.” He placed it, face-downward, on his lap.
“M-may I see what it is?” Quincy stammered.
The man broke into a hearty laughter that sounded liquid above the rush
of the train.
“Oh! Oh!” he said, “after what I’ve said of it, it would scarcely be
discreet—would it, now? You see, it’s by a colleague.” He seemed to leave
the verdict to Quincy.
“Excuse me. I—I didn’t know.”
“You agree, then?” asked the man.
“I certainly do,” replied Quincy with conviction.
“Good!” And this paper also, was thrust back with the others. There was
a pause. Then, he continued: “I’ll tell you, however, generally, what it was
that I found stupid. It was one of those ‘common-sense’ ideas. They’re
usually stupid. This is a paper on education. It talks chiefly of teaching
rules.”
“Yes?” asked the boy, awaiting more.
“Well—isn’t that enough? Can you imagine anything more stupid and
less educational than teaching rules?”
Quincy beamed with amazement. “You really think that?”
“Have rules ever done you any good,” went on the professor; “any rules
except such as you dug out for yourself? What’s a good rule on a false
basis? And what’s the use of any rule at all, if the right thing’s underneath?
Do you have to teach a rule to a tree to make it grow—or to a ball to make
it fall? If we build up from a right basis, the rest—the right rule—must
follow by mathematical law. Isn’t that reasonable? And if, with a true
foundation, the rules an individual derives clash with the rules accepted,—
why the accepted rules are simply wrong. I think, to tell you the truth, that
we all teach rules the way the good-hearted practice charity—to overcome
with an act what has grown wrong from the bottom up.”
“I’m glad to hear you talk that way,” replied the boy. “It seems strange.”
The man laughed.
“Do you—” Quincy hesitated,—“Are you a—teacher?”
“My name is Deering.”
“Not Professor Lawrence Deering!” Quincy demanded. The other
nodded.
So this was the famous Professor Deering. “Oh! And you teach that way
yourself?”
“I try to. But it’s hard in an institution that doesn’t agree with you. Hard
also, with products so nearly finished as—say—you are. I should have gone
in for kindergartening.”
What an open candor this was, thought Quincy, from a great man to an
unknown boy! From this moment of realization, he would have gone far
and suffered much for Professor Deering. Then it occurred to him that since
he knew the professor’s name, he must announce his own.
“My name is Burt—Quincy Burt,” he said.
The great man’s hand went out warmly. “I am glad to know you, Mr.
Burt. I hope you will like your college years.”
“Oh—I’m sure now, I will!”
“You have lots of friends, I suppose, entering with you?”
“None at all,” the boy answered quickly, “I come from a private school
in New York. There were only ten boys in my class. None of them is
coming up here.”
“Then, if I may ask,” the man spoke deferentially, “why are you so
confident that you will enjoy your college course?”
Quincy looked up with feeling, at his questioner.
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.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like