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

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

A Guide to Programming in Java is a comprehensive textbook designed for one or two-term courses, aimed at teaching programming concepts using Java. It emphasizes problem-solving skills, proper programming style, and includes hands-on reviews, exercises, and teacher resources. The book is suitable for beginners and provides a clear introduction to programming, preparing students for further studies in IT and computer science.

Uploaded by

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

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

A Guide to Programming in Java is a comprehensive textbook designed for one or two-term courses, aimed at teaching programming concepts using Java. It emphasizes problem-solving skills, proper programming style, and includes hands-on reviews, exercises, and teacher resources. The book is suitable for beginners and provides a clear introduction to programming, preparing students for further studies in IT and computer science.

Uploaded by

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

A Guide To Programming in Java Java 2 Platform

Standard Edition 5 Beth Brown 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


Get Your Digital Files Instantly: PDF, ePub, MOBI and More
Quick Digital Downloads: PDF, ePub, MOBI and Other Formats

Java 2 micro edition Java in small things James White

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

Programming in Java 2nd edition Edition Choudhary

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

Java 2 A Beginner s Guide 2nd Edition Steven Holzner

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

Java Programming 8th Edition Joyce Farrell

https://ebookgate.com/product/java-programming-8th-edition-joyce-
farrell/
Java Programming 6th Edition Joyce Farrell

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

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/

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/

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/

Pentaho Reporting 3 5 for Java Developers Gorman

https://ebookgate.com/product/pentaho-reporting-3-5-for-java-
developers-gorman/
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


Discovering Diverse Content Through
Random Scribd Documents
The Project Gutenberg eBook of Della
architettura gotica
This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.

Title: Della architettura gotica

Author: Carlo Troya

Release date: October 28, 2019 [eBook #60588]


Most recently updated: October 17, 2024

Language: Italian

Credits: Produced by Barbara Magni and the Online Distributed


Proofreading Team at http://www.pgdp.net (This file was
produced from images made available by The Internet
Archive)

*** START OF THE PROJECT GUTENBERG EBOOK DELLA


ARCHITETTURA GOTICA ***
DELLA
ARCHITETTURA GOTICA
DELLA
ARCHITETTURA GOTICA
DISCORSO
di

CARLO TROYA

Estratto dal Giornale il Giambattista Vico.

NAPOLI
STABILIMENTO TIPOGRAFICO DEL CAV. GAETANO NOBILE
1857
DELLA ARCHITETTURA GOTICA

Io prendo a ridurre in un corpo solo ed a compendiare le cose, che


ho sparsamente scritte sull'Architettura Gotica, secondo le varie
occorrenze ora della mia Storia d'Italia ed ora del mio Codice
Diplomatico Longobardo. Fondamento primiero d'un tale studio è il
fatto da me posto in chiarezza, che i Goti altri non furono se non i
discendenti de' Geti di Tracia, ricordati da Erodoto, ed indi tragittatisi
di là dal Danubio nell'Europa Orientale, ove più tardi ebbero il nome
anche di Daci. Ma nel presente lavoro non posso ritessere i racconti
dell'infinite loro trasmigrazioni, durante il corso di nove secoli dall'età
d'Erodoto, fino a quella in cui vennero in Italia gli Ostrogoti di
Teodorico degli Amali, ed i Visigoti si condussero nelle Gallie
Meridionali ed in Ispagna col Re loro Ataulfo. Dovrò dunque starmi
contento ad alcuni fatti principalissimi, lasciando la cura di
rammentare gli altri alla Tavola Cronologica, da me pubblicata fin dal
1842. Quivi s'additano e chiamansi ad esame l'autorità ed i
Documenti delle mie narrazioni, onde poi diedi un Prospetto ne' Fasti
Getici o Gotici.
I Documenti, accennati nell'anzidetta Tavola Cronologica, piacquero
al celebratissimo Giacobbe Grimm, che tutti li riferì, e non ne omise
alcuno, in un Discorso intorno a' Geti, da lui letto nel 5 marzo 1846
all'Accademia di Berlino [1]. Altro egli non v'aggiunse di nuovo fino al
sesto secolo prima di Gesù Cristo, se non una citazione d'Anastasio
Sinaita intorno a' Daci o Dani. Ben l'animo dovè godermi nello
scorgere, che un uomo sì dotto calcasse le stesse vie, che io aveva
tenute, per dimostrare l'identità de' Geti o Goti e de' Daci: ma non
potei consentire alla sua opinione, che tutti costoro avessero formato
un solo popolo co' Germani di Tacito, e però co' Longobardi guidati
dal Re Alboino in Italia e coi Franchi tramutatisi nelle Gallie. Io non
nego, che Geti o Goti e Germani vennero in principio dall'Asia, donde
si partirono tutte le genti; ma già io aveva negato [2], ed or torno a
negare, che i Germanii riposti da Erodoto fra' popoli agricoltori
dell'antica Persia nelle regioni più felici del nostro globo fossero stati,
per la nuda somiglianza del nome, i progenitori de' Germani di
Tacito, cotanto schivi, e per lunghi secoli, dell'agncollura ferma e
stanziale. Nè credo, che quegli agresti abitatori de' rozzi e vili tugurj
descritti da Tacito avessero conservato alcuna memoria
dell'Architettura Orientale, allorchè di mano in mano s'andarono
allargando nell'inospite selve interposte fra il Reno, il Danubio ed il
Baltico. Sia stata qualunque l'età, in cui da una regione qualunque
dell'Asia giunsero in questi altre volte sì paurosi spazj d'Europa gli
antenati de' Germani di Tacito, egli è certo che v'inselvatichirono, e
vi perdettero la rimembranza d ogni precedente lor civiltà, se pur
l'ebbero: egli è certo, che tali senza niuna di queste rimembranze
durarono per molti secoli, nè prima dell'ottavo penetrovvi l'aura
Cristiana, per la quale, alla voce di San Bonifazio, cominciarono ad
edificarsi le prime Città e ad erigersi le prime Cattedrali.

