100% found this document useful (2 votes)
9 views

A Guide To Programming in Java Java 2 Platform Standard Edition 5 Beth Brown download

A Guide to Programming in Java is a comprehensive textbook designed for beginners to learn Java programming, emphasizing clear language and practical examples. It includes hands-on reviews, critical-thinking questions, and a variety of exercises to reinforce learning, along with teacher resources for effective instruction. The book covers fundamental programming concepts, problem-solving strategies, and proper coding practices, making it suitable for one or two-term courses without requiring prior programming experience.

Uploaded by

fyhdrgthix
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
9 views

A Guide To Programming in Java Java 2 Platform Standard Edition 5 Beth Brown download

A Guide to Programming in Java is a comprehensive textbook designed for beginners to learn Java programming, emphasizing clear language and practical examples. It includes hands-on reviews, critical-thinking questions, and a variety of exercises to reinforce learning, along with teacher resources for effective instruction. The book covers fundamental programming concepts, problem-solving strategies, and proper coding practices, making it suitable for one or two-term courses without requiring prior programming experience.

Uploaded by

fyhdrgthix
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 73

A Guide To Programming in Java Java 2 Platform

Standard Edition 5 Beth Brown pdf download

https://ebookgate.com/product/a-guide-to-programming-in-java-
java-2-platform-standard-edition-5-beth-brown/

Get Instant Ebook Downloads – Browse at https://ebookgate.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Java 2 micro edition Java in small things James White

https://ebookgate.com/product/java-2-micro-edition-java-in-small-
things-james-white/

ebookgate.com

Programming in Java 2nd edition Edition Choudhary

https://ebookgate.com/product/programming-in-java-2nd-edition-edition-
choudhary/

ebookgate.com

Java 2 A Beginner s Guide 2nd Edition Steven Holzner

https://ebookgate.com/product/java-2-a-beginner-s-guide-2nd-edition-
steven-holzner/

ebookgate.com

Java Programming 8th Edition Joyce Farrell

https://ebookgate.com/product/java-programming-8th-edition-joyce-
farrell/

ebookgate.com
Java Programming 6th Edition Joyce Farrell

https://ebookgate.com/product/java-programming-6th-edition-joyce-
farrell/

ebookgate.com

Google Web Toolkit GWT Java AJAX Programming A Practical


Guide to Google Web Toolkit for Creating AJAX Applications
with Java 1st Ed. Edition Prabhakar Chaganti
https://ebookgate.com/product/google-web-toolkit-gwt-java-ajax-
programming-a-practical-guide-to-google-web-toolkit-for-creating-ajax-
applications-with-java-1st-ed-edition-prabhakar-chaganti/
ebookgate.com

Functional Programming in Java Harnessing the Power Of


Java 8 Lambda Expressions 1st Edition Venkat Subramaniam

https://ebookgate.com/product/functional-programming-in-java-
harnessing-the-power-of-java-8-lambda-expressions-1st-edition-venkat-
subramaniam/
ebookgate.com

Component Development for the Java Platform 1st Edition


Stuart Dabbs Halloway

https://ebookgate.com/product/component-development-for-the-java-
platform-1st-edition-stuart-dabbs-halloway/

ebookgate.com

Pentaho Reporting 3 5 for Java Developers Gorman

https://ebookgate.com/product/pentaho-reporting-3-5-for-java-
developers-gorman/

ebookgate.com
JAVA

A GUIDE TO
PROGRAMMING IN
Java™ 2 Platform Standard Edition 5

Beth Brown
A Guide to Programming
in Java™
Java™ 2 Platform Standard Edition 5

Beth Brown
Copyright 2005
by

First Edition

ISBN 1-58003-071-8 (softcover)


ISBN 1-58003-072-6 (hardcover)
All rights reserved. No part of this work covered by the copyright may be reproduced or used
in any form or by any means—graphic, electronic, or mechanical, including photocopying,
recording, taping, or information storage and retrieval systems—without the written permission
of the publisher, with the exception of programs, which may be entered, stored, and executed
in a computer system, but not reprinted for publication or resold in any other form.

Printed in the United States of America

All orders including educational, Canadian, foreign,


FPO, and APO may be placed by contacting:
Lawrenceville Press, Inc.
P.O. Box 704
Pennington, NJ 08534-0704
(609) 737-1148
(609) 737-8564 fax

This text is available in hardcover and softcover editions.

16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1

The text is written and published by Lawrenceville Press, Inc. and is in no way
connected with the Sun® Corporation.
Sun®, Sun® Microsystems, and Java™ are trademarks or registered trademarks of
Sun Microsystems, Inc. in the United States and other countries.
Microsoft® Microsoft® Windows®, Visual Basic®, and Microsoft® Calculator are
either registered trademarks or trademarks of Microsoft Corporation in the United
States and/or other countries. Screen Shots and Icons reprinted with permission
from Microsoft® Corporation.
Mac OS® and Tiger™ are registered trademarks of Apple Computer, Inc. in the
United States and other countries.
ExamView is a registered trademark of FSCreations, Inc.
“JUNE BUGS” poem by Avis Harley used with permission from Boyds Mills Press.
Names of all other products mentioned herein are used for identification purposes
only and may be trademarks of their respective owners.
Preface

W e have strived to make this the clearest and most comprehensive


Java text available. Our primary objective in this text is to present mate-
rial in clear language with easy to follow examples. To meet this objective,
we use our teaching experiences as well as the feedback, comments, and
suggestions from other experienced instructors to determine how best to
present programming concepts.
For the best classroom experience for both the student and the instructor,
our comprehensive text book includes hands-on reviews, critical-thinking
questions, and exercises of varying difficulty levels. Additionally, our
Teacher Resource Materials correlate directly to the text book and offer
teaching hints for explaining difficult concepts, additional lessons and
exercises, and a comprehensive question bank for creating tests, quizzes,
and reviews. The Teacher Resource Materials include the applications,
Case Studies, and vocabulary from the text book, as well as answers to
all the reviews and exercises.
It is our belief that learning to program offers the student an invaluable
opportunity to develop problem-solving skills. The process of defining a
problem, breaking it down into a series of smaller problems, and finally
writing an application to solve it exercises a student’s logical abilities.
Additionally, the student is made aware of the capabilities and limita-
tions of a computer and soon realizes that the programmer—the human
element—is more important than the machine.
A Guide to Programming in Java is written for a one-term or two-term
course. No previous programming experience is required or assumed. It
is our goal that this text provide students the best possible introduction
to programming using Java and to prepare them for further study in the
IT/programming/computer science field.

Preface iii
Design and Features
Programming Concepts This text emphasizes the fundamental concepts
of programming so that this knowledge can be applied to other program-
ming languages.
Problem Solving From the very beginning, students are taught to imple-
ment programming solutions with proper algorithm design and code
conventions.
Programming Style Throughout the text, proper programming style
is emphasized so that students can make their applications easy to read,
modify, and debug.
Demonstration Applications and Runs Many demonstration applica-
tions are included, complete with sample runs, so that students are shown
both proper programming techniques and the output actually produced
by an application.
Reviews Numerous reviews are presented throughout each chapter to
provide immediate reinforcement of newly learned concepts. Solutions to
the reviews are included on the Teacher Resource Materials CD.
Case Studies Most chapters end by stating a problem, developing an
appropriate algorithm, and then implementing the solution. The process
of specification, design, implementation, and debugging and testing is
clearly outlined.
Chapter Summaries Each chapter ends by summarizing the concepts
and statements covered in the chapter.
Vocabulary Sections Each chapter contains a vocabulary section that
defines new terms. A separate section lists Java keywords, statements,
and classes.
Critical Thinking Written response questions that require critical think-
ing from the student are included at the end of each chapter.
Exercises Each chapter includes a large set of exercises of varying diffi-
culty, making them appropriate for students with a range of abilities. Most
exercises include a demonstration run to help make clear what output is
expected from the student’s application. Exercises based on previous work
are marked with a ö symbol. Answers to the exercises are included on
the Teacher Resource Materials CD.
Indexes In addition to a standard index, an index of the applications
presented in the text is also included.
Appendix A chart of Unicode symbols is included.
Online Resources Materials that complement and extend this text are free
for download and distribution in your class. Information about various
Java compilers is available. Supplemental chapters cover operating systems,
personal finances, introduction to computers, and keyboarding skills are
also provided. Students can download all the files needed to complete the
reviews and exercises from www.lpdatafiles.com.

iv A Guide to Programming in Java


Teacher Resource Materials
Our Teacher Resource Materials correlate directly to the text book and
provide all the additional materials required to offer students an excellent
computer applications course. The Teacher Resource Materials feature:
• START_HERE.htm Help files and a guide for using the text and
resource materials.
• Lesson Plans Lessons in PDF format keyed to the chapters in the
text. Each lesson includes assignments, teaching notes, worksheets,
and additional topics.
• Tutorials Flash movie files that provide animations to illustrate
searching and sorting concepts. Each movie is keyed to the text.
• PowerPoint Presentations Topics keyed to the text are in
PowerPoint files for presentation.
• Vocabulary Word files of the vocabulary presented in the text.
• Rubrics Rubrics keyed to exercises in the text for assessment.
• Worksheets Programming assignments that supplement the exer-
cises in the text provide additional reinforcement of concepts.
• Critical Thinking Answers Answers for the critical thinking
questions presented in the text.
• Data files All the files the student needs to complete the reviews
and exercises in the text, as well as the files needed to complete
the worksheets and tests.
• ExamView® Software Question banks keyed to the text and the
popular ExamView® software are included to create tests, quizzes,
and additional assessment materials.
• Answer files Answers to the reviews, exercises, worksheets, and
tests.

Acknowledgments
Special thanks to the many instructors who used this text in their
classroom as it was being written. I would especially like to thank the
following instructors for their many comments and suggestions:
Paul Massey Hanna-Westside Extension Campus
Edward Sapienza Peabody Veterans Memorial High School
Timothy Strohm Churchville-Chili Senior High School
Jackie Kyger Marine Military Academy
Jan Marrelli, a Lawrenceville Press author and editor, has contributed
much to this text. She has used this text as it was being written in her
classroom. The many comments and suggestions from her and her stu-
dents have helped to make this text so clearly written. Jan, an experienced
instructor, has also written many of the critical thinking questions, exer-
cises, and reviews.

Preface v
Elaine Malfas, senior technical editor at Lawrenceville Press, has pro-
duced the format and layout for this text. The many illustrations have been
created by Elaine as well.
Thanks also to Joseph Dupree in our Customer Relations Department
for some of the original drawings included in this text.
The success of this and all of our texts is due to the efforts of Heidi Crane,
Vice President of Marketing at Lawrenceville Press. Joseph Dupree and
Christina Albanesius run our Customer Relations Department and handle
the thousands of orders we receive in a friendly and efficient manner.
Michael Porter is responsible for the excellent service Lawrenceville Press
offers in the shipping of orders.

About the Author


Beth A. Brown, a Computer Science graduate of Florida Atlantic
University, is director of development at Lawrenceville Press where she
has coauthored a number of programming and applications texts and
their accompanying Teacher Resource Materials. She has taught computer
applications and programming at the high school level.

vi A Guide to Programming in Java


Chapter Expectations

Chapter 1 – An Introduction to Chapter 3 – Introducing Java


Computers After completing Chapter 3, students
After completing Chapter 1, students will be able to:
will be able to: 1. Define terminology associated with object-
1. Compare and contrast various input, output, oriented programming.
and storage devices. 2. Explain why Java is a widely used
2. Identify hardware components and explain programming language.
their function. 3. Create Java applications.
3. Demonstrate knowledge of operating systems. 4. Describe the process involved in executing a
4. Discuss different computer classifications and Java application.
compatibility issues. 5. Display and format program output.
5. Differentiate among the levels of programming 6. Annotate code properly with comments,
languages. formatting, and indentation.
6. Describe communication and networking 7. Explain the importance of using code
components. conventions.
7. Understand the binary number system. 8. Demonstrate algorithm design as a problem-
8. Describe how data is stored in memory and in solving strategy.
files. 9. Use visual organizers to design solutions.
9. Use Internet services to access information and
share resources. Chapter 4 – Variables and Constants
10. Demonstrate proper etiquette and knowledge After completing Chapter 4, students
of acceptable use policies when using a will be able to:
network. 1. Declare and initialize variables and constants
11. Discuss social and ethical issues associated using the appropriate data type.
with computer use. 2. Choose legal identifiers that follow good
programming style.
Chapter 2 – Applets and Web 3. Differentiate between primitive and abstract
Programming data types.
After completing Chapter 2, students 4. Explain how to access Java packages.
will be able to: 5. Demonstrate how to read data from an input
1. Define terminology associated with the World stream.
Wide Web. 6. Write numeric expressions.
2. Discuss the impact of programming on the 7. Apply type casting.
World Wide Web community. 8. Format numeric output.
3. Create HTML documents. 9. Identify Java keywords.
4. Explain how a web browser interprets an 10. Differentiate between syntax and logic errors.
HTML document. 11. Understand run-time exceptions.
5. Use JavaScript to demonstrate how scripts can 12. Read and understand a problem description,
enhance a website. purpose, and goals.
6. Create simple Java applets.
7. Specify custom values for a Java applet that has
been placed in an HTML document.
8. Apply a style sheet to an HTML document.

Preface vii
Chapter 5 – Conditional Control Chapter 8 – Classes and Object-
Structures Oriented Development
After completing Chapter 5, students After completing Chapter 8, students
will be able to: will be able to:
1. Demonstrate the use of decision structures to 1. Understand and instantiate objects.
control the flow of a program. 2. Design and implement a class.
2. Describe how a roundoff error can occur. 3. Apply functional decomposition.
3. Generate random numbers. 4. Apply appropriate naming conventions to a
4. Write compound Boolean expressions. class.
5. Access methods in the Math class. 5. Explain the difference between accessor,
6. Modify existing code. modifier, and helper methods.
7. Develop code with correct and efficient use of 6. Write constructors.
conditional control structures. 7. Compare and contrast instance and class
8. Select appropriate test data. members.
9. Create and modify solutions to problems. 8. Understand class specifications and the
relationships among the classes.
Chapter 6 – Loop Structures and 9. Understand and implement a given class
hierarchy.
Strings 10. Apply encapsulation.
After completing Chapter 6, students
11. Identify reusable code from existing code.
will be able to:
1. Demonstrate the use of repetition control
structures. Chapter 9 – Inheritance and
2. Explain how infinite loops can occur. Polymorphism
3. Differentiate between counters and After completing Chapter 9, students
accumulators. will be able to:
4. Use various tools and techniques to debug an 1. Extend a class using inheritance.
application. 2. Explain an is-a relationship.
5. Manipulate and compare strings using the 3. Implement a subclass.
String class and its methods. 4. Define and demonstrate polymorphism.
6. Develop code with correct and efficient use of 5. Understand abstract classes.
repetitive control structures. 6. Declare and implement an interface.
7. Apply problem solving strategies. 7. Extend existing code using inheritance.

Chapter 7 – Chapter Methods Chapter 10 – Arrays


After completing Chapter 7, students After completing Chapter 10, students
will be able to: will be able to:
1. Use top-down development and procedural 1. Describe types of problems that benefit from
abstraction to develop problem solutions. the use of arrays.
2. Write methods. 2. Create one and two dimensional arrays.
3. Use method parameters. 3. Include array parameters in a method
4. Demonstrate the use of method overloading. declaration.
5. Return values from a method. 4. Understand how to implement arrays with
6. Write appropriate method documentation, meaningful indexes.
including pre- and post-conditions. 5. Apply offset array indexes.
7. Identify boundary cases and generate 6. Manipulate characters in a string.
appropriate test data. 7. Understand the digital code, Unicode.
8. Describe code conventions that apply to 8. Apply search algorithms to an array.
methods. 9. Use methods in the ArrayList class.
10. Demonstrate the use of the Wrapper classes.

viii A Guide to Programming in Java


Chapter 11 – GUIS and Event-Driven Chapter 14 – Data Structures
Programming After completing Chapter 14, students
After completing Chapter 11, students will be able to:
will be able to: 1. Explain how data structures, such as stacks
1. Design graphical user interfaces. and queues, can be used to organize data.
2. Use component classes in the Java swing 2. Use and implement well known data
package. structures.
3. Create event-driven applications. 3. Describe standard operations associated with
data structures.
4. Control the layout of an interface using layout
managers. 4. Choose appropriate data structures.
5. Use text fields and combo boxes to obtain user 5. Differentiate between a LIFO and FIFO
input. structure.
6. Apply color and add images to an interface.

Chapter 12 – Files and Exception


Handling
After completing Chapter 12, students
will be able to:
1. Use the File class to create objects that
represent a file.
2. Write exception handlers.
3. Understand file streams.
4. Read the contents of an existing file.
5. Process numeric data.
6. Create an output file stream.
7. Explain the object serialization and
deserialization processes.

Chapter 13 – Recursion and