I.

Non così avvenne a' Geti o Goti, che si fermarono in Tracia e


ristettero presso alle bocche del Danubio, in luoghi men lontani
dall'Egitto e dall'Asia Minore. Verso l'anno 640 innanzi Gesù Cristo
signoreggiò sovr'essi Zamolxi (Erodoto lo credeva più antico); erudito
nell'arti d'Egitto e d'Oriente. Zamolxi, fece costruire un cenacolo,
dove solea congregare gli Ottimati del popolo e tra lieti desinari
predicar la Religione, che parve percorrere al Cristianesimo e che più
onorò la dignità dell'uomo, sì come Religione fondata sul dogma
dell'immortalità dell'anima. I Geti o Goti allora concepirono un gran
dispregio della vita per la speranza d'andare a ricongiungersi con
Zamolxi, accettato da essi per Dio. Morivano allegri fra' crudeli
tormenti dell'esser lanciati nell'alto e fatti cadere sopra una selva di
dardi ritti ad ucciderli. Chiamaronsi da indi in qua gl'Immortali: e si
divisero in varie Caste. Prima tra queste fu la Sacerdotale de'
Tarabosti o de' Zorabos Tereos, donde uscivano i sommi Sacerdoti ed
i Re. Un altr'ordine Sacerdotale appellossi de' Pii, che con l'armonie
delle Cetre concludeva i pubblici accordi e ponea fine alle guerre,
vestito di candide vesti.
Coloro, i quali fondano la Storia primitiva de' popoli su' facili ed
anche sugl'ingegnosi diletti dell'etimologie d'alcune pochissime voci
di sempre incerto e mutabile significato, veggano se v'ha nulla di
simile nella sostanza viva de' fatti Getici, e de' Germanici: e se nel
settimo secolo avanti l'Era di Gesù Cristo i Germani di Tacito
potessero vantarsi d'avere l'Architettura, buona o cattiva, d'un
cenacolo, che fu la culla d'una Religione illustre, sebbene spietata e
brutta por le sue molte superstizioni ed incantagioni; d'una
Religione, ch'ebbe la sua Gerarchia ed i suoi Pontefici e le sue
Liturgie particolari e le sue Cetre, operatrici di grandi effetti politici.
Nel 640 innanzi Gesù Cristo, niun sospetto della futura loro grandezza
davano i Romani, e della gloria con cui avrebbe Traiano dopo nove
altri secoli vinta una parte, una parte sola del popolo di Zamolxi.

II.

Filippo di Macedonia, padre d'Alessando, guerreggiò contro i Geti o


Goti e si rivolse repentinamente contro la loro città d'Udisitana in
Tracia. Ogni speranza di salute s'era perduta dagli assediati, quando
si videro prorompere alla volta del Macedone i Pii, ravvolti nelle
bianche vesti, e spalancar le Porte con le lor Cetre in mano, sì come
narra lo Storico Dione Crisostomo [3]. A' loro concenti non aspettati
s'arrestarono stupefatti gli assalitori, e non solamente Filippo
concedè a' Geti la pace, ma tolse in moglie Medopa, nata dal Re loro
Gotila [4]. In quell'età, già le Colonie dei Geti di Tracia erano passate
ad abitare di là dal Danubio, ed aveano già costruita la città d'Elis,
ove Alessandro, figliuolo di Filippo, gli assalì con breve insulto, prima
di partirsi alla volta dell'Indie. Vi giunse non osservato, menando i
suoi Macedoni per traverso alle biade cresciute nelle Getiche
pianure: guastò e distrusse la città, ma i Geti ne fecero a capo di
qualche anno una fiera vendetta, uccidendo il suo Luogotenente
Zopirione, che guidava trenta mila Macedoni contro essi. Più fiera,
perchè più nobile, riuscì quella che presero di Lisimaco, successor
d'Alessandro nel Regno di Tracia, quando il Re de' Geti Dromiehete lo
fe' prigioniero in battaglia, e, secondo il costume Zamolxiano,
apprestogli splendide cene, dopo le quali e' diè al vinto Lisimaco una
sua figliuola in nuora.
Tanta possanza nell'armi e modi sì squisiti di vivere, durante la pace,
rivelano la Storia occulta delle conquiste de' Geti o Goti e del loro
innoltrarsi gradatamente nelle vaste contrade, che s'aprono tra 'l
Danubio ed il Baltico. Ignota fu alla più parte de' Greci la Storia de'
progressi, che il popolo degl'Immortali di Zamolxi fece nell'Oriente
d'Europa: ignota, o dissimulata da' loro Scrittori Ecateo d'Abdera,
Eforo, Senofonte di Lampsaco e Filemone, per quanto può
raccogliersi da' loro brevi e scarni frammenti. Ellenico di Lesbo,
Platone, Timeo e Diodoro Siculi con altri non tacquero de' Geti e
delle loro incantagioni: ma Teopompo li confuse con altre genti e
narrò incredibili cose, quantunque avesse detto il vero, lodando le
Cetre de' Pii [5]. Nel secondo secolo innanzi l'Era Volgare, Posidonio
rammentò l'usanze de' Getici Ctisti o Capnobati da' quali s'ebbe in
onore il celibato, e si pose in opera una particolar sorta di suffumigj
e di sacrificj [6]. Queste memorie di Posidonio ci furono trasmesse da
Strabone, che più e meglio di qualunque altro avrebbe con la sua
perspicua brevità potuto delinearci le Storie antiche de' Goti: ma da
ciò per l'appunto, e con nostro grave danno, e' disse volersi
rimanere [7]. Niun popolo intanto fra quelli, a' quali davasi da' Greci
l'appellazione di Barbari, avea Storie più antiche e più certe di quelle
de' Geti o Goti.
Alle discipline cotanto vetuste sì dell'Architettura e sì della Musica
presso gl'Immortali recò grandi mutazioni Deceneo, che Strabone
distingue col titolo di prestigiatore, per additare le maravigliose
riforme da lui fatte appo i Geti o Goti d'oltre il Danubio, ed i suoi
stabilimenti sul Sacro Monte detto de' Cogeoni. Venne dall'Egitto e
dall'Oriente sì fatto prestigiatore: introdusse il culto dei Minori Dei
dopo Zamolxi e degli Eroi; fabbricò in onor loro piccoli Tempj, che
attestano sempre viva e fiorente la successione delle Architettoniche
arti, onde a' Geti o Goti di Tracia il cenacolo di Zamolxi avea dato i
lineamenti, Orientali forse, non Egizj, e che fu la sede primiera delle
sue incantagioni.
Le riforme di Deceneo avvennero al tempo di Lucio Silla, quando
Berebisto regnava su' Geti, allargando fuor d'ogni credere i limiti e la
possanza del loro imperio. Conquistò gran parte dell'Orientale
Germania; e fu egli che ricevè l'ospite Deceneo, e gli fe' onori e lo
volle a parte del Regno, godendo, che quello straniero spargesse
nuovi studj e l'amor delle scienze della natura fra gl'Immortali.
Deceneo diè il nome di Pilofori o di Pileati agli antichi Zorabos
Tereos, e divise in due i Geti o Goti; nell'ordine, cioè, di sì fatti
Pilofori, donde i Re uscivano, e nell'altro de' Capelluti o Criniti,
ovvero de' guerrieri, che durò lungamente in Italia sotto gli
Ostrogoti. Deceneo scrisse pe' Geti o Goti le Leggi, dette Bellagini [8],
le quali, attesta Giornande, si serbavano tuttora scritte al suo tempo
in Italia dagli Ostrogoti, verso la metà del sesto secolo di nostra
salute.
In quale Alfabeto furono esse dettate? Nol so, ed ignoro se i Geti si
servissero per la loro lingua dell'Alfabeto de' Greci, o di qualche altro
ignoto a noi dell'Asia Minore fino all'anno 360 dell'Era Volgare in
circa, quando Ulfila ridusse il Getico Alfabeto alla forma, che oggi
questo conserva, e che da lui prese il nome di Ulfilano. Allo stesso
modo gli Armeni, per dinotare i lor concetti nella patria e primitiva
lor lingua, usarono per lunga stagione l'Alfabeto Siriaco: poi venne
Mesrob a' tempi stessi d'Ulfila, e si fece autor di quello, che fiorì e
fiorisce in Armenia.
Poichè le Bellagini vidersi ridotte in iscritto da Deceneo, sebbene
senza un Alfabeto Getico, l'idioma degl'Immortali era già dunque
costruito e già soggetto a' freni della Gramatica, quando nei giorni
d'Augusto e di Tiberio sopraggiunse Ovidio in Tomi, di quà dal
Danubio. Ben questi cerca dipingere e non tralascia d'esagerare i
costumi barbarici de' Geti, che circondavano Tomi di quà e di là dal
gran fiume: pur tuttavolta, chi l'avrebbe creduto? all'esule s'apprese
la fiamma di scrivere un libriccino in lingua Getica, od almeno di
fingere d'averlo scritto; e sebbene un Romano ed un odiator sì fiero
di quel popolo dicesse, che di ciò vergognavasi [9], egli nondimeno
affermò d'averlo dettato quel suo libriccino o poemetto. Fu in lode di
Augusto, ed ordinato ad ottener la grazia del ritorno in Roma; pieno
perciò di teneri affetti e di delicate adulazioni.

III.

Augusto lasciò stare i disegni concepiti da Giulio Cesare