Advanced Algorithms
After completing Chapter 13, students
will be able to:
1. Implement the selection sort algorithms.
2. Sort objects using the Comparable interface.
3. Implement the insertion sort algorithm.
4. Define and demonstrate recursion.
5. Implement the mergesort algorithm.
6. Implement the binary search algorithm.
7. Explain the recursive technique, depth-first
searching.
8. Analyze algorithms for efficiency.
9. Design and document sequential search
algorithms.

Preface ix
x A Guide to Programming in Java
Table of Contents

Chapter 1 – An Introduction to Chapter 2 – Applets and Web


Computers Programming
Desktop Computing .................................................1 The World Wide Web.............................................. 35
Operating Systems and Environment ....................2 HTML ...................................................................... 36
Mobile Computing ....................................................4 Creating an HTML Document .............................. 37
Programming Languages ........................................5 Review: hello_world.htm .................................. 38
Networks .................................................................... 6 Review: Computer Viruses Website –
Number Systems .......................................................9 part 1 of 6 ............................................................. 38
Storing Data in Memory ........................................ 10 JavaScript .................................................................. 38
What is a File? ......................................................... 11 Review: welcome.htm........................................ 39
Storage Devices........................................................ 12 Review: Computer Viruses Website –
Intranet, Extranet, Internet .................................... 13 part 2 of 6 ............................................................. 39
Telecommunications ............................................... 14 Using Scripts to Enhance a Website ..................... 40
Internet Services: Web, E-mail, and Review: Computer Viruses Website –
Mailing Lists ............................................................ 15 part 3 of 6 ............................................................. 41
Finding Information on the Web and Review: System Check – part 1 of 2 ................. 41
Downloading Files .................................................. 16 Java Applets ............................................................. 41
Internet Privacy Issues ........................................... 18 Creating Java Applets ............................................. 41
Internet Acceptable Use Policy ............................. 19 Drawing Shapes and Adding Color .....................43
The Social and Ethical Implications of Review: Hot Air Balloon ...................................44
Computer Use .......................................................... 19 Placing an Applet in an HTML Document ........44
Protecting Computer Software and Data ............ 20 Applet Parameters ..................................................44
The Ethical Responsibilities of an IT Review: System Check – part 2 of 2 ................. 45
Professional ..............................................................22 HTML Tags .............................................................. 45
Chapter Summary ..................................................22 Review: Computer Viruses Website –
Vocabulary ............................................................... 25 part 4 of 6 ............................................................. 47
Review Questions ................................................... 29 Hyperlinks, Tables, and Images ............................ 47
Exercises ................................................................... 32 Review: Computer Viruses Website –
part 5 of 6 ............................................................. 49
Style Sheets .............................................................. 49
Review: Computer Viruses Website –
part 6 of 6 ............................................................. 51
Chapter Summary .................................................. 51
Vocabulary ............................................................... 53
HTML Tags ..............................................................54
Critical Thinking ..................................................... 55
Exercises ................................................................... 56

Table of Contents xi
Chapter 3 – Introducing Java Chapter 5 – Conditional Control
Why Program in Java? ............................................ 59 Structures
Objects, Classes, and Packages ............................. 59
The if Statement ..................................................... 105
A Java Application .................................................. 61
Roundoff Error ...................................................... 106
Executing a Java Application ................................. 62
Review: SurfsUp – part 1 of 3 ......................... 106
Review: Greeting................................................ 62
The if-else Statement............................................. 106
Displaying Output ..................................................63
Review: SurfsUp – part 2 of 3 ......................... 107
Review: AboutMe – part 1 of 2 .........................64
Review: CircleCircumference – part 2 of 2... 107
Formatting Output..................................................64
Nested Statements ................................................. 107
Review: AboutMe – part 2 of 2 .........................65
Review: Stages .................................................. 107
Code Conventions ...................................................65
The if-else if Statement ......................................... 108
Algorithm Design ................................................... 66
Review: SurfsUp – part 3 of 3 ......................... 108
Chapter Summary .................................................. 67
Review: Discriminant...................................... 108
Vocabulary ............................................................... 69
The switch Statement............................................ 109
Java ............................................................................ 70
Review: Hurricane ........................................... 110
Critical Thinking ..................................................... 71
Generating Random Numbers ............................ 110
Exercises ................................................................... 72
Review: RandomNum ..................................... 111
Compound Boolean Expressions ........................ 112
Review: Delivery .............................................. 113
Chapter 4 – Variables and The Math Class ...................................................... 113
Review: PerfectSquare ..................................... 114
Constants Chapter 5 Case Study ........................................... 114
Declaring Variables.................................................77 Review: RPS – part 1 of 2 ................................ 118
Using Variables ........................................................ 78 Review: RPS – part 2 of 2 ................................ 118
Review: RectanglePerimeter............................. 79 Chapter Summary ................................................ 119
Primitive Data Types .............................................. 79 Vocabulary ............................................................. 120
Review: Distance – part 1 of 2 .......................... 79 Java .......................................................................... 121
Abstract Data Types ................................................80 Critical Thinking ................................................... 122
Java Packages ...........................................................80 Exercises ................................................................. 123
Obtaining a Value from the User .......................... 81
Review: Distance – part 2 of 2 .......................... 82
Numeric Expressions..............................................83
Review: Digits.....................................................84
Chapter 6 – Loop Structures and
Type Casting ............................................................84 Strings
Review: GradeAvg – part 1 of 2 .......................85
The while Statement ............................................. 131
Review: TempConverter ....................................85
The do-while Statement ....................................... 131
Formatting Numeric Output ................................. 86
Infinite Loops ........................................................ 132
Assignment Operators ........................................... 86
Review: Prompter ............................................ 133
Review: GradeAvg – part 2 of 2 ....................... 87
Counters and Accumulators................................ 133
Using Named Constants ........................................ 87
Review: Evens ................................................... 134
Identifiers and Keywords ...................................... 88
Review: NumbersSum .................................... 134
Review: CircleCircumference – part 1 of 2..... 88
Review: PercentPassing ................................... 134
Programming Errors .............................................. 88
The for Statement .................................................. 135
Chapter 4 Case Study .............................................90
Review: Factorial .............................................. 136
Chapter Summary .................................................. 93
Review: OddSum ............................................. 136
Vocabulary ............................................................... 95
Debugging Techniques ........................................ 136
Java ............................................................................ 96
Review: Variable Trace .................................... 137
Critical Thinking ..................................................... 97
The String Class .................................................... 138
Exercises ................................................................... 99
Review: AccountSetup .................................... 139
Comparing Strings................................................ 140
Review: FormalGreeting ................................. 141

xii Table of Contents


Chapter 6 Case Study ........................................... 141 Chapter 8 Case Study ........................................... 196
Review: WordGuess ......................................... 146 Review: RPS2 – part 1 of 2 .............................. 202
Chapter Summary ................................................ 146 Review: RPS2 – part 2 of 2 .............................. 202
Vocabulary ............................................................. 148 Chapter Summary ................................................ 202
Java .......................................................................... 148 Vocabulary ............................................................. 204
Critical Thinking ................................................... 149 Java .......................................................................... 205
Exercises ................................................................. 150 Critical Thinking ................................................... 206
Exercises ................................................................. 208

Chapter 7 – Methods
Program Development Using Methods ............. 157
Chapter 9 – Inheritance and
Writing Methods ................................................... 159 Polymorphism
Review: TimeConverter................................... 160
Extending a Class .................................................. 213
Method Parameters............................................... 160
Implementing a Subclass ..................................... 214
Review: SpanishNumbers .............................. 161
Review: Puck – part 1 of 2 ............................... 216
Review: DisplayBox – part 1 of 2 ................... 162
Polymorphism ....................................................... 217
Method Overloading ............................................ 162
Review: Music – part 1 of 2 ............................. 221
Review: DisplayBox – part 2 of 2 ................... 163
Abstract Classes ....................................................222
The return Statement ............................................ 163
Review: Music – part 2 of 2 .............................225
Review: Exponentiation .................................. 164
Interfaces ................................................................225
Documenting Methods ........................................ 164
Review: Disk ..................................................... 227
Review ............................................................... 165
Review: Puck – part 2 of 2 ............................... 227
Chapter 7 Case Study ........................................... 165
Review: Rectangle – part 4 of 4 ...................... 227
Review: GradeConverter ................................. 171
Review: Rectangle – part 4 of 5 ...................... 227
Chapter Summary ................................................ 171
Chapter 9 Case Study ........................................... 227
Vocabulary ............................................................. 173
Review: SalesCenter.........................................234
Java .......................................................................... 173
Chapter Summary ................................................234
Critical Thinking ................................................... 174
Vocabulary ............................................................. 236
Exercises ................................................................. 175
Java .......................................................................... 236
Critical Thinking ................................................... 237
Exercises ................................................................. 238
Chapter 8 – Classes and Object-
Oriented Development
What is an Object? ................................................ 179
Chapter 10 – Arrays
Designing and Writing a Class ........................... 180 Declaring Arrays ................................................... 239
Review: Circle – part 1 of 4 ............................. 182 Using Arrays .......................................................... 240
Review: Coin – part 1 of 2 ............................... 182 Review: StudentRoster .................................... 241
Writing Constructors ............................................ 183 Review: Squares ............................................... 241
Review: Circle – part 2 of 4 ............................. 184 Review: Reverse ............................................... 241
Review: Rectangle – part 1 of 5 ...................... 184 Array Parameters .................................................. 241
Instance and Class Members............................... 184 Arrays with Meaningful Indexes ....................... 242
Review: Circle – part 3 of 4 ............................. 185 Review: DiceRolls – part 1 of 2 ....................... 243
Review: Rectangle – part 2 of 5 ...................... 185 Review: DiceRolls – part 2 of 2 ....................... 243
The Object Class .................................................... 185 Review: NumberCounts.................................. 243
Review: Circle – part 4 of 4 ............................. 187 Characters and Arrays ......................................... 244
Review: Rectangle – part 3 of 5 ...................... 187 Review: CountLetters ...................................... 246
Review: Coin – part 2 of 2 ............................... 187 Review: NameBackwards ............................... 246
Classes Using Classes ........................................... 187 Searching an Array ............................................... 246
Review: Bank .................................................... 191 Review: FindName .......................................... 247
Object-Oriented Development ............................ 191 Two-Dimensional Arrays ..................................... 247
Review: Carnival .............................................. 195 The ArrayList Class .............................................. 252

Table of Contents xiii


Wrapper Classes .................................................... 253 Processing Numeric Data .................................... 316
Review: HighestGrade .................................... 255 Review: Stats – part 1 of 2 ............................... 317
Chapter 10 Case Study ......................................... 255 The FileWriter and BufferedWriter Classes ...... 317
Review: LocalBank .......................................... 264 Review: Stats – part 2 of 2 ............................... 319
Chapter Summary ................................................ 264 Object Serialization ............................................... 319
Vocabulary ............................................................. 265 Review: Roster .................................................. 322
Java .......................................................................... 265 Chapter 12 Case Study ......................................... 323
Critical Thinking ................................................... 266 Review: LocalBank2 ........................................ 328
Exercises ................................................................. 267 Chapter Summary ................................................ 329
Vocabulary .............................................................330
Java ..........................................................................330
Critical Thinking ................................................... 331
Chapter 11 – GUIs and Exercises ................................................................. 332
Event-Driven Programming
What is a GUI? ....................................................... 275
The Swing Package ............................................... 275 Chapter 13 – Recursion and
Review: Name – part 1 of 2 ............................. 278
The JButton Class .................................................. 278
Advanced Algorithms
Handling Events.................................................... 279 Selection Sort ......................................................... 337
Review: Name – part 2 of 2 ............................. 281 Sorting Objects ...................................................... 339
Review: NumClicks ......................................... 281 Review: ArrayListSort ..................................... 341
Controlling Layout ................................................ 281 Insertion Sort ......................................................... 341
Review: Sunflower ...........................................284 Review: ObjectsInsertionSort .........................343
Review: Riddle..................................................284 Recursion ................................................................343
Getting Input from the User ................................ 285 Review: RecursiveFactorial.............................345
Review: DivisibleBy3 ....................................... 287 Mergesort ...............................................................345
Combo Boxes ......................................................... 288 Review: ObjectsMergesort ..............................348
Review: MetricConversion.............................. 290 Binary Search ......................................................... 349
Changing Colors ................................................... 291 Review: SearchLocations ................................ 351
Adding Images ...................................................... 292 Review: ObjectsBinarySearch ........................ 352
Review: Roll ...................................................... 294 Review: BinarySearch2 ................................... 352
Using Nested Classes to Handle Events ............ 295 Depth-First Searching .......................................... 352
Chapter 11 Case Study ......................................... 298 Review: DetectColonies – part 1 of 3............. 356
Review: BreakAPlate .......................................303 Review: DetectColonies – part 2 of 3............. 356
Chapter Summary ................................................304 Review: DetectColonies – part 3 of 3............. 356
Vocabulary .............................................................305 Algorithm Analysis .............................................. 356
Java ..........................................................................306 Chapter Summary ................................................ 357
Critical Thinking ................................................... 307 Vocabulary ............................................................. 358
Exercises .................................................................309 Java .......................................................................... 358
Critical Thinking ................................................... 359
Exercises ................................................................. 361

Chapter 12 – Files and Exception


Handling Chapter 14 – Data Structures
What is a File? ........................................................ 311
The Stack Data Structure ..................................... 365
The File Classes ..................................................... 311
The Stack Class ...................................................... 366
Review: MyFile – part 1 of 2 ........................... 312
Review: Stack2 .................................................. 368
Handling Exceptions ............................................ 312
Review: Stack3 .................................................. 369
Review: MyFile – part 2 of 2 ........................... 313
The Queue Data Structure ................................... 369
The File Streams .................................................... 313
The Queue Class ................................................... 370
The FileReader and BufferedReader Classes .... 314
Review: Queue2................................................ 372
Review: Assignment ........................................ 315
Review: Queue3................................................ 372

xiv Table of Contents


The Linked List Data Structure .......................... 373
The LinkedList Class ............................................ 374
Review: LinkedList – part 1 of 3 .................... 376
Review: LinkedList – part 2 of 3 .................... 376
Review: LinkedList – part 3 of 3 .................... 376
Chapter Summary ................................................ 377
Vocabulary ............................................................. 377
Critical Thinking ................................................... 378
Exercises ................................................................. 379

Appendix A – Unicode
Unicode ................................................................... 381

Index
Index ....................................................................... 383

Table of Contents xv
xvi Table of Contents
Chapter 1
An Introduction to Computers

T his chapter discusses current computing technologies, networks, the


Internet, and the World Wide Web. Issues related to computers, including
privacy, viruses, and copyright are also discussed.

e
Desktop Computing

pl
TIP Desktop computers are
referred to as either PCs or
MACS.
A desktop computer and its components are designed to fit on or under
a desk:

�������
���������
���������������
����������
�������
m
��������
�����

• The physical components of the computer, such as the monitor and


sa

Scanner system unit, are called hardware.


A scanner is an input device • Data and instructions are entered into the computer using input
that uses a laser to create a devices, such as a keyboard, mouse, scanner, microphone, digital
digital image from artwork camera, CD-RW/DVD drive, and disk drive.
such as photos and drawings.
The digitized image can then • A PC becomes much more versatile when peripheral devices, such as
be incorporated into an elec- printers and scanners, are added. A peripheral device is attached
tronic document. to a port on the computer. There are different types of ports, such
as serial, parallel, FireWire, USB, and Bluetooth ports.
• Computers process data into meaningful, useful information.
Processed data is conveyed using output devices. Monitors and
Printers printers display data, CD-RWs, disk drives, and memory keys store
data, and speakers communicate audio output.
A laser printer uses a laser and
toner to generate characters
and graphics on paper. An ink The base unit also contains the motherboard, which is the main circuit
jet printer uses an ink cartridge board. The motherboard contains several components:
to place very small dots of ink
onto paper to create characters
• Expansion boards are circuit boards that connect to the motherboard
and graphics. to add functionality to the computer. Examples include sound
cards and video adapters.

Chapter 1 An Introduction to Computers 1


• The CPU (Central Processing Unit) or processor processes data
Real-time Clock and controls the flow of data between the computer’s other units.
Within the CPU is the ALU (Arithmetic Logic Unit), which can
A battery chip called a real- perform arithmetic and logic operations. It can also make com-
time clock keeps track of the
parisons, which is the basis of the computer’s decision-making
date and time in a computer
even when the computer is power. The ALU is so fast that the time needed to carry out a single
off. addition is measured in nanoseconds (billionths of a second). The
speed at which a CPU can execute instructions is determined by
the computer’s clock rate. The clock rate is measured in megahertz
(MHz, million of cycles per second) or gigahertz (GHz, billion of
cycles per second).
CPU Manufacturers • A bus is a set of circuits that connect the CPU to other components.
Intel and AMD are two proces- The data bus transfers data between the CPU, memory, and other
sor manufacturers. Processors hardware devices on the motherboard. The address bus carries
are identified by a model name memory addresses that indicate where the data is located and
or number, such as Pentium® where the data should go. A control bus carries control signals. All
4, Itanium® 2, and Opteron™. data flows through the CPU:

e
The Intel Pentium 4 (P4) CPU
has a clock rate of 3.06 GHz.
The AMD Opteron CPU has a ����� ������ ������
clock rate of 2.4 GHz. These
CPUs contain more than 40
pl
million transistors on a single
chip.
���

• Memory in the form of integrated circuits (ICs) stores data


electronically. ROM (Read Only Memory) contains the most basic
operating instructions for the computer. The data in ROM is a
m
permanent part of the computer and cannot be changed. RAM
Integrated Circuits (Random Access Memory), also called primary or main memory,
Integrated circuits, also called is memory where data and instructions are stored temporarily.
chips, are created from silicon Data stored in RAM can be written to secondary memory, which
wafers which are etched with includes any type of storage media, such as a floppy disk, hard
intricate circuits and coated disk, memory key, or CD-RW. Secondary memory must be copied
sa

with a metallic oxide to allow


the circuits to conduct elec-
into primary memory before it is processed by the CPU. SRAM
tricity. The silicon wafers are (Static Random Access Memory) is high-speed memory referred
housed in special plastic cases to as cache (pronounced “cash”). This memory is used to store
that have metal pins. The pins frequently used data so that it can be quickly retrieved by an
allow the integrated circuits application.
to be plugged into circuit
boards.
Operating Systems and Environment
A desktop computer also contains programs, or software. Operating
system (OS) software is run automatically when the computer is turned on
and is used to control processing and peripherals, run application soft-
BIOS ware, and control input and output, among other tasks. Desktop operating
system software includes Windows, Mac OS X Tiger, Unix, and Linux.
BIOS (basic input/output sys-
tem) is firmware that contains
Each of these operating systems have different features and functions.
the computer’s start-up instruc- Applications software is written by programmers to perform a specific task,
tions. Firmware is instructions such as a word processor.
or data that is written onto
ROM. The type of OS a computer can run depends on the computer hardware,
and can be multiuser, multiprocessing, multitasking, multithreading, or

2 Chapter 1 An Introduction to Computers


real time. A multiuser OS is supported by mainframes and minicomputers
Mainframes and and allows for two or more users at the same time. The terms multiprocessing
Supercomputers and multitasking are often used interchangeably when referring to an
OS that allows for multiple applications (“processes” or “tasks”) to run
A mainframe is a large
at the same time. This type of OS determines how to divide processor
computer system that supports
multi-user applications and time between running applications. A multiprocessing OS should not be
tasks that require the storage confused with a multiprocessing computer system, which has more than
a n d p r o c e s sin g o f h u g e one processor and performs parallel processing because the processors are
amounts of information. Large used simultaneously for multiprocessing. Multithreading refers to an OS
corporations, airlines, banks, that can execute different parts of a single program, called threads, at the
government agencies, and same time. A real-time OS responds to input immediately. This type of
universities use mainframes.
OS is used in situations where immediate feedback is required, such as
A supercomputer is the fastest navigation systems or medical monitoring equipment.
and most powerful type of
computer. Supercomputers Environment refers to a computer’s hardware and software configura-
focus on executing a few tion. For example, a Windows XP environment means that the computer is
programs as fast as possible running the Windows XP Professional OS software and hardware includes
and are used for weather a 300MHz processor or better, 128MB of RAM or more, and at least 1.5GB

e
forecasting and nuclear energy of hard disk space. The hardware requirements are based on what will
research.
be needed to allow the OS software to properly manage the computer’s
tasks. The term platform is sometimes synonymous with environment.

pl Environment types vary widely and can refer to the computer type or
the way the user interacts with the computer as well as the software/hard-
ware configuration. A desktop environment refers to a desktop or notebook
computer running an OS designed for the typical hardware found in a
desktop or notebook computer. A multiuser environment is sometimes called
time sharing because each user gets a portion of the processor’s “time.”
A distributed environment shares the load of processing among several
computers. When discussing environments, a distinction is usually made
m
between multiprocessing and multitasking. A multiprocessing environment
means that more than one processor is being used for executing an appli-
cation, and a multitasking environment is one in which processing time for
TIP For information on a multiple applications is divided among one processor. Most environments
specific operating system, refer
run an OS with a graphical user interface (GUI):
to the appropriate chapter at
sa

Lvp.com.

Windows XP Operating System

Chapter 1 An Introduction to Computers 3


The functions of an OS are based on the intended OS platform.
Functionality is implemented through utility programs that are written
utility program as part of the OS. A utility program has one clearly defined task, unlike
an application which can usually perform many different tasks. Utility
programs are run by the OS to manage input and output, read and write
to memory, manage the processor, maintain system security, and manage
files and disks. One type of utility program, called a device driver, is needed
for printing, viewing graphics, using a CD/DVD drive, and using periph-
erals in general. Some utility programs load when the computer starts and
memory-resident are called memory-resident because they are always in memory.
Features are added to an OS by incorporating utility programs to per-
form tasks that are in addition to the tasks required to run the computer.
For example, an OS intended for a desktop or notebook environment will
often include utilities for disk defragmentation, text narration and other
accessibility tools, and system restore and backup tools. For example:

e
pl
m
sa

Windows XP Utilities

Mobile Computing
Improved technology has allowed the miniaturization of computer
components and special long-lasting batteries. Computers now come
in many shapes, sizes, and with many levels of features. Among these
Bluetooth computers are notebooks, tablets, handhelds, smart phones, and wearables.
Blueto oth is a wireless Because of their portability, these types of computers are classified as
technology used to allow mobile computing devices:
mobile computing devices to
communicate. • A notebook computer is a portable, lightweight computer with a
CPU, memory, and hard disk space comparable to that of a typical
desktop computer.
• A tablet PC is a computer designed similar to a pad of paper and
a pencil. Users simply “write” on a screen with a device called a
stylus that is shaped like a thin pencil. Handwriting recognition
software is used to interpret a user’s handwriting. A keyboard can
also be attached.

4 Chapter 1 An Introduction to Computers


• Handheld computers, also called PDAs, are palm-sized and contain
Handheld Computers applications for storing contact information, schedules, lists, and
games. Handhelds come with a stylus for input and have a screen
Handheld computer s are that is several inches vertically. Many types of application software
widely used in occupations
have been written for handhelds, including spreadsheets and word
that require constant travel,
such as parcel delivery, meter processors. Some handhelds recognize handwriting, have a built-in
reading, and sales. keyboard, include a cellular phone, and provide Internet access.
• Smartphones are cellular phones that are able to send and receive
e-mail messages and access the Internet. Some smartphones have
digital camera, MP3 player, and color display capabilities.
• Wearable computers vary greatly in size and application. MP3 play-
ers have been incorporated into clothing, and one type of wearable
computer includes voice recognition. Wearable computers are also
in the form of goggles, which incorporate a monitor, digital camera,
ear bud, and microphone. Wrist-top computers are worn like a tra-
ditional wrist watch and work as a pager, provide Internet access,

e
and contain other features usually found in a handheld PC.

cross-platform connectivity One issue involved with using so many types of PCs is cross-platform
connectivity, which is the ability for one type of PC to link to and share
data with a different type of PC. Notebook and desktop PCs typically have

pl good cross-platform connectivity because their file formats can be used on


either computer. Tablets and handhelds use a different OS and generate
different file formats, requiring special hardware and software to use their
files on a desktop or notebook PC. Wearable computers typically have a
cable that allow a connection to other types of PCs, but special software
must be used to communicate between the devices.
m
Programming Languages
A programming language is a set of words, codes, and symbols that allow
a programmer to give instructions to the computer. Many programming
languages exist, each with their own rules, or syntax, for writing these
sa

instructions.
Programming languages can be classified as low-level and high-level
languages. Low-level programming languages include machine language
and assembly language. Machine language, which is referred to as a first
generation programming language, can be used to communicate directly
with the computer. However, it is difficult to program in machine language
because the language consists of 0s and 1s to represent the status of a
switch (0 for off and 1 for on). Assembly language uses the same instruc-
tions and structure as machine language but the programmer is able to
Fourth and Fifth use meaningful names or abbreviations instead of numbers. Assembly
Generation Languages language is referred to as a second generation programming language.
Fourth generation languages
(4GL), such as SQL, have High-level programming languages, which are often referred to as third
higher English-like instructions generation programming languages (3GL), were first developed in the late
than most high-level languages 1950s. High-level programming languages have English-like instructions
and are typically used to access and are easier to use than machine language. High-level programming
databases. Fifth generation languages include Fortran, C, Basic, COBOL, and Pascal. In order for the
languages are used for artificial
computer to understand a program written in a high-level language, pro-
intelligence.
grammers convert the source code into machine language using a compiler
or an interpreter. A compiler is a program that converts an entire program

Chapter 1 An Introduction to Computers 5


interpreter into machine code before the program is executed. An interpreter translates
and executes an instruction before moving on to the next instruction in
the program.
object-oriented programming In the 1980s, object-oriented programming (OOP) evolved out of the need to
better develop complex programs in a systematic, organized approach. The
OOP approach allows programmers to create modules that can be used
over and over again in a variety of programs. These modules contain code
called classes, which group related data and actions. Properly designed
classes encapsulate data to hide the implementation details, are versatile
enough to be extended through inheritance, and give the programmer
options through polymorphism. Object-oriented languages include Java,
C++ and Visual Basic .NET.

Networks
A network is a combination of hardware and software that allows

e
computers to exchange data and share software and devices, such as
printers. Networks are widely used by businesses, universities, and other
organizations because a network:

pl • allows users to reliably share and exchange data


• can reduce costs by sharing devices such as printers
• offers security options including password protection to restrict
access to certain files
• simplifies file management through centralized software updates
and file backups
• provides e-mail for network users
m
Networks are classified by their size, architecture, and topology. A
MAN and HAN common size classifications is LAN (Local-Area Network), which is a
network used to connect devices within a small area such as a building or
A MAN (Metropolitan Area
a campus. A WAN (Wide-Area Network) is used to connect devices over
Network) and a HAN (Home
sa

Area Network) are network large geographical distances. A WAN can be one widespread network or
technologies classified by the it can be a number of LANs linked together.
size of a network. A MAN is a
high-speed network that typi- The computers and other devices in a LAN each contain an expansion
cally connects LANs within a card called a network interface card:
city or town. A HAN is used
to connect personal devices
within the home.

Network interface card

6 Chapter 1 An Introduction to Computers


A cable plugs into the adapter card to connect one device to another to
Transmission Media form a LAN. Cables are not required for network cards that have wireless
capabilities. Network interface cards are available for desktop and mobile
Computers must be con- computers and take various other forms including an adapter card, a PC
nected in order to transmit
card, or a Flash memory card
data between the nodes. Cable
transmission media includes Along with the physical, or hardware, aspects of setting up a network,
twisted-pair wiring, coaxial
there is also the software aspect. A network operating system is software that
cable, and fiber optic cable.
allow users and devices to communicate over the network. A networked
Wireless transmission media environment refers to a set of networked computers running an OS that can
includes infrared signals, handle the communication between the computers. The operating system
broadcast radio, cellular radio,
installed must be capable of supporting networking functions, such as
microwaves, and communica-
tions satellites.
security access features and support for multiple users. Operating systems
capable of network functions are available for Linux, Windows, Unix, and
The amount of data and the Mac. The network architecture, discussed next, must also be considered
speed at which data can travel when choosing a network OS.
over a media is called band-
width, which is measured in Network architecture includes the type of computers on the network and

e
bits per second (bps). Each determines how network resources are handled. Two common models are
transmission media has a spe-
peer-to-peer and client/server. In a peer-to-peer network, each computer on
cific length or range restric-
tion, data transmission rate,
the network is considered equal in terms of responsibilities and resource
and cost. sharing. A client/server network consists of a group of computers, called

pl Ethernet
clients, connected to a server. A server is a computer with more RAM, a
larger hard disk, and sometimes multiple CPUs that is used to manage
network functions.
Physical topology refers to the arrangement of the nodes on a network.
A node is a location on the network with a device capable of processing
information, such as a computer or a printer. There are three common
physical topologies:
m
The Ethernet LAN protocol was
• The bus topology is a physical LAN topology that uses a single cen-
developed by Bob Metcalfe in
1976. Ethernet uses a bus or tral cable, called the bus or backbone to attach each node directly:
star topology with twisted-
pair wiring, coaxial cable,
or fiber optic cable transmis-
sion media. Newer protocols
sa

include Fast Ethernet, which


operates at 100 Mbps, Gigabit
Ethernet which operates at
1 Gbps, and 10G Ethernet,
which operates at 10 Gbps.

LAN using a bus topology

Chapter 1 An Introduction to Computers 7


• In a star topology, each node is attached to a hub, which is a device that
joins communication lines at a central location on the network:

Baseband and
Broadband Technology
Most LANs use baseband
technology which means the

e
transmission media carries one LAN using a star topology
signal at a time. Broadband
technology allows for data • In a ring topology, each node is connected to form a closed loop.
transmission of more than one A LAN with a ring topology can usually cover a greater distance
pl
signal at a time and is found in
cable television transmission.
than a bus or star topology:
m
Wi-Fi
sa

Wi-Fi (Wireless Fidelity) is


a term used to describe an
802.11 network, which is a LAN using a ring topology
specification or protocol for
wireless networks. • Wireless networks use high frequency radio waves or infrared sig-
nals instead of cables to transmit data. A router/wireless access
point device is used to allow nodes to transfer data wirelessly.

logical topology Another type of topology is logical topology, which refers to the way data
is passed between the nodes on a network. A LAN’s logical topology is
not always the same as its physical topology.

8 Chapter 1 An Introduction to Computers


Network users are given a user name and password to log on to a
network through a computer connected to the network. Users are also
assigned a level of access to maintain security. Network users should
netiquette follow a certain etiquette referred to as netiquette:
• Do not attempt to access the account of another user without
authorization.
• Do not share your password, and change it periodically.
• Use appropriate subject matter and language, and be considerate
of other people’s beliefs and opinions.

Number Systems
The electrical circuits on an IC have one of two states, off or on. Therefore,
binary number system the binary number system (base 2), which uses only two digits (0 and 1), was
adopted for use in computers. To represent numbers and letters, a code

e
was developed with eight binary digits grouped together to represent a
bit single number or letter. Each 0 or 1 in the binary code is called a bit (BInary
byte digiT) and an 8-bit unit is called a byte.
base 10 Our most familiar number system is the decimal, or base 10, system. It

pl uses ten digits: 0 through 9. Each place represents a power of ten, with
the first place to the left of the decimal point representing 100, the next
place representing 101, the next 102, and so on (remember that any number
raised to the zero power is 1). In the decimal number 485, the 4 represents
4×102, the 8 represents 8×101, and the 5 represents 5×100. The number 485
represents the sum 4×100 + 8×10 + 5×1 (400 + 80 + 5):
Decimal Base 10 Equivalent
m
485 4×102 + 8×101 + 5×100 = 400 + 80 + 5

base 2 The binary, or base 2, system works identically except that each place
represents a power of two instead of a power of ten. For example, the
binary number 101 represents the sum 1×22 + 0×21 + 1×20 or 5 in base ten.
Some decimal numbers and their binary equivalents are:
sa

Decimal Binary Base 2 Equivalent


0 0 = 0×21 + 0×20 = 0×2 + 0×1 =0+0
1 1 = 0×21 + 1×20 = 0×2 + 1×1 =0+1
2 10 = 1×21 + 0×20 = 1×2 + 0×1 =2+0
3 11 = 1×21 + 1×20 = 1×2 + 1×1 =2+1
4 100 = 1×22 + 0×21 + 0×20 = 1×4 + 0×2 + 0×1 =4+0+0

The hexadecimal system is used to represent groups of four binary


base 16 digits. The hexadecimal, or base 16, system is based on 16 digits: 0 through
9, and the letters A through F representing 10 through 15 respectively.
Each place represents a power of sixteen. For example, the hexadecimal
number 1F represents the sum 1×161 + 15×160. Some decimal numbers and
their hexadecimal equivalents are:
Decimal Binary Hexadecimal Base 16 Equivalent
0 0000 0000 0 = 0×160 = 0×1 =0
10 0000 1010 A = 10×160 = 10×1 = 10
25 0001 1001 19 = 1×161 + 9×160 = 1×16 + 9×1 = 16 + 9
30 0001 1110 1E = 1×161 + 14×160 = 1×16 + 14×1 = 16 + 14

Chapter 1 An Introduction to Computers 9