d'assoggettare i Geti o Goti di Berebisto, ed assegnò il Danubio per
limite all'Imperio Romano. Ma i lamenti d'Ovidio sulle continue
correrie de' Geti Oltredanubiani contro Tomi dimostrano, che questo
limite non era punto rispettato dagl'Immortali. La fama di costoro
mosse Giuseppe Ebreo, che scrivea sotto i figliuoli di Vespasiano
Imperatore, a studiare i Getici costumi, ed e' notò particolarmente
quelli degli Ctisti celibi di Posidonio, abitatori del Ponto Eussino,
facendone il paragone co' costumi degli Esseni di Giudea: tanto
l'origini ed alcuni usi Orientali de' Geti o Goti colpivano l'animo di
ciascuno. A questi Giuseppe diè nelle sue Storie il nome di Daci Plisti
o Polisti [10]. Poco appresso Dione Crisostomo, uomo tenuto in gran
pregio da Traiano, dettò in Greco le Storie Getiche, oggi perdute; dal
quale Scrittore udimmo testè lodati gli affetti ed i canti de' Pii
d'Udisitana e di Filippo. Qual perdita non fu quella de' Commentarj,
che lo stesso Traiano scrisse intorno alle sue guerre Daciche? Non
certo per lo stile, ma per le qualità degli eventi e per la difficoltà
dell'imprese doveano appena cedere il luogo a' Commentarj della
Guerra Gallica.
Ecco in tutto il corso de' tempi, da que' del cenacolo di Zamolxi fino
agli altri dell'assedio d'Udisitana, fiorire presso i Geti o Goti sull'una e
sull'altra riva del Danubio l'arti della Musica e soprattutto
dell'Architettura, della quale io debbo spezialmente ragionare. Ma
tutte le discipline della civiltà de' popoli non possono discompagnarsi
affatto, e l'una il più delle volte spiega e dichiara quali siano le
condizioni d'un'altra. Donde si vede, che i Geti o Goti abitarono in
città murate, come Udisitana ed Elis; ch'ebbero in ciascuna il Collegio
Sacerdotale degli armonici Pii; che per comandamento di Deceneo
edificarono piccioli Tempj e Cappelle in onor degli Eroi, e de' lor
Minori Dei. Nella Lituania e nella Samogizia, conquistate poscia da
Ermanarico il Grande, progenitore di Teodorico, Re d'Italia, rimasero
fino al quattordicesimo secolo, le reliquie del culto d'una turba
d'infiniti piccoli Numi, alla maniera Decenaica, e le ricordanze del
Getico Pontificato [11]. Il Dio della Terra s'appellava tuttora Zamelusk
o Ziameluski nella Lituania [12]: e fra gli Estonj, soggiogati sul Baltico
da' Geti o Goti dopo la morte d'Ermanarico il Grande, il suono
dell'arpa d'un Prete Cristiano bastò a salvare un Castello, minacciato
da essi [13]: ciò che ci rammenta gli antichi portenti delle Cetre
Getiche.

IV.

Ma si ritorni all'età de' figliuoli di Vespasiano e di Giuseppe Ebreo,


allorchè Domiziano pervenne all'Imperio e volle domare i Geti d'oltre
il Danubio ed impadronirsi del lor Sacro Monte. Invano Stazio,
adulando, cantò, che costui lo aveva per sua clemenza restituito a'
Daci [14]: ben seppero il contrario i Capitani di Roma, che valicarono
il Danubio, troppo fortunati se poterono ripassarlo e ritornare in
Tracia; ma Cornelio Fosco vi perdè la vita e le sue legioni furono
disfatte, sì che l'Imperio si vide condotto a dover pagare annui tributi
a' Geti o Daci, su' quali ora signoreggiava Decebalo. Si sospinse
questo Re in Tracia e ne fe' tale governo che Tacito pochi anni dopo
scrisse [15]: »Tot exercitus in Moesia Daciaque.... amissi; tot militares
viri cum tot cohortibus expugnati aut capti; noc jam de limite Imperii
et ripâ, sed de hybernis legionum et possessione dubitatum.........
Cum damna damnis continuarentur, atque omnis annus funeribus ac
cladibus insigniretur......».
Immensa copia di Romani cadde prigioniera nelle mani del Re
Decebalo, che muniva le sue Getiche città della Dacia, e che
certamente servissi delle loro braccia ed anche del loro intelletto per
render più valide le fortezze del suo Regno. Ma non per questo il
Getico popolo apprese da que' prigionieri l'arti dell'Architettura; e la
Gotica faccia dell'antiche città d'Elis e d'Udisitana ricomparve più
maestosa in Sarmizagetusa nella regione, che oggi da noi si dice
Transilvania; là dove Decebalo fece di questa Sarmizagetusa la sede
principale del Regno. L'immagini della sua Reggia, e delle sue
rocche, dopo aver fatto disviare il fiume Sargezia per nascondervi i
Getici tesori, si veggono tuttora scolpite nella Colonna Traiana; il più
nobile Monumento rizzato da' Romani per celebrar la gloria del
vincitore de' Daco-Geti. Traiano si mosse finalmente a vendicar l'onte
dell'Imperio, e ad abolire il tributo; ciò ch'egli ottenne mercè due
guerre solenni, le più difficili e paurose, onde siasi conservata la
memoria negli Annali de' Romani. E qual gloria non fu per
quell'Imperatore l'aver distrutto Decebalo, e conquistata una terza
parte del vasto Regno di lui? Qual gloria maggiore, dicea Giuliano
Apostata nella sua Satira contro i Dodici Cesari, dell'aver potuto
superare le genti, che tanto dispregiavano la vita, e che portavano il
nome d'Immortali. Ma larga materia di riso apprestarono a Giuliano
l'incantagioni Zamolxiane de' Geti.
Questa splendida lode s'ascolta in onor di Traiano Imperatore nella
bocca del derisore de' primi suoi predecessori. Nondimeno la
Colonna Traiana, che sussiste tuttodì, è il testimonio più certo
dell'eccellenza, in cui era venuta l'Architettura presso i Goti di
Decebalo. Prima delle due guerre Daciche, Tacito scriveva il suo libro
della Germania, verso l'anno 98 di Gesù Cristo. Non parlo di ciò che
ivi si dice del guidrigildo, ignoto a' Geti o Goti, essendo stato questo
il perpetuo argomento de' miei studj sul Codice Diplomatico
Longobardo. Ma ciascuno può leggere in Tacito, quanto per tutti gli
altri rispetti fossero i suoi Germani diversi dai Geti o Goti, ossia da'
Daci, per la Teocrazia, per la potestà de' Re, per gli ordini Sacerdotali
ed Aristocratici; pe' sagrificj e gli auspicj; per le discipline letterarie
introdotte da Deceneo; per le condizioni mobili dell'agricoltura e del
continuo mutamento delle terre, alle quali non chiedevasi altro che il
grano in Germania (sola seges imperatur): soprattutto per le qualità
dell'Architettura, là dove non si conosceano le città (urbes nullas
habitari) e non si costruivano i tugurj vicini gli uni agli altri da'
Germani, ma ciascuno interponeva grandi spazj di terra fra que'
tugurj o per paura degl'incendj, o per ignoranza dell'arte d'edificare
(inscitia aedificandi). Niun uso della calce; niuno delle tegole: e
sacrilego era il pensiero di rizzar Statue o di fabbricar Tempj alle lor
Divinità, quasi rimanessero elle imprigionate in tal guisa fra le mura
(parietibus cohibere Deos). Quando poi si cominciavano a mutare i
costumi, levossi un'agreste dimora, la quale si chiamò più dal
Romano che non dal Germano il Tempio della Dea Tanfana. So, che
ad alcuni or sembra più spiritale il concetto de' Germani di Tacito di
non alzarsi nè Tempj nè simulacri agli Dei: ma qui non si tratta di
ciò; qui non occorre altro notare se non la gran diversità fra essi
Germani e gl'Immortali così di Zamolxi come soprattutto di Deceneo,
e la mancanza d'ogni Architettura in Germania. Ma non potrà mai
lodarsi a bastanza, nè alcuno più di me lodolla in tutto il corso della
Storia, la dolcezza della servitù presso i Germani di Tacito.
Di qui si scorge qual somiglianza regnasse fra una borgata delle
selve di Germania, e l'alta Sarmizagetusa di Decebalo, senza toccar
dell'altre città Daciche, figurate nella Colonna Traiana, e
massimamente di quella, dove si rinchiuse la sorella del Re [16]. Tali,
quali or gli abbiamo veduti, erano i Germani di Tacito sette od otto
secoli dopo la predicazione Zamolxiana dell'immortalità dell'anima
fra' Geti o Goti. Un sì lungo spazio di tempo dee cancellarsi affatto
dalla Storia per concedere, che i due popoli fossero d'una stessa
razza, e che arrivati fossero insieme dall'Asia in sulle bocche del
Danubio. S'e' dovesse tenersi per vero, che così l'una tribù come
l'altra venute vi fossero entrambe in uno stesso giorno, insieme
partitesi dalla Persia o dall'India o dalla Cina, sarebbe non meno
vero, ch'elle si separarono, e divennero affatto straniere fra loro, e
vissero a questo modo per molti secoli fino a Zamolxi, poscia per
sette altri fino a Deceneo, e poi per otto altri fino alla promulgazione
del Vangelo fatta da San Bonifazio. Non vanno comprese nel mio
ragionamento quelle parti della Germania di Tacito, le quali furono
conquistate da' Geti o Goti del Re Berebisto e da' suoi Successori,
ma prima di San Bonifazio, le quali parti perciò acquistarono la
natura Gotica ed appresero l'idioma, che ho detto essersi chiamato
Ulfilano. Questo s'andò successivamente insinuando ed infondendo
negl'idiomi Germanici primitivi, e vi dura oggidì nelle bocche
Tedesche. Nè nego, che il Politeismo Romano era più ritroso del culto
de' Germani di Tacito a ricevere in sè i propizj semi del Vangelo: ma
chi più degli Immortali di Zamolxi potea tenersi per un popolo
capace del Cristianesimo?

V.

Le vittorie de' Geti o Goti sopra i Romani prima delle due guerre
Daciche di Traiano, e massimamente quella di Cornelio Fosco
procacciarono il nome d'Ansi o d'Asi, cioè di Semidei, a que' Pilofori
ed a quei Capelluti, che più s'erano in un tanto pericolo illustrati. Fra
tali Asi fu Capto, dal quale discese, dopo diciassette generazioni,
Teodorico, Re d'Italia e padre d'Amalasunta; e fu eziandio Balto,
donde trasse l'origini Alarico, il quale s'impadronì di Roma nel 409. I
nipoti e pronipoti di Gapto signoreggiarono sugli Ostrogoti; que' di
Balto su' Visigoti: due grandi famiglie del popolo Gotico, come nella
Dacia, rimasta libera dall'armi Romane s'appellarono esse dopo la
morte di Decebalo ed i trionfi di Traiano. Il bisnipote di Gapto,
chiamossi Amalo, e per lui si chiamarono i suoi discendenti gli Amali.
Or così gli Asi o Semidei Amali che i Semidei Balti, quando ebber
nell'anno 107 perduta Sarmizagetusa, si ridussero nell'altre due terze
porzioni del Regno di Decebalo di là dal Prut ed a cavaliere de'
Carpazj, donde cominciarono contro i Romani quell'aspra e continua
guerra, che costrinse finalmente Aureliano, fortissimo Imperatore, ad
abbandonar la Dacia conquistata da Traiano, ed a ridursi nell'anno
275 di Gesù Cristo, al limite Augusteo di quà dal Danubio.
Ne' cento sessant'otto anni della dominazione Romana, la Dacia di
Traiano si Latinizzò in buon dato: ma Gotico e puramente Gotico
durò il resto, cioè la maggior parte, del Regno di Decebalo. Gli
Ostrogoti vissero sotto il reggimento degli Amali, ed i Visigoti sotto
quello de' Balti, fino al Re Ostrogota degli Amali, che regnò sopra
entrambe le due grandi tribù nella metà del terzo secolo. Poscia
l'undecimo discendente di Gapto, ed il sesto del Re Ostrogota,
Ermanarico degli Amali, ottenne anche di signoreggiar su' Visigoti e
sugli Ostrogoti, con le forze unite de' quali e' diè i principj alle sue
conquiste.