For clarity, a non-base 10 number should have the base subscripted after
ASCII and EBCDIC the number. For example, to show the difference between 100 in base 10
and 100 in base 2 (which represents 4), the base 2 number should be writ-
ASCII (American Standard ten as 1002.
Code for Information
Interchange) and EBCDIC Every letter of an alphabet (Latin, Japanese, Cherokee, and so on) and
( E x tend e d Binar y Co d e d symbols of every culture (=, @, ½, and so on) have been given a representa-
Decimal Interchange Code)
tion in a digital code called Unicode. Unicode uses a set of sixteen 1s and 0s
are two other digital coding
schemes. Unlike Unicode, to form a 16-bit binary code for each symbol. For example, the uppercase
ASCII and EBCDIC are not letter V is Unicode 00000000 01010110, which can be thought of as the base
large enough to support Asian 10 number 86 (8610). Lowercase v has a separate code of 00000000 01110110,
and other languages that use a or 11810.
different alphabet.

Storing Data in Memory


Computer memory is measured in bytes. For example, a computer might
have 512MB of RAM. In computers and electronics MB stands for megabytes

e
where mega represents 220 or 1,048,576 bytes and GB stands for gigabytes,
which is 230 or 1,073,741,820 bytes.
Data stored in memory is referred to by an address. An address is a
pl unique binary representation of a location in memory. Therefore, data
can be stored, accessed, and retrieved from memory by its address. For
data to be addressable in memory, it must usually be at least one byte in
length. For example, to store JIM in memory each character is converted
to Unicode and stored in two bytes of memory with each memory location
designated by its address:
m
Because JIM is a character string, it will probably be stored in adjacent
memory addresses.

words Bits grouped in units of 16 to 64 (2 to 8 bytes) are called words. Data


sa

stored in a word is also located by an address. The size of a word depends


on the computer system.
The binary representation of an integer number is usually stored in four
bytes of memory. Because an integer is stored in four bytes, the range of
overflow error integers that can be stored is –2,147,483,648 to 2,147,483,647. An overflow error
occurs when the number of bits that are needed to represent the integer is
greater than the size of four bytes.
real numbers Real numbers, also called floating point numbers, are numbers that contain
decimal points. The binary representation of a real number is usually 4 to
8 bytes of memory. The binary number 111.10 is equivalent to the real deci-
mal number 7.5 and is stored in memory as the binary number 0.11110×23.
mantissa In this form, the bits that represent the mantissa (fractional part) are stored
exponent in one section of a word and the exponent, in this example 3 (112), is stored
in another section of the word:

10 Chapter 1 An Introduction to Computers


The overflow problem discussed for integers can also occur in real
numbers if the part of the word storing the exponent is not large enough.
roundoff error A roundoff error occurs when there are not enough bits to store the
mantissa.

What is a File?
A file is related data stored on a persistent media. A file can be an appli-
cation (program) or the product of an application. For example, a word
File Size Limitations processor application is used to create document files. As another example,
File size can be decreased a digital camera is used to create photo files. A file is stored on a persistent
or compressed using a media so that it is retained even after the computer or computerized device

e
compression program, such
is turned off. A file can be used over and over again whenever the data it
as WinZip. This technique is
often used to accommodate
stores is needed.
storage device and e-mail A file is really just 1s and 0s because it is stored in binary code. Computers
account limitations.

pl are programmed to translate bytes and words into symbols. Depending


on the file type, these symbols are either human-readable or computer-
readable after translation. Human-readable files are called text files, and
computer-readable files are called binary files. Simple files, such as a text
document, can be measured kilobytes, for example 64K. The K comes from
the word kilo and represents 210 or 1,024. Therefore, a 64K file uses 65,536
bytes (64×210) of storage.
File types are distinguished by the extension that comes after the file
m
name. An application adds a unique extension to the files it creates. For
Extensions example, MyResume.doc is a document file type. A DOC file is a binary file
Common extensions include: created by Microsoft Word. Executables are EXE files and are also binary
.xls - Excel file files. A file named TestData.txt is a plain text file. A TXT file contains
.class - Compiled Java file only letters, numbers, and common symbols readable by humans. Folders
sa

.java - Java file are used to organize commonly related files.


.zip - compressed file
.gif - GIF image file Binary files are more complex than text files and often contain data for
.bmp - Bitmap graphic photos, formatted text, spreadsheets, sound, and so on. The disadvantage
of binary files is that they require another application to interpret the
contents. A binary file may have content similar to:
TIP The original form the file ÿÿñU_ÿÿþ}9UTýÿ–÷}]Ï_ñÿÑßÿÿý�ÿ×_ÿ÷Äõÿ
is saved in is referred to as the ÿ ÿ ð – U _ÿ ÿ w u s U U ü w] U/ U _ ñ ÿ U W w w t w w U W w wD õ ÿ
native format. þ»ÿÿúªî¿þÿþûïûüÿ¾þïìÿ
þÿÿï¿¿ÿïìôÿ UÿÿüET_ÿÿ÷wìÿ–þ»ÿÞþïýÿþøÿ¯ÿëÿúþÿ«ºòÿþýÿûÿûèôÿ
ÿÝþ_ÿÿ�ÿwþuUuWýw÷÷ÿ{þÿß¿ß÷ÿuWwwu÷uuUUwwDõÿþ»ÿÌ®è�lïÿþ
>«~﮿þÿ
ýUÝUUÕ]UU]UÕ]Õ]æÝDôÿ¿Îÿàôÿøÿ
ßýÕW_ý_õW_ÕÕ]uåÿDõÿþ¿óÿïþÿÿþáÿèôÿøwÿuþWuWUUwWþUåwDõ
ÿþ
A binary file is computer-readable

Chapter 1 An Introduction to Computers 11


Storage Devices
Storage devices use a persistent media to maintain files. These devices,
which are also referred to as drives, mass storage, and auxiliary storage, can
be categorized in three ways:
• internal or external
• removable or permanent media
• magnetic, optical, or solid state technology

Internal devices are drives mounted inside the PC case. These devices
can include hard disk, CD/DVD, disk, tape, Zip, and Jaz drives. Except for
the Iomega® RRD (Removable Rigid Disk) system, which uses a removable
media, hard drives typically have permanently installed disks that are not
accessible from outside the PC case. Other devices have an external slot
for removable storage media.

e
External devices have a stand-alone drive housing and connect to a
computer’s USB port with a cable. USB (Universal Serial Bus) is a standard-
ized technology with data transfer rates up to 480 Mbs. As many as 127
devices can be connected to a single port with USB hubs.
pl External drives offer the advantage of portability because they can be
easily moved to other computers that support the technology. External
devices include hard disk, RRD, CD/DVD, diskette, tape, Zip, and Jaz
drives. Except for the hard disk drive, these drives have removable
media.
Ultra-portable devices include keychain, watch, mini drive, and mouse
storage to name just a few. These external devices are small and easy-to-
m
use, but currently more expensive than comparable storage devices that
are larger in size. Most ultra-portable devices, including the keychain and
mini drive, have storage media attached directly to a USB plug that is con-
nected to a USB port. The watch and mouse storage devices use a cable
with a USB plug to connect to a USB port. The watch has a short cable and
USB plug hidden in the band. The mouse storage device requires a longer
sa

cable so that it can also function as a pointing device.


Firewire Storage device technologies determine the media, size, and portabil-
Using the IEEE 1394 standard, ity of a device. Magnetic technology uses a mechanical drive with tiny
a FireWire port allows devices electromagnetic heads for reading and writing data to media. The media
to quickly t rans fe r lar ge required with magnetic technology is a disk, usually made of aluminum or
amounts of data (greater than
Mylar®, coated with iron oxide. The disk is either encased in hard plastic
400Mbs). FireWire is often
used for digital video cameras
(floppy diskette and Zip) or several disks, called platters, are sealed in a
and sometimes external hard case (Jaz, RRD, and hard disk). A data signal sent through the heads in
drives because of the amount the drive magnetize a bit of the media in one direction to store a 1 and in
of data associated with these the other direction to store a 0.
devices. FireWire devices can
be daisy-chained together, Optical technology uses a drive with a laser and an optoelectronic sen-
which means one device sor. The media required with optical technology is a compact disc made
is connected to another’s of polycarbonate plastic. A CD-R (CD-Recordable) disc is used for stor-
FireWire port and that device ing files. CD-Rs are coated with a reflective organic compound and then
is connected to another and so sealed with a plastic layer to protect the reflective layer from scratches.
on. FireWire also supports iso-
The laser in the drive is focused on a bit of the CD-R to darken, or “burn,”
chronous mode for real-time
data transfer. the organic compound to store a 1. The areas of the CD-R left unburned
are read as bits storing a 0.

12 Chapter 1 An Introduction to Computers


Another application of optical technology is the DVD drive, which
Tera, Peta, Exa uses a DVD-R disc, similar to a CD-R. The DVD-R (Digital Video Disc-
Recordable) can store much more data than a CD-R because of the preci-
As more and more data is sion used in manufacturing the drive and the DVD-R itself. Bits are much
stored electronically, file sizes
smaller and stored much more closely together on the DVD-R.
become very large and require
storage devices with very large Solid state technology allows for the smallest, most portable storage
capacities. TB (terabyte) is 240
devices because the technology requires no moving parts. The media is
bytes or 1 trillion bytes, pet-
abyte (PB) is 250 bytes or 1,024 Flash memory, which consists of a grid with two tiny transistors at each
terabytes, and EB (exabyte) is cell. Each cell corresponds to a bit. Applying a charge to a cell stores a
260 bytes or 1,024 petabytes. 0, while applying a stronger charge stores a 1. The grid of transistors is
Device s wit h TB storage encased in hard plastic and is very small. Some devices can store 2MB or
capacities are gradually com- more within a package thinner and smaller than a quarter. Slightly larger
ing into use, especially for media can store gigabytes of data. Encased media is often directly attached
database files.
to a USB plug for use with a computer, or simply has conductive material
imprinted so the media can slide into a digital camera slot.
Magnetic technology allows for storage devices that range in capacity from

e
1.44MB (a floppy diskette) to many gigabytes (hard disk drives with many
platters). Optical technology includes CDs that can store about 700MB of
data, while DVDs can store at least 4GB of data. Solid-state devices store
from 64KB of data to many gigabytes.

pl storage media care

Storage Media
The capacity of storage media
varies. For example, a disk has
Storage media can be very sensitive. Care should be taken to avoid
damaging files:
• Never attempt to open a case containing a disk.
• Keep magnetic media away from magnets.
• Handle CD/DVDs by the center hole or by the edges.
• Never bend CD/DVDs or other flexible media.
a storage capacity of 1.44 MB,
m
a CD has a storage capacity • Store CD/DVDs in a jewel case or sleeve to prevent scratches.
of 650 MB, and a DVD has a
storage capacity of over 4GB. • Keep media away from moisture and extreme temperatures.

Intranet, Extranet, Internet


sa

An intranet is a network that is used by a single organization, such as


a corporation or school, and is only accessible by authorized users. The
purpose of an intranet is to share information. However, a firewall is also
firewall used to lock out unauthorized users. A firewall is a network security system
that prevents unauthorized network access.
An extranet extends an intranet by providing various levels of acces-
sibility to authorized members of the public. For example, a corporation
may extend their intranet to provide access to specific information, such
as their ordering system, to registered customers.
History of the Internet
The Internet evolved from
The largest and most widely accessed network is the Internet, a world-
ARPANET, a network cre- wide network of computers that is not controlled by any one organization.
ated in the late 1960s by the The Internet has had an undeniable impact on modern society because it
Depar tment of Defense’s allows users worldwide to communicate in a matter of seconds.
ARPA (Advanced Research
Projects Agency), and the
theory of open architecture
networking.

Chapter 1 An Introduction to Computers 13


The Internet is actually numerous networks all linked together through
routers. A router is a device that connects different network technolo-
gies. Networks connected to routers use TCP/IP (Transmission Control
Protocol/Internet Protocol) software to communicate.
Computers on the Internet are either servers or clients. The client is sent
information from a server. The client/server structure of the Internet is
called interactive because the information accessed is a result of selections
made by the user. For example, a computer with just minimal software
for accessing the Internet is a client. The client user selecting options from
the Internet is receiving the information from a server, a computer with
additional software and files that is also connected to the Internet.

Telecommunications
Telecommunications is the transmitting and receiving of data. Data can be
in various forms including voice and video. Telecommunications requires

e
TIP Access to the Internet a modem or adapter and a line or cable. The speed of data transmission
requires telecommunications
and the use of an Internet
(sending) and receipt (receiving) is measured in Kbps (thousands of bits
Service Provider (ISP). per second) or Mbps (millions of bits per second). Numerous telecommu-
nications options are available, which vary in speed and cost:
pl • A conventional modem uses standard telephone lines to convert
analog signals to digital data. A conventional modem is a 56 Kbps
modem, which transmits data at 28.8 Kbps and 36.6 Kbps, and
receives data at 56 Kbps. Home computers sometimes use a con-
ventional modem.
• A DSL (Digital Subscriber Line) modem uses standard telephone
TIP In a wireless network, a
router/wireless access point is lines with data transmission up to 640 Kbps. Data receipt is from
m
typically connected by a cable 1.5 Mbps to 9 Mbps. A DSL (Asymmetric DSL) is the most common
to a cable or DSL modem. form used.
• A cable modem transmits data through a coaxial cable television
network. Data transmission is from 2 Mbps to 10 Mbps and data
receipt is from 10 Mbps to 36 Mbps.
sa

• Leased/Dedicated lines are used by many businesses and schools


for Internet access. They allow for a permanent connection to the
Internet that is always active. The cost of a leased line is usually a
fixed monthly fee. A T-1 carrier is a type of leased line that trans-
mits data at 1.544 Mbps.
• ISDN (Integrated Services Digital Network) is a digital telephone
network provided by a local phone company. ISDN is capable of
transmitting and receiving data at up to 64 Kbps. ISDN requires
the use of an ISDN terminal adapter instead of a modem.

14 Chapter 1 An Introduction to Computers


Internet Services: Web, E-mail, and
Mailing Lists
Internet services include the World Wide Web, e-mail, and mailing lists.
World Wide Web The World Wide Web (WWW), also called the Web is the most widely used
Internet service. The Web can be used to search and access information
web browser available on the Internet. A web browser application, such as Microsoft
Internet Explorer, provides a graphical interface to present information
in the form of a website:

Blog

e
Blog is short for weblog and is
a type of website where users
can post entries in a journal
format.

pl
m
A web page that is part of the New York Times website
Another widely used Internet service is e-mail or electronic mail, which
is the sending and receiving of messages and computer files over a com-
munications network, such as a LAN (Local Area Network) or the Internet.
sa

E-mail can be received in a matter of seconds, even if the recipient is


Digital Signature located half way around the world.
A digit al signature is a An e-mail address is required in order to send and receive e-mail mes-
code that is attached to an
sages. E-mail addresses are provided when you sign up with an ISP or an
electronic message to verify
the authenticity of a website online service. A typical e-mail address is similar to:
or e-mail message.

E-mail software is also required for sending and receiving e-mail mes-
sages. Examples of e-mail software include Outlook, Outlook Express,
Instant Messaging and Eudora. Browser-based e-mail only requires a web browser and is
Instant messaging is a com- available through sites such as Yahoo! and Hotmail.
munication tool that allows
for real time or immediate text-
based communication.

Chapter 1 An Introduction to Computers 15


Certain rules should be followed when composing e-mail messages
E-mail Protocols • Use manners. Include “please” and “thank you” and also properly
POP3 is an e-mail protocol address people you do not know as Mr., Ms., Mrs., Dr., and so on.
that connects to an e-mail
• Be concise.
server to download messages
to a local computer. • Be professional, which includes using the proper spelling and
IMAP is an e-mail protocol that grammar.
connects to an e-mail server • Re-read a message before it is sent. Always fill in the To box last to
to read message headers and avoid sending a message before it is complete.
then the user selects which
e-mail messages to download
E-mail messages are not private. An e-mail message goes through sev-
to a local computer.
eral mail servers before it reaches the recipient, making it easily accessible
HTTP is used as an e-mail pro- for others to read. Therefore, sending e-mail messages requires following
tocol when a web page is used a certain etiquette:
to access an e-mail account.
• Send messages through your account only.
• Use appropriate subject matter and language.

e
• Be considerate of other people’s beliefs and opinions.
Spam
When sending e-mail at work or school, it is important to remember
Along with personal and
that employers and school administrators have the right to read any e-mail
pl
busine ss me ssage s, most
people also receive a lot of
“junk e-mail” or spam. Most
e -mail sof t ware includes
features to filter and block
messages from spe cif ic
senders.
messages sent over the corporate or school network, as well as the right to
track online activity.
A mailing list server is a server that manages mailing lists for groups of
users. Two mailing list servers are Listserv and Majordomo. Often users
subscribe to mailing lists for discussion purposes. When a subscriber posts
a message to a mailing list server, every subscriber receives a copy of the
message. Subscribers are identified by a single name or e-mail address.
m
Finding Information on the Web and
Downloading Files
sa

A search engine is a program that searches a database of web pages for