VI.

Non appena erano spenti Decebalo e caduta Sarmizagetusa, che


Celso il Filosofo si pose a scrivere, volgendo l'anno 131, contro i
Cristiani. E' faceva uno stolto paragone tra Zamolxi e Gesù Cristo;
poscia, volendo in qualche maniera deprimere l'antichità dei Libri
Mosaici, lodò l'antichità e la sapienza de' Geti o Goti. Non ancora un
mezzo secolo era trascorso, e Luciano ricordò i sacrificj degli Sciti,
ma parlava dei Geti, perchè non tacque de' loro Pilofori, nè
dell'uccisione degli Ambasciatori che spedir doveansi a Zamolxi [17].
Nè tardò Clemente Alessandrino [18] rifermar ne' suoi Libri dell'anno
193, i racconti di queste uccisioni degli Ambasciatori; lodando ad
un'ora le discipline filosofiche sì d'essi Geti o Goti come de' Traci
Odrisj, e soprattutto le dottrine Zamolxiane sull'immortalità
dell'anima, la rassegnazione de' Geti alla morte, la lor cura in onorar
gli Eroi ed i sapienti della loro nazione. Il che, tutti lo veggono, riesce
all'Architettura Gotica, ed alla rinomanza degli edificj posti a quegli
Eroi, divolgata da per ogni dove ne' luoghi più lontani dal Prut e da'
Carpazj. Quanto alla Dacia Romana, l'uccisione degli Ambasciatori a
Zamolxi fu certamente vietata nella stessa guisa, che nelle Gallie i riti
ed i sacrificj umani dei Druidi erano stati dianzi per gran ventura
dell'umano genere aboliti dagl'Imperatori.

VII.

Ma già cominciava da lungi la luce del Vangelo a risplendere presso


gl'Immortali, che, per questa sola credenza loro, doveano riuscire i
primi a divenir Cristiani, e riuscirono, fra' popoli detti Barbari dal
Greco e dal Romano: da lungi, dico, nè presso tutta la nazione
Gotica. Nel 211 già Tertulliano parlava de' Daci, che aveano udita la
Buona Novella [19]; ma erano scarsi drappelli, che non ancor poteano
rivolgere ad altro e più fausto segno le pratiche dell'Architettura
Gotica, sì come avvenne poscia quando il maggior numero della
nazione si voltò al Cristianesimo. Intanto il Re Ostrogota degli Amali
vinceva i Gepidi, popolo di sangue Gotico [20], il quale avea superato
e disfatto i Burgundioni o Borgognoni. Furon costoro annoverati da
Plinio fra' Vandali, ed erano genti di Germania verso il Baltico. Le
relique di sì fatti Borgognoni furono incorporate fra i Gepidi, e tosto
co' Visigoti e cogli Ostrogoti per la vittoria conseguita dal Re
Ostrogota. In tal guisa i Borgognoni svestironsi la Germanica loro
sembianza, e passarono alla Gotica, e furono sempre ricordati dagli
Scrittori antichi fra' Goti. Tale Agatia [21], il quale dà loro
espressamente il nome di popoli Gotici, quali veramente divennero e
si mostrarono in tutto il corso della loro Storia.
Ne' giorni d'Ostrogota, Origene d'Alessandria in Egitto, prese a
difendere il Cristianesimo dall'imputazioni del Filosofo Celso.
Pubblicò, verso l'anno 250, i suoi Libri contro esso, il quale tanto
aveva esaltato le Gotiche antichità e la sapienza. Origene per altro
non negò punto l'antichità de' Geti [22], quantunque inferiore a quella
di Mosè. Insigne testimonianza si legge in questo lavoro contro Celso
intorno alle verità de' detti di Giuseppe Ebreo sulla conformità
d'alquanti costumi de' Geti o Goti con alcune usanze de' Giudei. Non
certamente nell'età d'Origene il Sommo Sacerdote degli Ebrei
sarebbesi potuto paragonare col Pontefice Zamolxiano o col
Decenaico de' Geti o Goti: ma l'inutile aspettazione di costoro, che
Zamolxi dovesse venire a regnar sulla terra, diè buoni fondamenti ad
Origene di paragonare questa vivissima loro speranza con l'inutile
aspettazione del già venuto Messia presso gli Ebrei. Più d'ogni altra
Gotica tribù i Crobizj aspettavano Zamolxi, celebrando a tale uopo
annui banchetti e sacrifizj. Queste Getiche pratiche religiose non
aveano rimesso nulla del loro fervore nell'età d'Origene, quando i
Goti non eransi ancora convertiti al Cristianesimo.
D'assai maggior momento per me nella trattazione sull'Architettura
Gotica è l'essersi Origene accordato col suo avversario Celso nel
fatto notissimo a tutto l'Orbe Romano, che i Goti onoravano Zamolxi
col rizzargli e Templi e Statue (νηὼς καὶ ἀγάλματα [23]): tanto la fama
così della credenza Zamolxiana come della nuova riforma di Deceneo
da per ogni dove sonava, ed anche in Egitto. E però i Geti o Goti non
conquistati da Traiano, cioè i Daci liberi, non intermisero giammai la
pratica della nazionale Architettura loro, qualunque si fosse; nè
poteano intermetterla, perchè sempre obbligati dal loro culto a rizzar
Tempj e Cappelle in onore o di Zamolxi, o de' Minori Dei e degli Eroi.
Tali pratiche dell'Architettura Gotica si mantenevano intere anche per
odio contro i Romani, che signoreggiavano in Sarmizagetusa,
dandole il nome d'Ulpia Traiana, e venivano Latinizzando sempre più
la porzione caduta in lor potere della Dacia di Decebalo.
Così stavano le cose della Gozia e della Dacia libera da' Romani,
verso la metà del terzo secolo Cristiano, quando un insolito moto
agitò i popoli Gotici. Furono vinti nel 269 in Tracia dall'Imperatore
Claudio, che ne riportò il nome di Gotico. Abbiamo ancor le sue
Lettere, ov'egli afferma d'averne ammazzati trecento venti mila, ed
affondate due mila lor navi; d'aver in oltre fatto prigioniero uno
stuolo infinito di donne, fra le quali Unila, regal donzella de' Goti.
Uno degl'Imperatori più valorosi fu vinto dagl'Iutungi, che Dessippo
chiamava Sciti, e che si possono tenere per non diversi da' Tervingi,
tribù Visigotica. Parlo d'Aureliano, il quale poscia li vinse; ma
conobbe quanti pericoli si minacciavano dalle Gotiche genti
all'Imperio. Fra gli altri suoi provvedimenti e' circondò Roma di mura,
ed abbandonò la Dacia conquistata da Traiano. Gl'Iutungi fermaronsi
finalmente nella Rezia, e nelle parti Meridionali della Germania, ove
non si dubita che introdotto avessero l'uso della lingua Gotica. I
Borgognoni eziandio, che s'erano fatti Goti, come notò Agatia, e
deposto aveano con l'indole Germanica l'uso del guidrigildo [24], sì
come apparisce dalle susseguenti lor Leggi, s'accompagnarono co'
Goti nelle spedizioni di costoro contro l'Asia Minore. Innoltraronsi
poscia verso la Germania Occidentale, dove ristettero fino a che non
passarono ad abitar nelle Gallie. Gotica ivi fu la loro Architettura,
perchè i Borgognoni divennero fervorosi Ariani: del che or ora dirò
una qualche parola.
Ma le tribù de' veri Germani di Tacito si ristrinsero nella primitiva
rozzezza loro: e solamente in alcune contrade più prossime
all'Imperio cominciò appo essi una lenta ed incerta imitazione
dell'Architettura de' Romani. Ammiano Marcellino [25], che nel 361
guerreggiò sotto Giuliano Cesare contro gli Alemanni tra il Meno ed il
Reno, vide con sua gran maraviglia costruite alcune borgate con
case all'uso Romano.

VIII.

Tornata la Dacia di Traiano in balía de' popoli Gotici dopo Aureliano,


s'apre l'età di Costantino e d'Ermanarico degli Amali; l'uno e l'altro
chiamato il Grande. Non parlo d'Ermanarico, il quale restò fedele a'
dogmi di Zamolxi, e sì lungi spinse le sue insegne nell'Europa di là
dal Danubio, fondando in Europa quel vasto e misterioso Imperio,
che Giornande paragonava con l'altro d'Alessandro in Asia, e che si
distese dal Prut e da' Carpazj fino al Baltico; i suoi Successori poscia
lo dilatarono di mano in mano fino all'Estonia ed alle Provincie
Orientali e Settentrionali di quel Mare, non che in tutta la
Scandinavia. Ma non posso tacere di due grandi fatti avvenuti a'
giorni di Costantino. L'uno, che molti Goti furono da lui ricevuti
nell'Imperio col nome di Federati: l'altro, che una gran parte di Geti
o Goti Zamolxiani si convertì al Cristianesimo. Teofilo, Vescovo
Cattolico, sottoscrisse alla condanna d'Ario nel Concilio di Nicea del
325, in qualità di Primate della Gozia. Santo Epifanio, che visse in
quella stagione, tramandò alla posterità le notizie de' Monasteri
edificati da' Goti, nuovi convertiti [26], per le loro Vergini. La Gotica
tribù de' Protingi ebbe altresì gran copia di Monaci Cattolici, derisi dal
Pagano Eunapio, che pose principalmente in canzone le negre lor
vesti [27].
Or si potrà più mai volgere in dubbio, che nella Gozia o Dacia di là
dal Danubio durasse un'Architettura Gotica dopo la conversione de'
Goti? Que' Monasteri delle Vergini, celebrate da Santo Epifanio, non
erano certamente di legno, ma di pietra: come di pietra furono il
cenacolo di Zamolxi, le Città d'Udisitana e d'Elis, i Tempj di Deceneo,
la Reggia di Sarmizagetusa e le Daciche mura effigiate nella Colonna
di Traiano in Roma. La Dacia, posseduta fino al 275 da' Romani, ei
riempì, egli è vero, di monumenti d'arti Greche e Latine; ma que'
Monasteri delle Gotiche Vergini e de' Monaci Protingi non presero
punto ad imitare alcuno de' monumenti del Paganesimo di Roma o
d'Atene.
Scrive Santo Isidoro di Siviglia, che il Goto, divenuto Ariano, edificò
novelle Chiese di là dal Danubio, ma secondo il novello suo dogma.
Ecclesias sui dogmatis sibi construxerunt [28]. Ciò dimostra la diversità,
che già si stabiliva, ed era divenuta notabile, fra l'Architettura
Cattolica e l'Ariana. L'una cercava separarsi per ogni via dall'altra:
ma, di qualunque natura fossero tali gare fra le due Architetture,
Santo Isidoro parla di fabbriche Oltredanubiane, quando egli tocca
delle Chiese del rito Ariano. E però, lasciando in disparte la Dacia
stata già de' Romani, tre specie d'Architettura, la Zamolxiana e
Decenaica, la Cattolica e l'Ariana fiorivano ad un'ora in Gozia, nella
seconda metà del quarto secolo di Gesù Cristo.
Egli è facile il conoscere quanto la nuova Religione Cristiana mutato
avesse i costumi de' Goti, e come fosser finiti l'incantamenti ed il
Ponteficato stabilito da Zamolxi e da Deceneo. Ma ferme appo i Goti
Cristiani rimaseso le Caste de' Pilofori e de' Capelluti. Alcuni di que'
Pilofori divennero Vescovi, che all'autorità religiosa congiunsero
eziandío la politica. Dall'ordine loro si continuarono ad eleggere i Re:
si continuarono ad eleggere gli altri Capi, a' quali, dopo Ermanarico,
si diè sovente il nome di Giudici da' Visigoti, e che non sempre
furono de' Balti. Poichè già Ermanarico moriva, e già venivano gli
Unni; già gli Ostrogoti cogli Amali cadevano in potestà de' vincitori, e
perdevano, sto per dire, la loro Gotica faccia. I Visigoti, e fra essi
anche i Protingi, tentarono di resistere all'Unnico nembo; Atanarico,
Giudice Visigoto, fece, secondo i racconti d'Ammiano Marcellino,
rizzar il Lungo Muro, ch'egli sperava poter difendere contro gli Unni:
questo perciò dovè munirsi di Torri e d'altri propugnacoli, non che di
Porte e di Posterle. Ammiano diceva essere stata sì fatta muraglia
un'efficace opera e come una lorica de' Visigoti [29].