keywords and then lists hyperlinks to pages that contain those keywords.
Search Engines Commonly used search engines include:
A search engine usually works Yahoo! (www.yahoo.com)
by sending out an agent,
Google (www.google.com)
such as spider. A spider is an
application that gathers a list MSN (www.msn.com)
of available web page docu- AOL (www.aol.com)
ments and stores this list in a Excite (www.excite.com)
database that users can search
Ask Jeeves (www.ask.com)
by keywords.
Overture (www.overture.com)
When displaying information,
Lycos (www.lycos.com)
search engines often show
“Sponsored Sites Results” first. WebCrawler (www.webcrawler.com)
These are sites that contain the FAST Search (www.alltheweb.com)
information being searched About.com (www.about.com)
for but have paid the search
AltaVista (www.altavista.com)
engine to list their sites at the
top of the list. Looksmart (www.looksmart.com)

16 Chapter 1 An Introduction to Computers


A search engine can be queried to display specific web pages. Search criteria
can include single words or phrases that are then used by the engine to
determine a match. A match is a web page that contains the search criteria.
Surrounding phrases with quotation marks finds web pages that contain
the entire phrase. The more specific the search criteria, the better the
chance the information will be found.
Most searches yield far too many matches to be useful. Limiting the
number of matches to a reasonable number can usually be accomplished
by using Boolean logic in the search criteria:
• The + (plus sign) is used in search criteria to limit a search to only
Boolean Logic
Web pages that contain all of the specified words. For example, a
Boolean logic uses three search for florida +hotel or florida hotel returns only links to pages
logical operators: containing both words. AND can be used in place of + in most
AND locates pages that search engines.
include both words
• OR can be used in most search engines to find Web pages that
OR locates pages that include contain any one of the words in the criteria. For example, the cri-

e
one word or the other or both teria florida OR hotel returns links to pages containing either of
NOT locates pages that
the words.
include the first word, but not • The – (minus sign) is used to exclude unwanted Web pages. For
the second word

pl
A boolean expression always
evaluates to TRUE or FALSE
with pages that match the
search condition evaluating to
TRUE.
example, the search for shakespeare –play returns hyperlinks to
pages containing the word shakespeare, but eliminates pages that
also contain the word play. NOT can be used in place of – in most
search engines.
Some search engines provide a subject tree, or web directory, which is a
list of sites separated into categories. The term subject tree is used because
many of the categories “branch” off into subcategories. These subcategories
allow the user to narrow down the subject and display a list of appropriate
m
hyperlinks, which are at the lowest level of the tree.

TIP Just because a file is Information on a website is sometimes in the form of a downloadable
available on a website for file. Downloading is the process of copying a file from a website to the
download does not mean that user’s computer. For example, virus definitions can be downloaded from a
it is legal to download the file. antivirus software company’s website and software updates can be down-
sa

Downloading copyrighted loaded from the software company’s website. When a file is downloaded,
files that have not been made
the user specifies where the file should be saved on the local computer.
freely available is a violation of
copyright law.
Files should only be downloaded from known, authentic websites since
downloadable files are often associated with viruses.
If information from a website is to be referenced or quoted in a report,
essay, or other document, a citation must be used to give credit to the
original author and allow the reader to locate the cited information. A
widely accepted form for citation is published by the Modern Language
MLA Association (MLA) in its publication MLA Handbook for Writers of Research
Papers, Fourth Edition.
In general, a citation for material located at a website should look similar
to:
Author's Last Name, First Name MI. Site Title. Access date.
Organization name. <URL>.

A citation of a personal website could look similar to:


Rawlings, Julie. Home page. 23 Dec. 2006. <http://www.
lpdatafiles.com/jrawlings/index.htm>.

Chapter 1 An Introduction to Computers 17


A citation of an article in an online magazine could look similar to:
Schiffman, Paula. "Making Vinegar at Home." Vinegar
Monthly. 4 May 2006. <http://www.lpdatafiles.com/
vinegarassoc/journal.asp>.

A citation of a posting to a discussion list could look similar to:


Cruz, Anthony. "Are Orchestras Going Downhill?" online
posting. 10 Oct. 2006. Tuscon Annual Ballet Conf.
<http://www.lpdatafiles.com/tuscontoes/downhill.txt>.

Internet Privacy Issues


The growth of the Internet has caused additional concerns about
personal privacy. Searching for information on the Internet is not as
anonymous as it might seem.
The collection of data about consumers visiting a website is a marketing

e
Spyware technique known as online profiling. When a commercial website is visited,
Spy ware is sof t ware that information about the user may be collected using various methods such
uses the Internet to gather as cookies or web beacons.
personal information from an
pl
unsuspecting user. Spyware
is unknowingly downloaded
and installed with another file,
such as freeware or shareware
programs.
A cookie is a text file created by the server computer when a user enters
information into a website. The cookie file is then stored on the user’s
computer and accessed each time the user visits that website. Cookies
are often created when online purchases are made. Although cookies can
only store information that the user has selected or entered, their use has
raised concerns over privacy issues.
Web beacons, also called web bugs or pixel tags, are tiny, transparent
IP Address graphics located on web pages or in e-mail messages that are used in
m
combination with cookies to collect data about web page users or e-mail
An IP address is an identifier
for a computer or device on a senders. Usually the monitoring is done by an outside advertising company.
TCP/IP network. The information a web beacon collects includes the IP address of the
computer, the URL being visited, the time the web page was viewed, the
type of browser being used, and the cookie file.
sa

TIP A website’s privacy policy Before providing a company with personal information through a
is typically found as a link at website, check the site’s privacy policy. A privacy policy is a legally binding
the bottom of the home page document that explains how any personal information will be used.
of a website.
The Internet has opened up access to many files that were previously
inaccessible. To protect both the privacy of an individual and the accuracy
of data stored about individuals, several laws have been passed:
• The Electronic Communications Privacy Act of 1986 (ECPA)
makes it a crime to access electronic data without authorization.
It also prohibits unauthorized release of such data.
• The Electronic Freedom of Information Act of 1996 (E-FOIA)
NET Act requires federal government agencies to make certain agency
information available for public inspection and is designed to
The NET (No Electronic Theft)
Act of 1997 closed a loophole improve public access to agency records by making more informa-
in the law which allowed copy- tion available online.
righted material to be given • The Children’s Online Privacy Protection Act of 1998 (COPPA)
away on the Internet without
requires commercial websites that collect personal information
any legal penalty.
from children under the age of 13 to obtain parental consent.

18 Chapter 1 An Introduction to Computers


• The Safety and Freedom through Encryption Act of 1999 (SAFE)
Encryption gives Americans the freedom to use any type of encryption to
protect their confidential information.
Encryption is the process of
translating data into a code that Other laws have been passed that may invade the privacy of some to
is not readable without the key
protect the safety of others. For example, the Provide Appropriate Tools
to the code. Encryption pre-
vents unauthorized access to Required to Intercept and Obstruct Terrorism (PATRIOT) Act of 2001
the data. Data that is encrypted gives law enforcement the ability to monitor individual’s e-mail and web
is referred to as cipher text. activity.

Internet Acceptable Use Policy


Internet content, unproductive use, and copyright have prompted many
schools and businesses to develop an Acceptable Use Policy or Internet
Use Agreement. Acceptable Use Policies typically contain rules similar
to:

e
Internet Filtering • Use appropriate language.
Software
• Do not reveal personal address or phone numbers.
Many schools and organiza-
tions install Internet filtering • Do not access, upload, download, or distribute inappropriate

pl
software to block offensive
material.
materials.
• Do not access another user’s account.
• Use of the network for private business is prohibited.
• Only administrator installed software may be used on the com-
puters. Adding, deleting, or modifying installed software is not
permitted.
m
The Social and Ethical Implications of
Computer Use
The society in which we live has been so profoundly affected by
sa

information age computers that historians refer to the present time as the information age.
This is due to the our ability to store and manipulate large amounts of
information (data) using computers. As an information society, we must
consider both the social and ethical implications of our use of computers.
By ethical questions we mean asking what are the morally right and wrong
ways to use computers.
ergonomics Ergonomics is the science that studies safe work environments. Many
health-related issues, such as carpal tunnel syndrome and computer vision
syndrome (CVS) are related to prolonged computer use.
Power and paper waste are environmental concerns associated with
computer use. Suggestions for eliminating these concerns include recycling
paper and printer toner cartridges and turning off monitors and printers
when not in use.
Employee monitoring is an issue associated with computers in the work-
place. It is legal for employers to install software programs that monitor
employee computer use. As well, e-mail messages can be read without
employee notification.

Chapter 1 An Introduction to Computers 19


As discussed in a previous section in the chapter, the invasion of privacy
Identity Theft is a serious problem associated with computers. Because computers can
store vast amounts of data we must decide what information is proper to
Identity theft is a growing crime store, what is improper, and who should have access to the information.
where personal information is
Every time you use a credit card, make a phone call, withdraw money,
stolen electronically in order
to make fraudulent purchases reserve a flight, or register at school, a computer records the transaction.
or loans. These records can be used to learn a great deal about you—where you have
been, when you were there, and how much money was spent. Should this
information be available to everyone?
Computers are also used to store information about your credit rating,
which determines your ability to borrow money. If you want to buy a car
and finance it at a bank, the bank first checks your credit records on a
computer to determine if you have a good credit rating. If you purchase
the car and then apply for automobile insurance, another computer will
check to determine if you have traffic violations. How do you know if
the information being used is accurate? The laws listed below have been
passed to help ensure that the right to privacy is not infringed by the

e
improper use of data stored in computer files:
• The Fair Credit Reporting Act of 1970 gives individuals the right
to see information collected about them for use by credit, insur-
pl ance, and employment agencies. If a person is denied credit they
are allowed to see the files used to make the credit determination.
If any of the information is incorrect, the person has the right to
have it changed. The act also restricts who may access credit files
to only those with a court order or the written permission of the
individual whose credit is being checked.
• The Privacy Act of 1974 restricts the way in which personal data
can be used by federal agencies. Individuals must be permitted
m
access to information stored about them and may correct any infor-
mation that is incorrect. Agencies must insure both the security
and confidentiality of any sensitive information. Although this law
applies only to federal agencies, many states have adopted similar
laws.
sa

• The Financial Privacy Act of 1978 requires that a government


authority have a subpoena, summons, or search warrant to access
an individual’s financial records. When such records are released,
the financial institution must notify the individual of who has had
access to them.

Protecting Computer Software and


Data
As society becomes more and more reliant on digital information,
copyright and exposure to malicious code have become two important
copyright issues among computer users. Copyright is protection of digital informa-
tion. Copyright infringement is the illegal use or reproduction of data
(text, pictures, music, video, and so on). Laws, such as the NET Act (No
Electronic Theft Act) of 1997, protect against copyright infringement. There
have been several well-known cases of high penalties for individuals guilty
of copyright infringement.

20 Chapter 1 An Introduction to Computers


Copyright infringement includes duplication of computer software
TIP It is usually legal to make when copies are being used by individuals who have not paid for the
one backup copy of a pur-
software. This practice is called piracy when illegal copies are distributed.
chased software program.
Developing, testing, marketing, and supporting software is an expensive
process. If the software developer is then denied rightful compensation,
the future development of all software is jeopardized. Therefore, it is
important to use only legally acquired copies of software, and to not make
illegal copies for others.
Malicious code comes in many forms and is delivered in many ways. A
virus, a Trojan horse, and an Internet worm are three forms of malicious
code. They can appear on a system through executable programs, scripts,
macros, e-mails, and some Internet connections. One devastating effect
of malicious code is the destruction of data.
virus A virus is a program or series of instructions that can replicate without
the user’s knowledge. Often a virus is triggered to run when given a cer-
tain signal. For example, a virus might check the computer’s clock and then

e
destroy data when a certain time is reached. A virus is easily duplicated
when the file is copied, which spreads it to other computers.

Trojan horse A Trojan horse program appears as something else, usually a program
that looks trustworthy. Running the program runs the malicious code

pl antivirus programs
and damages files on the computer. A worm is a program that is able to
reproduce itself over a network. Worms are a threat because of the way
they replicate and use system resources, sometimes causing the system
to shut down.
Malicious code has become so widespread that software called antivirus
programs must be installed on computers and networks to detect and
remove the code before it can replicate or damage data. Precautions can
m
also be taken to prevent damage from malicious code:
• Update antivirus software. An antivirus program can only detect
the viruses, Trojan horses, and worms it is aware of. Antivirus
programs have a web link for updating the virus definitions on
the computer containing the antivirus program.
sa

• Do not open e-mail attachments without scanning for malicious


code. One estimate states that 80% of virus infection is through
e-mail.

crackers, hackers Newspapers have carried numerous reports of crackers, or hackers, gain-
ing access to large computer systems to perform acts of vandalism. This
malicious act is illegal and can cause expensive damage. The Electronic
Communications Privacy Act of 1986 specifically makes it a federal offense
to access electronic data without authorization. Networks usually include a
firewall, which is a combination of hardware and software, to help prevent
unauthorized access.
The willful destruction of computer data is no different than any other
vandalizing of property. Since the damage is done electronically the
result is often not as obvious as destroying physical property, but the
consequences are much the same. It is estimated that computer crimes
cost billions of dollars each year.

Chapter 1 An Introduction to Computers 21


phishing Phishing is the act of sending an e-mail to a user falsely claiming to
be a legitimate business in an attempt to trick the user into revealing
personal information that could be used for crimes such as identity theft.
The Communications Privacy Act of 1986 specifically makes it a federal
offense to access electronic data without authorization. Networks usually
include a firewall, which is a combination of hardware and software, to
help prevent unauthorized access.

The Ethical Responsibilities of an IT


Professional
An IT (information technology) professional has responsibilities that
relate to system reliability. System reliability involves installing and updat-
IT Careers
ing appropriate software, keeping hardware working and up-to-date, and
The growth of computers, maintaining databases and other forms of data. Governments, schools, and
the Internet, and the Web
employers rely on IT professionals to maintain their computer systems.

e
have created many new job
opportunities in the IT field. In addition to ensuring system reliability, an IT professional must take
IT careers include data-entry responsibility for the ethical aspects of the career choice. For example,
operator, systems analyst,
IT professionals involved in creating software must ensure, as best he or
p r o g r a m m e r, c o m p u t e r
pl
e n g in e e r, a n d t e c h ni c al
support technician.
she can, the reliability of the computer software. This means the ethical
responsibility of the IT professional includes using the appropriate tools
and methods to test and evaluate programs before distribution. A special
cause for concern is the increased use of computers to control potentially
dangerous devices such as aircraft, nuclear reactors, or sensitive medical
equipment.
IT professionals must also consider the impact they have on computer
users. Web users for example often rely on data from websites providing
m
real-time information. The information displayed is determined with a
program written using a 4GL or other language that accesses a database.
The IT professionals involved in such a project have the ethical respon-
sibility to possibly millions of individuals for ensuring, as best they can,
accurate data retrieval.
sa

As capable as computers have proven to be, we must be cautious when


allowing them to replace human beings in areas where judgement is cru-
cial. As intelligent beings, we can often detect that something out of the
ordinary has occurred which has not been previously anticipated and then
take appropriate actions. Computers will only do what they have been
programmed to do, even if it is to perform a dangerous act.

Chapter Summary
A desktop computer and its components are designed to fit on or under
a desk. Mobile computers include notebooks, tablets, handhelds, smart
phones, and wearables. A computer must run operating system (OS)
software in order to control processing and peripherals, run application
software, and control input and output, among other tasks.

22 Chapter 1 An Introduction to Computers


A network is a combination of hardware and software that allows com-
puters to exchange data and share software and devices, such as printers.
Networks are classified by their size, architecture, topology, and protocol.
Network users should use netiquette.
A programming language is a set of words, codes, and symbols that
allows a programmer to communicate with the computer. Programming
languages can be classified as low-level and high-level languages. Low-
level programming languages include machine language and assembly
language. High-level programming languages have English-like
instructions and are easier to use than machine language. High-level
programming languages include Fortran, C, Basic, COBOL, and Pascal.
The electrical circuits on an IC have one of two states, off or on. Therefore,
the binary number system (base 2), which uses only two digits (0 and 1),
was adopted for use in computers. Our most familiar number system is the
decimal or base 10 system. The binary number system is a base 2 system
and the hexadecimal system is base 16. Every letter of an alphabet (Latin,

e
Japanese, Cherokee, and so on) and symbols of every culture (=, @, ½, and
so on) have been given a representation in a digital code called Unicode.
Computer memory, file sizes, and storage device capacities are measured
in bytes. In computers and electronics MB stands for megabytes, GB stands

pl
for gigabytes, and K stands for kilobytes.
The binary representation of an integer number is usually stored in four
bytes of memory. Real numbers are numbers that contain decimal points
and the binary representation of a real number is usually 4 to 8 bytes of
memory.
A file is related data stored on a persistent media. A file is really just 1s
m
and 0s because it is stored in binary code. Computers are programmed to
translate bytes and words into symbols. File types are distinguished by
the extension that comes after the file name. Folders are used to organize
commonly related files.
Storage devices use a persistent media to maintain files. These devices,
which are also referred to as drives, mass storage, and auxiliary storage,
sa

can be categorized as internal or external, as removable or permanent


media, and as magnetic, optical, or solid state technology.
An intranet is a network that is used by a single organization and is only
accessible by authorized users. A firewall is a network security system that
prevents unauthorized network access. An extranet extends an intranet
by providing various levels of accessibility to authorized members of the
public. The largest and most widely accessed network is the Internet. The
most widely used Internet service is the World Wide Web, also called the
Web. Other Internet service include e-mail and mailing lists.
Telecommunications is the transmitting and receiving of data.
Telecommunication options include a conventional modem, a DSL modem,
a cable modem, leased/dedicated lines, and ISDN.
A search engine is a program that searches a database of web pages for
keywords and then lists hyperlinks to pages that contain those keywords.

Chapter 1 An Introduction to Computers 23


Search criteria is used by the search engine to determine a match. Limiting
the number of matches to a reasonable number can be accomplished using
Boolean logic in the search criteria. Some search engines also provide a
subject tree, or web directory.
Information found at a website should be evaluated for accuracy. There
are guidelines for citing electronic material on the Internet. The primary
purpose of a citation is to give credit to the original author and allow the
reader to locate the cited information.
The growth of the Internet has caused concerns about personal privacy.
Online profiling, cookies, and web bugs are all areas of concern. Before
providing personal information through a website, check the site’s pri-
vacy policy. To protect an individual’s privacy, several laws have been
passed. Concerns about Internet content, unproductive use, and copyright
have prompted many schools and businesses to develop an Internet Use
Agreement.
Historians refer to our present time as the information age. The poten-

e
tial for the use of computers to invade our right to privacy has prompted
legislation to protect individuals. Piracy is the illegal act of duplicating
software without permission. A virus is a computer file that erases data
and can cause considerable damage.
pl Working as an IT (information technology) professional includes taking
responsibility for the ethical aspects of a career choice. IT professionals
must also consider the impact they have on computer users.
m
sa

24 Chapter 1 An Introduction to Computers


Vocabulary

Address A unique binary representation of a location Cookie Text file created by the server computer
in memory. when a user enters information into a website.

Address bus Carries memory addresses that indi- Copyright Protects a piece of work from reproduc-
cate data storage locations. tion without permission from the work’s author.

ALU (Arithmetic Logic Unit) The part of the CPU CPU (Central Processing Unit) Processes data and
that handles arithmetic and logic operations. controls the flow of data between the computer’s
other units. Also contains the ALU. Located on the
Antivirus program Software installed on computers
motherboard.
and networks to detect and remove viruses.
Cracker Person who accesses a computer system
Applications software Program written to perform
without authorization.
a specific task.
Cross-platform connectivity The ability of one
Base unit Housing that contains the mother-
type of PC to link to and share data with a different

e
board, CD-RW/DVD drive, disk drive, and hard
type of PC.
disk drive.
Dedicated line See Leased line.
Binary number system Number system used by
computers that uses only digits 0 and 1. Also called Device driver One type of utility program.

pl
base 2.
Bit (BInary digiT) A single 0 or 1 in binary code.
Bus A central network cable. Also a set of circuits
that connect the CPU to other components.
Bus topology A physical LAN topology that uses a
single central cable to attach each node directly.
Downloading The process of copying a file from
a website to the user’s computer.
DSL (Digital Subscriber Line) modem A modem
that uses standard telephone phone lines. ADSL is
the most common form used.
E-mail (electronic mail) The sending and receiving
m
of messages and electronic files over a communica-
Byte A group of 8 bits.
tions network such as a LAN or the Internet.
Cable modem A modem that transmits data through
Environment A computer’s hardware and soft-
a coaxial cable television network.
ware configuration. Also referred to as platform.
Cache High-speed memory used to store frequently Environment types include desktop, multiuser, net-
sa

used data so that it can be quickly retrieved by an work, handheld, distributed, multiprocessing, and
application. multitasking.

Client A computer that is sent information from a Ergonomics The science that studies safe work
server computer. environments.

Client/server network A type of network that Extension Added after a file name to distinguish
consists of a group of computers, called clients con- file types.
nected to a server computer.
Extranet An extended intranet that provides vari-
Clock rate The speed at which a CPU can execute ous levels of access to authorized members of the
instructions, measured in megahertz or gigahertz. public.

Compiler A program that converts an entire pro- Expansion boards Circuit boards that connect to the
gram into machine code before the program is motherboard to add functionality to the computer.
executed.
File A collection of related data stored on a lasting
Control bus Carries control signals. medium.

Conventional modem A modem that uses stan- Firewall A network security system that prevents
dard telephone lines to convert analog signals to unauthorized network access.
digital data.

Chapter 1 An Introduction to Computers 25


Folder Used to organize commonly related files. Leased line A telecommunication option used
for a permanent connection to the Internet that is
Gigabytes (GB) Approximately one billion bytes.
always active.
Gigahertz (GHz) Billion of cycles per second.
Logical topology Refers to the way in which data
Hacker see Cracker. is passed between the nodes on a network.

Handheld computer A mobile computing device. Low-level programming languages First and
second generation programming languages including
Hardware The physical components of the computer, machine language and assembly language.
such as the monitor and system unit.
Mailing list server A server that manages mailing
Hexadecimal system Number system based on 16 lists for groups of users.
digits. Also called base 16.
Magnetic technology Storage device technology that
High-level programming languages Third uses a mechanical drive with tiny electro-magnetic
generation programming languages that have heads for reading and writing data to media.
English-like instructions.
Match A web page that contains the search
Hub A communication device that joins communica-

e
criteria.
tion lines at a central location on the network.
Mbps Millions of bits per second.
Information age Present time characterized
by increasing dependence on the computer’s Megabytes (MB) Approximately one million
pl
ability to store and manipulate large amounts of
information.
Input device Device used to enter data and instruc-
tions into the computer.
Integrated circuits (ICs) A silicon wafer with intri-
bytes.
Megahertz (MHz) Million of cycles per second.
Memory-resident A program that is always in
memory.
Minus sign (–) Used in search criteria to exclude
cate circuits etched into its surface and then coated
unwanted web pages.
with a metallic oxide that fills in the etched circuit
m
patterns. Also called a chip. Modern Language Association (MLA) Organization
that publishes standards used for citations.
Interactive Information accessed as a result of
selections made by the user. Motherboard The main circuit board inside the
base unit.
Internet The largest and most widely accessed
network. Netiquette The etiquette that should be followed
sa

when using a network.


Interpreter A program that translates and
executes an instruction before moving on to the Network A combination of software and hardware
next instruction in the program. that allows computers to exchange data and to share
software and devices, such as printers.
Intranet A network that is used by a single organi-
zation and only accessible by authorized users. Net work architect ure The st ruct ure of a
network.
ISDN (Integrated Services Digital Network) A
digital telephone network provided by a local tele- Network interface card A circuit board that goes
phone company. into a computer or other device in a LAN.

IT (Information Technology) A term that Network operating system Software that allows
encompasses all aspects of computer-related users and devices to communicate over a network.
technology.
Node A location on the network capable of processing
Kbps Thousands of bits per second. information, such as a computer or a printer.

Kilobytes (K) Approximately a thousand bytes. Notebook A portable, lightweight computer.

LAN (Local Area Network) A network used to


connect devices within a small area.

26 Chapter 1 An Introduction to Computers


Object-oriented programming (OOP) An approach Ring topology A physical LAN topology where each
to programming where modules are created that can node is connected to form a closed loop.
be used over and over again.
ROM (Read Only Memory) Memory that stores
Online profiling A marketing technique that data and is a permanent part of the computer.
collects online data about consumers.
Roundoff error An error that occurs when there
Operating system Software that allows the user are not enough bits to hold the mantissa.
to communicate with the computer. Types include
Router A device that connects different network
multiuser, multiprocessing, multitasking, multi-
technologies.
threading, or real time.
Search criteria A single word or phrase that is used
Optical technology Storage device technology
by the search engine to match web pages.
that uses a drive with a laser and optoelectronic
sensor. Search engine A program that searches a database
of web pages for keywords and then lists hyperlinks
Output device A device used to convey processed
to pages that contain those keywords.
data.
Secondary memory Any type of storage media.

e
Overflow error An error that occurs when the num-
ber of bits that are needed to represent the integer Server A computer used to manage network func-
is greater than four bytes. tions such as communication and data sharing.
Over writes Updates an original file with Smartphone Cellular phone that is able to send and

pl
changes.
Peer-to-peer network A type of network that does
not have a server.
Peripheral device A device attached to a PC.
Phishing The act of sending an e-mail to a user
falsely claiming to be a legitimate business in an
receive e-mail messages and access the Internet.
Solid state technology Storage device technology
that requires no moving parts.
SRAM (Static Random Access Memory) High-
speed memory referred to as cache.
Star topology A physical LAN topology where
m
attempt to trick the user into revealing personal each node is attached to a hub.
information that could be used for crimes such as
identity theft Storage devices Devices that use persistent media
to maintain files. Also referred to as drives, mass
Piracy Illegally copying or distributing software. storage, and auxiliary storage.
Plus sign (+) Used in search criteria to limit a search Subject tree A list of sites separated into
sa

to only those web pages containing two or more categories.


specified words.
Tablet PC A computer designed similar to a pad
Port Used to attach a peripheral device to a of paper.
computer.
TCP/IP (Transmission Control Protocol/Internet
Privacy policy A legally binding document that Protocol) Software used by networks connected
explains how any personal information will be to routers to communicate.
used.
Telecommunications The transmitting and receiv-
Programming languages A set of words, codes, and ing of data.
symbols that allows a programmer to communicate
with the computer. Topology The physical or logical arrangement of
the nodes on a network.
RAM (Random Access Memory) Memory that
temporarily stores data and instructions. Also called Transmission media The media that joins the nodes
primary or main memory. on a network to enable communication.

Real numbers Numbers that contain decimal Trojan horse Malicious code in the form of a program
points. that appears as something else, usually a program
that looks trustworthy.
Real time Occurs immediately.

Chapter 1 An Introduction to Computers 27


Ultra-portable devices Storage devices, such as
keychains, that are small and easy-to-use.
Unicode A digital code that uses a set of sixteen
1s and 0s to form a 16-bit binary code for each
symbol.
Utility program Program run by the operating
system to manage input and output, read and write
to memory, manage the processor, maintain system
security, and manage files and disks.
Virus A program that is designed to reproduce
itself by copying itself into other programs stored
on a computer without the user’s knowledge.
WAN (Wide Area Network) A network used to con-
nect computers over large geographical distances.

e
Wearable computer A mobile computing device
that is incorporated into clothing, eyewear, wrist-
wear, and other wearables.
Web See World Wide Web.
pl
Web beacon A tiny, transparent graphic located on
a web page used to collect data about the web page
user. Also called a web bug or pixel tag.
Web browser Interprets an HTML document to
display a web page.
Web directory See Subject tree.
m
Wireless network A type of network that does not
require the use of cables.
Word Bits grouped in units of 16 to 64.
World Wide Web The most widely used Internet
sa

service. Used to search and access information


available on the Internet.
Worm Program that is able to reproduce itself over
a network.

28 Chapter 1 An Introduction to Computers


Other documents randomly have
different content
MISCELLANEOUS RECEIPTS.
MINCED OYSTERS.— Take fifty fine large oysters, and mince them
raw. Chop also four or five small pickled cucumbers, and a bunch of
parsley. Grate about two tea-cupfuls of stale bread-crumbs, and beat
up the yolks of four eggs. Mix the whole together in a thick batter,
seasoning it with cayenne and powdered mace; and with a little salt
if the oysters are fresh. Have ready a pound of lard, and melt in the
frying-pan enough of it to fry the oysters well. If the lard is in too
small a quantity they will be flat and tough. When the lard is boiling
hot in the pan, put in about a table-spoonful at a time of the oyster-
mixture, and fry it in the form of small fritters; turning them so as to
brown on both sides. Serve them up hot, and eat them with small
bread rolls.

STEWED BLACK FISH.— Flour a deep dish, and lay in the bottom
a piece of butter rolled in flour. Then sprinkle it with a mixture of
parsley, sweet marjoram, and green onion; all chopped fine. Take
your black fish and rub it inside and outside with a mixture of
cayenne, salt, and powdered cloves and mace. Place skewers across
the dish, and lay the fish upon them. Then pour in a little wine, and
sufficient water to stew the fish. Set the dish in a moderate oven,
and let it cook slowly for an hour.
Shad or rock fish may be dressed in the same manner.

FRIED SMELTS.— These little fish are considered extremely fine.


Before they are cooked, cut off the heads and tails. Sprinkle the
smelts with flour, and have ready in a frying pan over the fire plenty
of fresh lard or butter. When it boils, put in the fish and fry them.
BROILED SWEETBREADS.— Split open and skewer the
sweetbreads; season them with pepper and salt, and with powdered
mace. Broil them on a gridiron till thoroughly done. While they are
broiling, prepare some melted butter seasoned with mace and a little
white wine, or mushroom catchup; and have ready some toast with
the crust cut off. Lay the toast in the bottom of a dish; place the
sweetbreads upon it, and pour over them the drawn butter.

PICKLED EGGS.— Boil twelve eggs quite hard, and lay them in
cold water; having peeled off the shells. Then put them whole into a
stone jar, with a quarter of an ounce of whole mace, and the same
quantity of cloves; a sliced nutmeg; a table-spoonful of whole
pepper; a small bit of ginger; and a peach leaf. Fill up the jar with
boiling vinegar; cover it closely that the eggs may cool slowly. When
they are cold, tie up the jar; covering the cork with leather. After it
has stood three days pour off the pickle, boil it up again, and return
it boiling hot to the eggs and spice. They will be fit for use in a
fortnight.

GUMBO SOUP.— Take four pounds of the lean of a fresh round of


beef and cut the meat into small pieces, avoiding carefully all the fat.
Season the meat with a little pepper and salt, and put it on to boil
with three quarts and a pint of water (not more.) Boil it slowly and
skim it well. When no more scum rises, put in half a peck of ochras,
peeled and sliced, and half a peck of tomatas cut in quarters. Boil it
slowly till the ochras and tomatas are entirely dissolved, and the
meat all to rags. Then strain it through a cullender, and send it to
table with slices of dry toast. This soup cannot be made in less than
seven or eight hours. If you dine at two you must put on the meat
to boil at six or seven in the morning. It should be as thick as a jelly.

SHREWSBURY CAKES.— Rub three quarters of a pound of butter


into two pounds of sifted flour, and mix in half a pound of powdered
sugar, and half a pound of currants, washed and dried. Wet it to a
stiff paste with rich milk. Roll it out, and cut it into cakes. Lay them
on buttered baking sheets, and put them into a moderate oven.

RICE FLUMMERY.— To two quarts of milk allow half a pound of


ground rice. Take out one pint of the milk, and mix the rice gradually
with it into a batter; making it quite smooth and free from lumps.
Put the three pints of milk into a skillet, (with a bunch of peach
leaves or a few peach-kernels,) and let it come to a boil. Then while
it is still boiling, stir in by degrees the rice batter, taking care not to
have it lumpy; add sugar, mace, and rose brandy to your taste; or
you may flavour it with the juice of a large lemon. When it has
boiled sufficiently, and is quite thick, strain it, and put it into a mould
to congeal. Make a rich boiled custard, (flavoured in the same
manner,) and send it to table in a pitcher, to eat with the flummery.
Both should be cold. If you mould it in tea-cups, turn it out on a
deep dish, and pour the custard round it.

APPLE BUTTER WITHOUT CIDER— Mix together ten gallons of


water, and ten gallons of the best West India molasses. Put it into a
large kettle over a good fire; let it come to a hard boil, and skim it as
long as any scum continues to rise. Then take out half the liquid,
and put it into a tub. Have ready eight bushels of fine sound apples,
pared, cored and quartered. Throw them gradually into the liquid
that is still boiling on the fire. Let it continue to boil hard, and as it
thickens, add by degrees the other half of the molasses and water,
(that which has been put into the tub.) Stir it frequently to prevent
its scorching, and to make it of equal consistence throughout. Boil it
ten or twelve hours, continuing to stir it. At night take it out of the
kettle, and set it in tubs to cool; covering it carefully. Wash out the
kettle and wipe it very dry.
Next morning boil the apple butter six or eight hours longer; it
should boil eighteen hours altogether. Then an hour before you take
it finally out, stir in a pound of mixed spice cloves, mace, cinnamon,
and nutmeg, all finely powdered. When entirely done, put up the
apple butter in stone or earthen jars. It will keep a year or more.
It can, of course, be made in a smaller quantity than that given in
the above receipt; and also at any time in the winter; fresh cider not
being an ingredient, as in the most usual way of making apple
butter.