IX.

Inutile schermo riuscì nondimeno la muraglia del Giudice Visigoto


contro gli Unni, che dettero una gran volta dietro i Carpazj e lo
assalirono alle spalle. Allora i Visigoti passarono il Danubio, e
stabilironsi nell'Imperio Romano. Correva l'anno 375 di Gesù Cristo.
Son questi que' Visigoti, che dopo varj casi Alarico de' Balti condusse
nel 409 al saccheggio di Roma, beffandosi delle mura d'Aureliano.
Fra tali casi, giova ricordar l'arrivo dei Protingi, venuti ad ingrossar lo
stuolo de' popoli Gotici. Aveano potuto i Protingi per circa undici anni
dopo il passaggio de' Visigoti schivar la rabbia degli Unni: ma
finalmente furono costretti anch'essi a passare il Danubio, ed a
chiedere d'essere accolti nelle Provincie Romane. S'affacciarono
perciò nel 386 al gran fiume co' loro Vescovi, co' loro Monaci, vestiti
di toniche nere, con le loro Vergini, che faceano l'officio di
Diaconesse. Procedeano sopra magnifici e ben custoditi carri, ove si
nascondevano gli eucaristici vasi: uomini e cose, che mosser la bile
d'Eunapio. Ma la magnificenza e le ricchezze di questi Protingi erano
di gran lunga inferiori a quelle, che lo stesso Eunapio [30] descrive de'
Visigoti, quando nel 375 passarono il Danubio, con gli splendidi lor
vestiti di lino e carichi di preziosi tappeti: le donne andavano adorne
più pomposamente che non sembrava convenire alla presente loro
sciagura, e gli stessi fanciulli de' Visigotici Pilofori non aveano
deposto lo splendore d'un regio lusso.
Questi medesimi Visigoti e Protingi e simili non numerabili tribù de'
Goti, dopo la presa di Roma e la morte d'Alarico de' Balti obbedirono
al Re Ataulfo. Furono dall'Imperatore Onorio stanziati nelle Gallie
Meridionali col titolo di Federati, già loro imposto da Costantino. Essi
dappoi s'impadronirono di tutta la Spagna. È fama, che Ulfila tutti
avesse finito di voltarli all'Arianesimo nel 360 per procacciar loro i
favori dell'Ariano Imperatore di Bizanzio. Anche i Borgognoni, de'
quali ho toccato, divennero zelanti Ariani. Qualunque sia stato il
tempo, in cui abbandonarono la fede Cattolica, Ulfila non andò co'
Visigoti del Re Ataulfo nelle Gallie; ma i Vescovi Selina e Sigesario,
discepoli d'Ulfila e propagatori dello stesso dogma, furono quelli che
vi si tragittarono con le Visigotiche tribù, e divennero lor guida e
maestri e gran dottori dell'Arianesimo, portando seco la Traduzione
Ulfilana delle Sante Scritture, scritta coll'Alfabeto Ulfilano. E però
Santo Eugenio di Tolede, volendo nell'ottavo secolo Cristiano
annoverar gli Alfabeti da lui conosciuti, parlò dell'Ebraico, dell'Attico,
del Latino, del Sirio, del Caldaico, dell'Egizio, e soggiunse:
»Gulfila promisit Geticas, QUAS VIDEMUS, ultimas
(literas) [31]».
Dopo ciò niuno dirà, che i Visigoti da un lato ed i Borgognoni
dall'altro si posarono in Ispagna e nelle Gallie in qualità di popolo
Barbaro, privo di scienze, privo d'Alfabeto, privo d'Architettura: niuno
dirà, che gl'Immortali di Zamolxi e di Deceneo non fossero stati
abitatori delle più splendide città di là dal Danubio, e non avessero
costruita una lunga e forte muraglia contro gli Unni. Qual era
quest'Architettura, che i Visigoti recavano in Ispagna e nelle Gallie
Meridionali dalle regioni d'Oltre il Danubio? Qual era questa
Architettura, che prima fu Zamolxiana, e poi Decenaica, e poi
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