AN APPLE POT PIE.— Make a paste, allowing a pound of butter, or


of chopped suet to two pounds and a quarter of flour. Have ready a
sufficient quantity of fine juicy acid apples, pared, cored, and sliced.
Mix with them brown sugar enough to sweeten them, a few cloves,
and some slips of lemon-peel. Butter the sides of an iron pot, and
line them with paste. Then put in the apples, interspersing them
with thin squares of paste, and add a very little water. Cover the
whole with a thick lid of paste, cutting a slit in the centre for the
water to bubble up, and let it boil two hours. When done, serve it up
on a large dish, and eat it with butter and sugar.

PUDDING CATCHUP.— Mix together half a pint of noyau; a pint of


sherry or other white wine; the yellow peel of four lemons, pared
thin; and half an ounce of mace. Put the whole into a large bottle,
and let it stand for two or three weeks. Then strain it, and add half a
pint of capillaire or strong sugar syrup; or of Curaçoa. Bottle it, and
it will keep two or three years. It may be used for various sweet
dishes, but chiefly for pudding-sauce mixed with melted butter.

CURAÇOA.— Grate as much fresh orange-peel as will make two


ounces when done; the peel of fresh shaddock will be still better. Mix
it with a pint of orange juice. Put it into a quart of the strongest and
clearest rectified spirit; shake it, let it infuse for a fortnight, and
strain it. Then make a syrup by dissolving a pound of the best loaf-
sugar in a pint of cold water, adding to it the beaten white of an egg,
and boiling and skimming it till the scum ceases to rise. Mix the
syrup with the strained liquor. Let it stand till next day, and then
filter it through white blotting paper fastened to the bottom of a
sieve. Curaçoa is a great improvement to punch; also a table-
spoonful of it in a tumbler of water makes a very refreshing summer
drink.

PATENT YEAST.— Boil half a pound of fresh hops in four quarts of


water, till the liquid is reduced to two quarts. Strain it, and mix in
sufficient wheat flour to make a thin batter; adding half a pint of
strong fresh yeast, (brewer's yeast, if it can be procured.) When it is
done fermenting, pour it into a pan, and stir in sufficient Indian meal
to make a moderately stiff dough. Cover it, and set it in a warm
place to rise. When it has become very light, roll it out into a thick
sheet, and cut it into little cakes. Spread them out on a dish, and let
them dry gradually in a cool place where there is no sun. Turn them
five or six times a day while drying; and when they are quite dry, put
them into paper bags, and keep them in a jar or box closely covered,
in a place that is not in the least damp.
When you want the yeast for use, dissolve in a little warm water one
or more of the cakes, (in proportion to the quantity of bread you
intend making,) and when it is quite dissolved, stir it hard, thicken it
with a little flour, cover it, and place it near the fire to rise before you
use it. Then mix it with the flour in the usual manner of preparing
bread.
This is a very convenient way of preserving yeast through the
summer, or of conveying it to a distance.

TO DRY HERBS.— By drying herbs with artificial heat as quickly as


possible, you preserve their scent and flavour much better than
when they are dried slowly by exposing them to the sun and air; a
process by which a large portion of their strength evaporates. All
sorts of herbs are in the greatest perfection just before they begin to
flower. Gather them on a dry day, and place them in an oven, which
must not be hot enough to discolour, scorch, or burn them. When
they are quite dry, take them out, and replace them with others. Pick
the leaves from the stems, (which may be thrown away,) and put
them into bottles or jars; cork them tightly, and keep them in a dry
place. Those that are used in cookery should be kept in a kitchen
closet.

PEACH KERNELS.— When peaches are in season, have in a


convenient place an old basket or something of the sort, in which all
the peach stones can be saved; they are too useful to be thrown
away. Then have them carefully cracked, so as to extract the kernels
whole if possible. Spread them out on a dish for one day. Then put
them into a box or jar, and keep them to use as bitter almonds; for
which they are an excellent substitute in flavouring custards, creams
and cakes. Plum stones are worth saving in the same manner.

LEMON-PEEL.— Never throw away the rind of a lemon. Keep a


wide-mouthed bottle half full of brandy, and put into it (cut in
pieces) all the lemon-rind that you do not immediately want. As the
white part of the rind is of no use, it will be best to pare off the
yellow very thin, and put that alone into the brandy, which will thus
imbibe a very fine lemon flavour, and may be used for many nice
purposes.

TO KEEP TOMATAS.— Take fine ripe tomatas, and wipe them dry,
taking care not to break the skin. Put them into a stone jar with cold
vinegar, adding a small thin muslin bag filled with mace, whole
cloves, and whole peppers. Then cork the jar tightly with a cork that
has been dipped in melted rosin, and put it away in a dry place.
Tomatas pickled in this manner keep perfectly well and retain their
colour. For this purpose use the small round button tomatas.
Morella cherries may be pickled thus, in cold vinegar.
ADDITIONAL RECEIPTS.
FRENCH GREEN PEA SOUP.— This soup is made without meat.
Put into a soup-pot four quarts of shelled green peas, two large
onions sliced, a handful of leaves of sweet marjoram shred from the
stalks, or a handful of sweet basil; or a mixed handful of both—also,
if you like it, a handful of green mint. Add four quarts of water, and
boil the whole slowly till all the peas are entirely to pieces. Then take
off the pot, and mash the peas well against its sides to extract from
them all their flavour. Afterward strain off the liquid into a clean pot,
and add to it a tea-cup full of the juice of spinach, which you must
prepare, while the soup is boiling, by pounding some spinach in a
mortar. This will give the soup a fine green colour. Then put in a
quarter of a pound of the best fresh butter rolled whole in flour; and
add a pint and a half more of shelled young peas. If you wish the
soup very thick, you may allow a quart of the additional peas.
Season it with a very little salt and cayenne; put it again over the
fire, and boil it till the last peas are quite soft, but not till they go to
pieces.
Have ready in a tureen two or three slices of toasted bread cut into
small squares or dice, and pour the soup on it.
This soup, if properly made, will be found excellent, notwithstanding
the absence of meat. It is convenient for fast days; and in the
country, where vegetables can be obtained from the garden, the
expense will be very trifling.
What is left may be warmed for the next day.

GIBLET SOUP.— Take three pounds of shin of beef or of neck of


mutton. Cut off the meat and break the bones. Then put the meat
with the bones into a soup-pot, with a tea-spoonful of salt, and
three quarts of water. Add a bunch of sweet marjoram, one of sweet
basil, and a quarter of an ounce of black pepper-corns, all tied in a
thin muslin rag; a sliced onion, and six or eight turnips and carrots,
cut small. Let the whole boil slowly for two or three hours, skimming
it well. In the mean time, have ready two sets of goose-giblets, or
four of duck. They must be scalded, and well washed in warm water.
Cut off the bills, and split the heads; and cut the necks and gizzards
into mouthfuls. Having taken the meat and bones out of the soup,
put in the giblets, with a head of celery chopped. Boil it slowly an
hour and a half, or more, taking care to skim it. Make a thickening of
an ounce and a half of butter, and a large table-spoonful of flour,
mixed together with a little of the soup. Then stir it into the pot,
adding a large table-spoonful of mushroom catchup, and some small
force-meat balls, or little dumplings. Boil the soup half an hour
longer. Then send it to table with the giblets in the tureen.

GUMBO.— Take an equal quantity of young tender ochras and of


ripe tomatas, (for instance, a quarter of a peck of each.) Chop the
ochras fine, and scald and peel the tomatas. Put them into a stew-
pan without any water. Add a lump of butter, and a very little salt
and pepper; and, if you choose, an onion minced fine. Let it stew
steadily for an hour. Then strain it, and send it to table as soup in a
tureen. It should be like a jelly, and is a favourite New Orleans dish.
Eat dry toast with it. This gumbo is for fast days.

HAM OMELET.— Take six ounces of cold boiled ham, and mince it
very fine, adding a little pepper. Beat separately the whites and yolks
of six eggs, and then mix them together; add to them gradually the
minced ham. Beat the whole very hard, and do not let it stand a
moment after it is thoroughly mixed. Have ready some boiling lard in
a frying-pan, and put in the omelet immediately. Fry it about ten
minutes or a quarter of an hour. When done, put it on a hot dish,
trim off the edges, and fold it over in a half moon. Send it to table
hot, and covered. It is eaten at breakfast.
If you wish a soft omelet, (not to fold over,) fry it a shorter time, and
serve it in a deep dish, to be helped with a spoon.
A similar omelet may be made of the lean of a cold smoked tongue.

BATTER PUDDING.— Take a quart of milk, and stir into it


gradually eight large table-spoonfuls of flour, carefully pressing out
all the lumps with the back of the spoon. Beat eight eggs very light,
and add them by degrees to the milk and flour. Then stir the whole
very well together.
Dip your pudding-cloth into boiling water, and then dredge it with
flour. Pour in the pudding, and tie it tightly, leaving room for it to
swell. Put it into a pot full of boiling water, and boil it hard for two
hours. Keep it in the pot till it is time to send it to table. Serve it up
with wine-sauce, butter and sugar, or molasses and cold butter.

PEACH MANGOES.— Take free-stone peaches of the largest size,


(when they are full grown, but not quite ripe,) and lay them in salt
and water for two days, covered with a board to keep them down.
Then take them out, wipe them dry, cut them open, and extract the
stones. Mix together, to your taste, minced garlic, scraped horse-
radish, bruised mustard seed, and cloves; and a little ginger-root
soaked in water to soften, and then sliced. Fill the cavity of the
peaches with this mixture. Then tie them round with pack-thread,
and put them into a stone jar till it is two-thirds full. Strew among
them some whole cloves, broken cinnamon, and a little cochineal.
Season some cold vinegar, (allowing to each quart a jill of fresh
made mustard, and a little ginger, and nutmeg,) and having mixed
this pickle well, fill up the jar with it.

BROILED TOMATAS.— Take large ripe tomatas; wipe them, and


split them in half. Broil them on a gridiron till brown, turning them
when half done. Have ready in a dish some butter seasoned with a
little pepper. When the tomatas are well broiled, put them into the
dish, and press each a little with the back of a spoon, so that the
juice may run into the butter and mix with it. This is to make the
gravy. Send them to table hot.
Tomatas are very good sliced, and fried in butter.

PRESERVED TOMATAS.— Take large fine tomatas, (not too ripe,)


and scald them to make the skins come off easily. Weigh them, and
to each pound allow a pound of the best white sugar, and the grated
peel of half a lemon. Put all together into a preserving kettle, and
having boiled it slowly for three hours, (skimming it carefully,) add
the juice of the lemons, and boil it an hour longer. Then put the
whole into jars, and when cool cover and tie them up closely. This is
a cheap and excellent sweetmeat; but the lemon must on no
account be omitted. It may be improved by boiling a little ginger
with the other ingredients.

TOMATA HONEY.— To each pound of tomatas, allow the grated


peel of a lemon and six fresh peach-leaves. Boil them slowly till they
are all to pieces; then squeeze and strain them through a bag. To
each pint of liquid allow a pound of loaf-sugar, and the juice of one
lemon. Boil them together half an hour, or till they become a thick
jelly. Then put it into glasses, and lay double tissue paper closely
over the top. It will be scarcely distinguishable from real honey.

PRESERVED CUCUMBERS.— Your cucumbers should be well


shaped, and all of the same size. Spread the bottom and sides of a
preserving kettle with a thick layer of vine leaves. Then put in the
cucumbers with a little alum broken small. Cover them thickly with
vine leaves, and then with a dish. Fill up the kettle with water, and
let them hang over a slow fire till next morning, but do not allow the
water to boil. Next day, take them out, cool them, and repeat the
process with fresh vine leaves, till the cucumbers are a fine green.
When cold drain them, cut a small piece out of the flat side, and
extract the seeds. Wipe the cucumbers in a dry cloth, and season
the inside with a mixture of bruised mace and grated lemon-peel.
Tie on with a pack-thread the bit that was cut out.
Weigh them, and to every pound of cucumbers allow a pound of
loaf-sugar. Put the sugar into a preserving kettle, a half pint of water
to each pound, and the beaten white of an egg to every two pounds.
Boil and skim the sugar till quite clear, adding sliced ginger and
lemon parings to your taste. When cool, pour it over the cucumbers,
and let them lie in it two days, keeping them covered with a plate,
and a weight on it to press it down. Then boil up the syrup again,
adding one-half as much sugar, &c. as you had at first; and at the
last the juice and grated peel of two lemons for every six cucumbers.
The lemon must boil in the syrup but ten minutes. Then strain the
syrup all over the cucumbers, and put them up in glass jars.
If they are not quite clear, boil them in a third syrup. Small green
melons may be preserved in this manner.

APPLE RICE PUDDING.— Wash half a pint of rice, and boil it till
soft and dry. Pare, core, and cut up six large juicy apples, and stew
them in as little water as possible. When they are quite tender, take
them out, and mash them with six table-spoonfuls of brown sugar.
When the apples and rice are both cold, mix them together. Have
ready five eggs beaten very light, and add them gradually to the
other ingredients, with five or six drops of essence of lemon, and a
grated nutmeg. Or you may substitute for the essence, the grated
peel and the juice of one large lemon. Beat the whole very hard
after it is all mixed; tie it tightly in a cloth, (leaving but a very small
space for it to swell,) and stopping up the tying place with a lump of
flour moistened to paste with water. Put it into a pot of boiling water,
and boil it fast for half an hour. Send it to table hot, and eat it with
sweetened cream, or with beaten butter and sugar.

BAKED APPLE DUMPLINGS.— Take large, fine, juicy apples, and


pare and core them, leaving them as whole as possible. Put them
into a kettle with sufficient water to cover them, and let them parboil
a quarter of an hour. Then take them out, and drain them on a
sieve. Prepare a paste in the proportion of a pound of butter to two
pounds of flour, as for plain pies. Roll it out into a sheet, and cut it
into equal portions according to your number of apples. Place an
apple on each, and fill up the hole from whence the core was
extracted with brown sugar moistened with lemon-juice, or with any
sort of marmalade. Then cover the apple with the paste, closing it
neatly. Place the dumplings side by side in buttered square pans,
(not so as to touch,) and bake them of a light brown. Serve them
warm or cool, and eat them with cream sauce.
They will be found very good.

INDIAN LOAF CAKE.— Mix a tea-cup full of powdered white sugar


with a quart of rich milk, and cut up in the milk two ounces of butter,
adding a salt-spoonful of salt. Put this mixture into a covered pan or
skillet, and set it on coals till it is scalding hot. Then take it off, and
scald with it as much yellow Indian meal (previously sifted) as will
make it of the consistence of thick boiled mush. Beat the whole very
hard for a quarter of an hour, and then set it away to cool.
While it is cooling, beat three eggs very light, and stir them gradually
into the mixture when it is about as warm as new milk. Add a tea-
cup full of good strong yeast, and beat the whole another quarter of
an hour—for much of the goodness of this cake depends on its being
long and well beaten. Then have ready a turban mould or earthen
pan with a pipe in the centre, (to diffuse the heat through the
middle of the cake.) The pan must be very well buttered, as Indian
meal is apt to stick. Put in the mixture, cover it, and set it in a warm
place to rise. It should be light in about four hours. Then bake it two
hours in a moderate oven. When done, turn it out with the broad
surface downwards, and send it to table hot and whole. Cut it into
slices, and eat it with butter.
This will be found an excellent cake. If wanted for breakfast, mix it,
and set it to rise the night before. If properly made, standing all
night will not injure it. Like all Indian cakes, (of which this is one of
the best,) it should be eaten warm. It will be much improved by
adding to the mixture, a salt-spoon of pearl-ash, or sal-aratus,
dissolved in a little water.
PLAIN CIDER CAKE.— Sift into a large pan a pound and a half of
flour, and rub into it half a pound of butter. Mix in three-quarters of a
pound of powdered white sugar, and melt a small tea-spoonful of
sal-aratus or pearl-ash in a pint of the best cider. Pour the cider into
the other ingredients while it is foaming, and stir the whole very
hard. Have ready a buttered square pan, put in the mixture, and set
it immediately in a rather brisk oven. Bake it an hour or more,
according to its thickness. This is a tea cake, and should be eaten
fresh. Cut it into squares, split and butter them.

TENNESSEE MUFFINS.— Sift three pints of yellow Indian meal,


and put one-half into a pan and scald it. Add a good piece of butter.
Beat six eggs, whites and yolks separately. The yolks must be beaten
till they become very thick and smooth, and the whites till they are a
stiff froth that stands alone. When the scalded meal is cold, mix it
into a batter with the beaten yolk of egg, the remainder of the meal,
a salt-spoonful of salt, and, if necessary, a little water. The batter
must be quite thick. At the last, stir in, lightly and slowly, the beaten
white of egg. Grease your muffin rings, and set them in an oven of
the proper heat; put in the batter immediately, as standing will injure
it.
Send them to table hot; pull them open, and eat them with butter.

HOE CAKE.— Beat the whites of three eggs to a stiff froth, and sift
into a pan a quart of wheat flour, adding a salt-spoon of salt. Make a
hole in the middle, and mix in the white of egg so as to form a thick
batter, and then add two table-spoonfuls of the best fresh yeast.
Cover it, and let it stand all night. In the morning, take a hoe-iron
(such as are made purposely for cakes) and prop it before the fire till
it is well heated. Then flour a tea-saucer, and filling it with batter,
shake it about, and clap it to the hoe, (which must be previously
greased,) and the batter will adhere till it is baked. Repeat this with
each cake. Keep them hot, and eat them with butter.
MILK TOAST.— Boil a pint of rich milk, and then take it off, and stir
into it a quarter of a pound of fresh butter, mixed with a small table-
spoonful of flour. Then let it again come to a boil. Have ready two
deep plates with half a dozen slices of toast in each. Pour the milk
over them hot, and keep them covered till they go to table. Milk
toast is generally eaten at breakfast.

POTATO YEAST.— Pare half a dozen middle-sized potatoes, and


boil them in a quart of soft water, mixed with a handful of hops, till
quite soft. Then mash the potatoes smooth, not leaving in a single
lump. Mix with them a handful of wheat flour. Set a sieve over the
pan in which you have the flour and mashed potatoes, and strain
into them the hop-water in which they were boiled. Then stir the
mixture very hard, and afterwards pass it through a cullender to
clear it of lumps. Let it stand till it is nearly cold. Then stir in four
table-spoonfuls of strong yeast, and let it stand to ferment. When
the foam has sunk down in the middle, (which will not be for several
hours,) it is done working. Then put it into a stone jug and cork it.
Set it in a cool place.
This yeast will be found extremely good for raising home-made
bread.
Yeast when it becomes sour may be made fit to use by stirring into it
a little sal-eratus, or pearl-ash, allowing a small tea-spoonful to a
pint of yeast. This will remove the acidity, and improve the bread in
lightness. The pearl-ash must be previously melted in a little
lukewarm water.

CREAM CHEESE.— The cheese so called, of which numbers are


brought to Philadelphia market, is not made entirely of cream, but of
milk warm from the cow, (and therefore unskimmed,) mixed with
cream of last night. To a small tub of fresh morning's milk, add the
cream skimmed from an equal quantity of last evening's milk. Mix
the cream and the new milk together, and warm them to about
blood-heat or 100 degrees of the thermometer. Have ready a cup of
water in which has been soaking, since last night, a piece of rennet,
(the salt wiped off,) about the length and breadth of two fingers. Stir
the rennet-water into the vessel of mixed milk and cream, and set it
in a warm place till the curd has completely formed. Then, with a
knife, cut the curd into squares. Next, take a large, thin, straining-
cloth, and press it down on the curd so as to make the whey rise up
through it. As the whey rises, dip it off with a saucer or skimming
dish. When the whey is nearly all out, put the curd into the cloth,
and squeeze and press it with your hands till it becomes dry. Next,
crumble the curd very fine with your hands, and then salt it to your
taste. Then wash the straining-cloth clean, and lay it in the cheese-
hoop (a bottomless vessel, about the size of a dinner-plate,
perforated with small gimlet-holes) put the crumbled curd into the
cloth, and then fold the rest of the cloth closely over it. The cheese-
hoop should be set on a clean wooden bench or table. Place on it its
round wooden cover, so as to fit exactly; and lay on the top two
bricks or a heavy stone. After it has stood six hours in the hoop or
mould, turn it, and let it stand six hours longer.
When you take out the cheese, rub it all over with a little fresh
butter. Set it in a dark, dry place, turning it every day, and in four or
five days it will be fit for use. When once cut, it should be eaten
immediately, if the weather is warm. But while uncut, it may keep a
week in a cold place, provided it is turned several times a-day.

ALMOND BREAD.— Blanch, and pound in a mortar, half a pound of


shelled sweet almonds till they are a smooth paste, adding rose-
water as you pound them. They should be done the day before they
are wanted. Prepare a pound of loaf-sugar finely powdered, a tea-
spoonful of mixed spice, (mace, nutmeg, and cinnamon,) and three-
quarters of a pound of sifted flour. Take fourteen eggs, and separate
the whites from the yolks. Leave out seven of the whites, and beat
the other seven to a stiff froth. Beat the yolks till very thick and
smooth, and then beat the sugar gradually into them, adding the
spice. Next stir in the white of egg, then the flour, and lastly the
almonds. Add the juice of a large lemon.
Put the mixture into a square tin pan, (well buttered,) or into a
copper or tin turban-mould, and set it immediately in a brisk oven.
Ice it when cool. It is best if eaten fresh.
You may add a few bitter almonds to the sweet ones.

CUSTARD CAKES.— Mix together a pound of sifted flour and a


quarter of a pound of powdered loaf-sugar. Divide into four a pound
of fresh butter; mix one-fourth of it with the flour, and make it into a
dough. Then roll it out, and put in the three remaining divisions of
the butter at three more rollings. Set the paste in a cool place till the
custard is ready.
For the custard, beat very light the yolk only of eight eggs, and then
stir them gradually into a pint of rich cream, adding three ounces of
powdered white sugar, a grated nutmeg, and ratafia, peach-water, or
essence of lemon, to your taste. Put the mixture into a deep dish;
set it in an iron baking pan or a Dutch oven half full of boiling water,
and bake it a quarter of an hour. Then put it to cool.
In the mean time roll out the paste into a thin sheet; cut it into little
round cakes about the size of a dollar, and bake them on flat tins.
When they are done, spread some of the cakes thickly with the
custard, and lay others on the top of them, making them fit closely
in the manner of lids.
You may bake the paste in patty-pans like shells, and put in the
custard after they come out of the oven. If the custard is baked in
the paste, it will be clammy and heavy at the bottom.
You may flavour the custard with vanilla.

HONEY GINGER CAKE.— Rub together a pound of sifted flour and


three-quarters of a pound of fresh butter. Mix in, a tea-cup of fine
brown sugar, two large table-spoonfuls of strong ginger, and (if you
like them) two table-spoonfuls of carraway seeds. Having beaten five
eggs, add them to the mixture alternately with a pint of strained
honey; stirring in towards the last a small tea-spoonful of pearl-ash,
that has been melted in a very little vinegar.
Having beaten or stirred the mixture long enough to make it
perfectly light, transfer it to a square iron or block-tin pan, (which
must be well buttered,) put it into a moderate oven, and bake it an
hour or more, in proportion to its thickness.
When cool, cut it into squares. It is best if eaten fresh, but it will
keep very well a week.

ROCK CAKE.— Blanch three-quarters of a pound of shelled sweet


almonds, and bruise them fine in a mortar, but not to a smooth
paste as for maccaroons. Add, as you pound them, a little rose-
water. Beat to a stiff froth the whites of four eggs, and then beat in
gradually a pound of powdered loaf-sugar. Add the juice of a lemon.
Then mix in the pounded almonds. Flour your hands, and make the
mixture into little cones or pointed cakes. Spread sheets of damp,
thin, white paper on buttered sheets of tin, and put the rock cakes
on it, rather far apart. Sprinkle each with powdered loaf-sugar. Bake
them of a pale brown, in a brisk oven. They will be done in a few
minutes.
When cold, take them off the papers.

FROZEN CUSTARD.— Slice a vanilla bean, and boil it slowly in half


a pint of milk, till all the strength is extracted and the milk highly
flavoured with the vanilla. Then strain it, and set it aside. Mix a quart
of cream and a pint of milk, or, if you cannot procure cream, take
three pints of rich milk, and put them into a skillet or sauce-pan. Set
it on hot coals, and boil it. When it has come to a boil, mix a table-
spoonful of flour in three table-spoonfuls of milk, and stir it into the
boiling liquid. Afterwards add six eggs, (which have been beaten up
with two table-spoonfuls of milk,) pouring them slowly into the
mixture. Take care to stir it all the time it is boiling. Five minutes
after, stir in gradually half a pound of powdered loaf-sugar, and then
the decoction of vanilla. Having stirred it hard a few moments, take
it off the fire, and set it to cool. When quite cold, put it into a mould
and freeze it, as you would ice-cream, for which it frequently passes.
You may flavour it with the juice of two large lemons, stirred in just
before you take it from the fire, or with a quarter of a pound of
shelled bitter almonds, blanched, pounded in a mortar with rose-
water, and then boiled in half a pint of milk, till the flavour is
extracted. Then use the milk only.

CHERRY CORDIAL.— Take a bushel of fine ripe cherries, either red


or black, or mixed; stone them, put them into a clean wooden
vessel, and mash them with a mallet or beetle. Then boil them about
ten minutes, and strain the juice. To each quart of juice allow a
quart of water, a pound of sugar, and a quart of brandy. Boil in the
water (before you mix it with the juice) two ounces of cloves, and
four ounces of cinnamon; then strain out the spice. Put the mixture
into a stone jug, or a demijohn, and cork it tightly. Bottle it in two or
three months.

COMMON ICE CREAM.— Split into pieces a vanilla bean, and boil
it in a very little milk till the flavour is well extracted; then strain it.
Mix two table-spoonfuls of arrow-root powder, or the same quantity
of fine powdered starch with just sufficient cold milk to make it a
thin paste; rubbing it till quite smooth. Mix together a pint of cream
and a pint of rich milk; and afterwards stir in the preparation of
arrow-root, and the milk in which the vanilla has been boiled. Beat it
very hard, stir in half a pound of powdered loaf-sugar, beating it very
hard again. Then strain it, and put it into a freezer placed in a tub
that has a hole in the bottom to let out the water; and surround the
freezer on all sides with ice broken finely, and mixed with coarse
salt. Beat the cream hard for half an hour. Then let it rest;
occasionally taking off the cover, and scraping down with a long
spoon the cream that sticks to the sides. When it is well frozen,
transfer it to a mould; surround it with fresh salt and ice, and then
freeze it over again. If you wish to flavour it with lemon instead of
vanilla, take a large lump of the sugar before you powder it, and rub
it on the outside of a large lemon till the yellow is all rubbed off
upon the sugar. Then, when the sugar is all powdered, mix with it
the juice of two large lemons.
For strawberry ice cream, mix with the powdered sugar the juice of
a quart of ripe strawberries squeezed through a linen bag.

PINK CHAMPAGNE JELLY.— Beat up the white of an egg to a stiff


froth, and then stir it hard into three wine-glasses of filtered water.
Put twelve ounces of the best double-refined loaf-sugar (powdered
fine and sifted) into a skillet lined with porcelain. Pour on it the white
of egg and water, and stir it till dissolved. Then add twelve grains of
cochineal powder. Set it over a moderate fire, and boil it and skim it
till the scum ceases to rise. Then strain it through a very fine sieve.
Have ready an ounce and a half of isinglass that has been boiled in a
little water till quite dissolved. Strain it, and while the boiled sugar is
lukewarm mix it with the isinglass, adding a pint of pink champagne
and the juice of a large lemon. Run it through a linen bag into a
mould. When it has congealed so as to be quite firm, wrap a wet
cloth round the outside of the mould, and turn out the jelly into a
glass dish; or serve it broken up, in jelly glasses, or glass cups.
Jelly may be made in a similar manner of Madeira, marasquin, or
noyau.

A CHARLOTTE RUSSE.— Boil in half a pint of milk a split vanilla


bean, till all the flavour is extracted. Then strain the milk, and when
it is cold stir into it the yolks of four beaten eggs, and a quarter of a
pound of powdered loaf-sugar. Simmer this custard five minutes over
hot coals, but do not let it come to a boil. Then set it away to cool.
Having boiled an ounce of the best Russian isinglass in a pint of
water till it is entirely dissolved and the water reduced to one-half,
strain it into the custard, stir it hard, and set it aside to get quite
cold.
Whip to a stiff froth a quart of rich cream, taking it off in spoonfuls
as you do it, and putting it to drain on an inverted sieve. When the
custard is quite cold, (but not yet set or congealing,) stir the whipt
cream gradually into it.
Take a circular mould of the shape of a drum, the sides being
straight. Cut to fit it two round slices from the top and bottom of an
almond sponge-cake; glaze them with white of egg, and lay one on
at the bottom of the mould, reserving the other for the top. You can
get the mould at a tinner's.
Having thus covered the bottom, line the sides of the mould with
more of the sponge-cake, cut into long squares and glazed all over
with white of egg. They must be placed so as to stand up all round—
each wrapping a little over the other so as to leave not the smallest
vacancy between; and they must be cut exactly the height of the
mould, and trimmed evenly. Then fill up with the custard and cream
when it is just beginning to congeal; and cover the top with the
other round slice of cake.
Set the mould in a tub of pounded ice mixed with coarse salt; and
let it remain forty minutes, or near an hour. Then turn out the
Charlotte on a china dish. Have ready an icing, made in the usual
manner of beaten white of egg and powdered sugar, flavoured with
essence of lemon. Spread it smoothly over the top of the Charlotte,
which when the icing is dry will be ready to serve. They are
introduced at large parties, and it is usual to have two or four of
them.

A CHARLOTTE POLONAISE.— Boil over a slow fire a pint and a


half of cream. While it is boiling have ready six yolks of eggs, beaten
up with two table-spoonfuls of powdered arrow-root, or fine flour.
Stir this gradually into the boiling cream, taking care to have it
perfectly smooth and free from lumps. Ten minutes will suffice for
the egg and cream to boil together. Then divide the mixture by
putting it into two separate sauce-pans.
Then mix with it, in one of the pans, six ounces of chocolate scraped
fine, two ounces of powdered loaf-sugar, and a quarter of a pound
of maccaroons, broken up. When it has come to a hard boil, take it
off, stir it well, pour it into a bowl, and set it away to cool.
Have ready, for the other sauce-pan of cream and egg, a dozen
bitter almonds, and four ounces of shelled sweet almonds or
pistachio nuts, all blanched and pounded in a mortar with rose-water
to a smooth paste, and mixed with an ounce of citron also pounded.
Add four ounces of powdered sugar; and to colour it green, two
large spoonfuls of spinach juice that has been strained through a
sieve. Stir this mixture into the other half of the cream, and let it
come to a boil. Then put it aside to cool.
Cut a large sponge-cake into slices half an inch thick. Spread one
slice thickly with the chocolate cream, and cover another slice with
the almond cream. Do this alternately (piling them evenly on a china
dish) till all the ingredients are used up. You may arrange it in the
original form of the sponge-cake before it was cut, or in a pyramid.
Have ready the whites of the six eggs whipped to a stiff froth, with
which have been gradually mixed six ounces of powdered sugar, and
twelve drops of oil of lemon. With a spoon heap this meringue (as
the French call it) all over the pile of cake, &c., and then sift
powdered sugar over it. Set it in a very slow oven till the outside
becomes a light brown colour.
Serve it up cold, ornamented according to your taste.
If you find the chocolate cream too thin, add more maccaroons. If
the almond cream is too thin, mix in more pounded citron. If either
of the mixtures is too thick, dilute it with more cream.
This is superior to a Charlotte Russe.

APPLE COMPOTE.— Take large ripe pippin apples. Pare, core, and
weigh them, and to each pound allow a pound of fine loaf-sugar and
two lemons. Parboil the apples, and then set them out to cool. Pare
off very nicely with a penknife the yellow rind of the lemons, taking
care not to break it; and then with scissors trim the edges to an
even width all along. Put the lemon-rind to boil in a little sauce-pan
by itself, till it becomes tender, and then set it to cool. Allow half a
pint of water to each pound of sugar; and when it is melted, set it
on the fire in the preserving kettle, put in the apples, and boil them
slowly till they are clear and tender all through, but not till they
break; skimming the syrup carefully. After you have taken out the
apples, add the lemon-juice, put in the lemon-peel, and boil it till
quite transparent. When the whole is cold, put the apples with the
syrup into glass dishes, and dispose the wreaths of lemon-peel
fancifully about them.

SOUR MILK.— To recover milk that has turned sour, stir in


powdered carbonate of magnesia, of which allow a heaped tea-
spoonful to each quart of milk.
Welcome to Our Bookstore - The Ultimate Destination for Book Lovers
Are you passionate about books and eager to explore new worlds of
knowledge? At our website, we offer a vast collection of books that
cater to every interest and age group. From classic literature to
specialized publications, self-help books, and children’s stories, we
have it all! Each book is a gateway to new adventures, helping you
expand your knowledge and nourish your soul
Experience Convenient and Enjoyable Book Shopping Our website is more
than just an online bookstore—it’s a bridge connecting readers to the
timeless values of culture and wisdom. With a sleek and user-friendly
interface and a smart search system, you can find your favorite books
quickly and easily. Enjoy special promotions, fast home delivery, and
a seamless shopping experience that saves you time and enhances your
love for reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!

ebookgate.com

You might also like