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

Essential Java for AP CompSci: From Programming to Computer Science 1st Edition Doug Winnie - Download the ebook and explore the most detailed content

The document promotes the ebook 'Essential Java for AP CompSci' by Doug Winnie, which covers fundamental programming concepts and Java for computer science education. It provides links to various other ebooks available for immediate download on ebookmeta.com. Additionally, it highlights the importance of computer science skills in various fields and the author's background in teaching and developing programming content.

Uploaded by

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

Essential Java for AP CompSci: From Programming to Computer Science 1st Edition Doug Winnie - Download the ebook and explore the most detailed content

The document promotes the ebook 'Essential Java for AP CompSci' by Doug Winnie, which covers fundamental programming concepts and Java for computer science education. It provides links to various other ebooks available for immediate download on ebookmeta.com. Additionally, it highlights the importance of computer science skills in various fields and the author's background in teaching and developing programming content.

Uploaded by

shatzpesex
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/ 56

Read Anytime Anywhere Easy Ebook Downloads at ebookmeta.

com

Essential Java for AP CompSci: From Programming to


Computer Science 1st Edition Doug Winnie

https://ebookmeta.com/product/essential-java-for-ap-compsci-
from-programming-to-computer-science-1st-edition-doug-
winnie/

OR CLICK HERE

DOWLOAD EBOOK

Visit and Get More Ebook Downloads Instantly at https://ebookmeta.com


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

Essential Java for AP CompSci: From Programming to


Computer Science 1st Edition Doug Winnie

https://ebookmeta.com/product/essential-java-for-ap-compsci-from-
programming-to-computer-science-1st-edition-doug-winnie/

ebookmeta.com

Concise Guide to Object Oriented Programming An Accessible


Approach Using Java Undergraduate Topics in Computer
Science 1st Edition Kingsley Sage
https://ebookmeta.com/product/concise-guide-to-object-oriented-
programming-an-accessible-approach-using-java-undergraduate-topics-in-
computer-science-1st-edition-kingsley-sage/
ebookmeta.com

Java All in One For Dummies Fifth Edition Doug Lowe

https://ebookmeta.com/product/java-all-in-one-for-dummies-fifth-
edition-doug-lowe-3/

ebookmeta.com

Soccer and the American Dream 1st Edition Ian Lawrence

https://ebookmeta.com/product/soccer-and-the-american-dream-1st-
edition-ian-lawrence/

ebookmeta.com
Boundaries of a Complex World 2nd Edition Andrei Ludu

https://ebookmeta.com/product/boundaries-of-a-complex-world-2nd-
edition-andrei-ludu/

ebookmeta.com

Mixed Messages American Correspondences in Visual and


Verbal Practices 1st Edition Catherine Gander

https://ebookmeta.com/product/mixed-messages-american-correspondences-
in-visual-and-verbal-practices-1st-edition-catherine-gander/

ebookmeta.com

The Exhibitionist 1st Edition Charlotte Mendelson

https://ebookmeta.com/product/the-exhibitionist-1st-edition-charlotte-
mendelson/

ebookmeta.com

The Pope s Army The Papacy in Diplomacy and War Car John

https://ebookmeta.com/product/the-pope-s-army-the-papacy-in-diplomacy-
and-war-car-john/

ebookmeta.com

Southwest and Tex-Mex: Enjoy Authentic Southwest and Tex-


Mex Recipes for Delicious Southwest Cooking 2nd Edition
Booksumo Press
https://ebookmeta.com/product/southwest-and-tex-mex-enjoy-authentic-
southwest-and-tex-mex-recipes-for-delicious-southwest-cooking-2nd-
edition-booksumo-press/
ebookmeta.com
His for the Summer Mountain Ridge Resort 1st Edition Sammi
Starlight

https://ebookmeta.com/product/his-for-the-summer-mountain-ridge-
resort-1st-edition-sammi-starlight/

ebookmeta.com
Doug Winnie

Essential Java for AP CompSci


From Programming to Computer Science
1st ed.
Doug Winnie
Mission Hills, KS, USA

ISBN 978-1-4842-6182-8 e-ISBN 978-1-4842-6183-5


https://doi.org/10.1007/978-1-4842-6183-5

© Doug Winnie 2021

This work is subject to copyright. All rights are reserved by the


Publisher, whether the whole or part of the material is concerned,
specifically the rights of translation, reprinting, reuse of illustrations,
recitation, broadcasting, reproduction on microfilms or in any other
physical way, and transmission or information storage and retrieval,
electronic adaptation, computer software, or by similar or dissimilar
methodology now known or hereafter developed.

Trademarked names, logos, and images may appear in this book. Rather
than use a trademark symbol with every occurrence of a trademarked
name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no
intention of infringement of the trademark. The use in this publication
of trade names, trademarks, service marks, and similar terms, even if
they are not identified as such, is not to be taken as an expression of
opinion as to whether or not they are subject to proprietary rights.

While the advice and information in this book are believed to be true
and accurate at the date of publication, neither the authors nor the
editors nor the publisher can accept any legal responsibility for any
errors or omissions that may be made. The publisher makes no
warranty, express or implied, with respect to the material contained
herein.
This Apress imprint is published by the registered company APress
Media, LLC part of Springer Nature.
The registered company address is: 1 New York Plaza, New York, NY
10004, U.S.A.
For Mike, and all of the great decisions we have made together.
Table of Contents
Sprint 1:​Introduction
What You Need
Sprint 2:​Setting Up the Java JDK and IntelliJ
Coding Tools and IDEs
Installation and Setup
Install the JDK
Install IntelliJ
Sprint 3:​Setting Up GitHub
GitHub
How GitHub Works
Lifecycle of a Repository
Sprint 4:​Programming Languages
Origin of Programming
Forms of Programming
Machine Language
Interpreted
Compiled
Object-Oriented
Data
Functional
Scripting
Sprint 5:​History and Uses of Java
Java Beginnings
Java’s Primary Goals
Uses of Java
Sprint 6:​How Java Works
The Problem with Compiled Languages
The JVM and JRE
Compiling Java Bytecode
Precompiled Files
OpenJRE
Sprint 7:​Flowcharting
Flowcharting Tools
Paper
Tablet and Stylus
Apps
Flowcharting Basics
Terminus
Process/​Action
Input and Output
Decisions
Annotations
Other Shapes
Take Out the Trash
But Is It Really That Simple?​
Sprint 8:​Hello, World
Create Your IntelliJ Java Project
IntelliJ IDEA
First Time Only:​Configure the JDK
Create Project
About Your Project
Coding Your Project
Writing Your First Program
Create Your Repo in GitHub
Upload Your Code to GitHub
Sharing Program Output
Sprint 9:​Simple Java Program Structure
Sprint 10:​Text Literals and Output
Text Output
Escape Sequences
Sprint 11:​Value Literals
Literal Formatting
Sprint 12:​Output Formatting
Decimal Formatters
Thousands Formatters
Currency Formatters
Spacing and Alignment Formatters
Multiple Items in Formatters
Sprint 13:​Comments and Whitespace
Sprint 14:​Abstraction of Numbers
Sprint 15:​Binary
Binary Numbers
Bit Size and Values
Overflow
Sprint 16:​Unicode
Text Encoding
ASCII + Unicode
Emoji
Sprint 17:​Variables
Essentials of Variables
Code Examples
Sprint 18:​Math!
Basic Operators
Order of Operations
String Concatenation
Code Examples
Sprint 19:​Math Methods
Working with Simple Methods
Multiparameter Methods
Illegal Value Types in Methods
Math Constants
Code Examples
Sprint 20:​Managing Type
Mixing Types in Evaluations
Numbers to Strings
Strings to Numbers
Casts
Cast Errors
Code Examples
Sprint 21:​Random Numbers
Create a Random Number Generator
Random Integers
Random Decimals
Code Examples
Sprint 22:​Capture Input
Hello, Scanner
Capturing Strings
Capturing Integers
Capturing Decimals
Code Examples
Sprint 23:​Creating Trace Tables
It’s a Spreadsheet
Um.​Why?​
Sprint 24:​Methods
Method Basics
Writing a Method
Call a Method
Method Flow
Code Guide
Code Examples
Sprint 25:​Calling Methods Within Methods
Methods Within Methods
Infinite Methods
Code Examples
Sprint 26:​Methods and Values
Accepting Values in Methods
Returning a Value
Overloading a Method
Code Guides
Code Examples
Sprint 27:​Methods and Scope
Variable Scope Errors
Defining Class-Scoped Variables
Class Conflicts
Code Examples
Sprint 28:​Boolean Values and Equality
Creating a Boolean Variable
Boolean Logic Operators
Altering a Boolean Value
Combining Logic with Evaluations
Compound Logic Operators
Code Examples
Sprint 29:​Simple Conditional Statements
The if Statement
The else Statement
The else if Statement
Understanding Conditional Flow
Code Examples
Sprint 30:​Matching Conditions with the switch Statement
Creating a switch Statement Code Block
Things to Look Out for with the switch Statement
Code Examples
Sprint 31:​The Ternary Operator
The if-else Statement Equivalent
Converting to a Ternary Operator
Using the Ternary Operator Inline with Code
Code Examples
Sprint 32:​The Stack and the Heap
Understanding the Stack
Understanding the Heap
Why This All Matters
Sprint 33:​Testing Equality with Strings
When the Heap Throws Equality
How to Better Compare String Values
Code Examples
Sprint 34:​Dealing with Errors
Coding to Catch Errors
“Catching” Specific Errors
Code Examples
Sprint 35:​Documenting with JavaDoc
Using JavaDoc Syntax
Generating Documentation
Code Examples
Sprint 36:​Formatted Strings
Creating a Formatted String Literal
Code Examples
Sprint 37:​The while Loop
Create a while Loop
Code Examples
Sprint 38:​Automatic Program Loops
Creating a Program Loop
Code Examples
Sprint 39:​The do/​while Loop
Creating a do…while Loop
Run at Least Once
Sprint 40:​Simplified Assignment Operators
Combined Assignment
Increment and Decrement
Placement and Program Flow
Code Examples
Sprint 41:​The for Loop
Creating a for Loop
Changing the Step
Code Examples
Sprint 42:​Nesting Loops
Creating Nested Loops
Displaying as a Grid
Code Examples
Sprint 43:​Strings as Collections
Creating Strings Using the String Class
Getting a String Length
Getting a Specific Character from a String
Finding a Character in a String
Extracting a Substring
Comparing Strings
Code Examples
Sprint 44:​Make Collections Using Arrays
Creating an Array with Values
Getting a Value from an Array
Creating an Array by Size
Things to Avoid with Arrays
Getting the Number of Values in an Array
Looping Through an Array
Code Examples
Sprint 45:​Creating Arrays from Strings
Delimited Strings
Splitting It Up
What About Numbers?​
Code Examples
Sprint 46:​Multidimensional​Arrays
Define a Multidimensional​Array
Assign Values to Multidimensional​Arrays
Access Values in Multidimensional​Arrays
Rectangular and Irregular Arrays
Code Examples
Sprint 47:​Looping Through Multidimensional​Arrays
Creating Nested Loops for Arrays
Code Examples
Sprint 48:​Beyond Arrays with ArrayLists
Create an ArrayList
Add Items to ArrayLists
Get Elements in ArrayLists
Remove Elements from ArrayLists
Find Items in ArrayLists
Replace Items in ArrayLists
Get the Size of an ArrayList
Copy Elements to a New ArrayList
Clear an ArrayList
Code Examples
Sprint 49:​Introducing Generics
Create an ArrayList with Generics
Typing Using Generics
Code Examples
Sprint 50:​Looping with ArrayLists
Working with size( ) and get( ) Methods
Code Examples
Sprint 51:​Using for…each Loops
Mechanics of a for…each Loop
This Is the Mechanics of the for…each Loop
ArrayLists Without Generics
Yep, Arrays Work Too
Code Examples
Sprint 52:​The Role-Playing Game Character
What Is a Role-Playing Game Character?​
Filling Out Our Character Sheet with Data
Classes, Instantiation, and Construction
Player Character Sheets
Fighter
Mage
Paladin
Priest
Sprint 53:​Polymorphism
Creating a Class Hierarchy
Party Up—All the Same—but All Different at the Same Time
The Essential Tool:​The Die
Class Hierarchy, Polymorphism, Abstract, and Static
Sprint 54:​Make All the Things…Classes
Creating Some Class
Instantiate Thyself, Class!
Sprint 55:​Class, Extend Thyself!
Sprint 56:​I Don’t Collect Those; Too Abstract
Sprint 57:​Access Denied:​Protected and Private
Sprint 58:​Interfacing with Interfaces
Sprint 59:​All I’m Getting Is Static
Sprint 60:​An All-Star Cast, Featuring Null
Index
About the Author
Doug Winnie
has been teaching programming in the
classroom or with online videos for over
15 years. Online, his videos have over
two million views on Adobe, Lynda.com,
and LinkedIn Learning. Doug’s courses
cover topics like computer science
principles, Java, C#, JavaScript, product
management fundamentals, virtual
machines, and other products and
technologies.
He has written two books on
programming and collaboration between
user experience designers and
developers.
Currently, he is the Chief Learning
Officer at MentorNations, an
international nonprofit focused on
evolving digital literacy and entrepreneurial skills across the world.
Previously, Doug was head of community for the LinkedIn Learning
instructor organization, representing the interests of over 1400
teachers and instructors worldwide. He was an internal contributor to
the Windows Insider Program and part of a global initiative at
Microsoft to teach 7.6 billion people around the world digital coding
and programming literacy skills. He was also a LinkedIn Culture
Champion, working with LinkedIn employees around the globe to put
on employee cultual events on special days called InDays.
Earlier, Doug was a principal product manager at Adobe and
specialized working on new products for the user experience,
interactive design, and web design audiences.
You can find out more about Doug on his LinkedIn profile:
www.linkedin.com/in/sfdesigner
About the Technical Reviewer
Jeff Friesen
is a freelance teacher and software developer with an emphasis on Java.
In addition to authoring Java I/O, NIO and NIO.2 (Apress) and Java
Threads and the Concurrency Utilities (Apress), Jeff has written
numerous articles on Java and other technologies (such as Android) for
JavaWorld (JavaWorld.com), InformIT (InformIT.com),
Java.net, SitePoint (SitePoint.com), and other websites. Jeff can
be contacted via his website at JavaJeff.ca or via his LinkedIn
profile (www.linkedin.com/in/javajeff).
© Doug Winnie 2021
D. Winnie, Essential Java for AP CompSci
https://doi.org/10.1007/978-1-4842-6183-5_1

1. Introduction
Doug Winnie1
(1) Mission Hills, KS, USA

Computer science has become a basic life skill that everyone is going to
need to learn. Whether you are going into a career or side hustle in
business, technology, creativity, architecture, or almost any other field,
you will find programming, coding, and computer science play a role.
In fact, if you look at the top skills on LinkedIn for the United States,
in the last year all ten of the top were programming, computer science,
or code related. These include cloud and distributed computing,
statistical analysis, data mining, mobile development, storage systems
management, user interface design, network and information security,
middleware and integration software, web architecture and
development frameworks, algorithm design, and Java development.1
What is unique about computer science is how it has become a skill,
and not just a career. While there are jobs and titles of “Computer
Scientist,” the skill of computer science, and specifically coding and
programming, is almost everywhere.
In marketing, you need to analyze and sift through tons of user data
and metrics on how people use your products, website, apps, or
services. In medicine, doctors and researchers need to gather and
analyze data gathered from clinical studies or to find new
breakthroughs. In agriculture and farming, thousands of IoT devices
need to be deployed and managed to gather data on soil conditions,
humidity, and crop health. In architecture and construction, mapping
out and analyzing how people use elevators, building infrastructure, or
public spaces can help design better buildings for people to work and
live in. Even when building a side business, or “hustle,” entrepreneurs
may need to perform research, build a website, program a mobile app
or game, or perform tons of different activities involving code, logic,
automation, and programming.
When people create projects based on code, they organize their
work into multiple chunks or segments of development. They call these
“sprints.” So, we will learn Java in the same way, using multiple sprints
that will teach a single topic to help us keep pace with things along the
way. Part of what makes learning coding difficult is it can be difficult to
find real-world examples to draw parallels from. If you are planning on
taking the AP Exam in Computer Science, many of the questions will not
have any real-world context and will require you to understand and
follow code without that as a reference.
For you, this can make it confusing, but just remember: there are
two sides to programming—what is being done and how it happens.
The “what” is pretty easy, and this gives the code context, like
parsing transit data, rolling a virtual die, or adding sales data for a
quarter together.
“How” it happens is a completely different story however. This is
where you need to break things down into individual steps and start to
think like a computer. A computer is going to think only about one
single step at a time. It has no concept of what comes next or what
came before it. It only is concerned with the present. So, if it can’t find
something—you get an error. If it tries to do something that doesn’t
exist—you get an error. If you try doing something out of order—you
guessed it, you get an error.
In fact, the computer is pretty dumb. I mean, like really dumb. What
makes it smart is how we are able to string multiple actions together to
make something work. And with growing advances in artificial
intelligence, the computer itself can start making adjustments. And
then Skynet activates, and we all know what happens after that.
So when we learn programming, we are going to focus on three
things:
What is the process
What is the syntax
What is the flow
The process is represented as a flowchart. We will learn how to
make these to help you plan out what you are going to do before you
write a line of code. At first, the flowcharts will be pretty simple, but
then they will get more complex. And yep, you will get pretty annoyed
with flowcharts before the year is over, but trust me…they help.
The syntax is the code; this is what you write that translates the
process you create in a flowchart to the instructions that the computer
can understand.
Finally, there is the flow. This is where you trace through the code
and see how the data and information it stores along the way changes,
and you can see how the operation of the program cascades from line to
line. You will be building charts that will capture the programming flow
so you can better understand how the computer processes code to
make your next program easier to conceive and code.

What You Need


You will need a Windows or macOS computer to complete the projects
in this book. You will need to install and configure the Java JDK (Java
Development Kit) and IntelliJ from JetBrains (our IDE or code editor for
the class). If you are on macOS, it is suggested that you uninstall the
built-in Java JRE (Java Runtime Environment) and use the one included
in the Oracle Java JDK. This will avoid warnings that appear when you
build your projects.

Footnotes
1 “The Top 10 Skills You Will Be Hiring For in 2017,”
https://business.linkedin.com/talent-solutions/blog/trends-
and-research/2016/linkedin-new-report-reveals-the-latest-job-
seeking-trends
© Doug Winnie 2021
D. Winnie, Essential Java for AP CompSci
https://doi.org/10.1007/978-1-4842-6183-5_2

2. Setting Up the Java JDK and IntelliJ


Doug Winnie1
(1) Mission Hills, KS, USA

To get started with our exercises, we need to set up our computers to work with
Java code and run it. This is called creating a development environment.
As you learn more about coding and programming, you will encounter many
different tools to help you do your job. There are so many in fact, that you might
find that one fits better than another. While they all essentially do the same thing,
there are features and options in different tools that mesh better with different
types of coders.

Coding Tools and IDEs


Coding tools, and their more sophisticated brothers, the integrated development
environment, or IDE, can sometimes spark passionate debate on which one is
considered “the best,” but ultimately it comes down to you, the coder, to decide
what is best for you.
To help make this course and the tools we use easy to understand and the
same across Windows and macOS, the tool we will use is IntelliJ IDEA . IDEA is a
free coding tool from JetBrains that is easy to use, not very complicated, and it is
the same across platforms.
There are others that you can use for this course as well. Some examples are
Eclipse or NetBeans. These tools provide the same features, but I wouldn’t
recommend using them to help us all be consistent with our tools when working
together.
The other key tool you will need is the Java Development Kit or JDK. In order
for the IDE to work, it needs to have the Java compiler to create your Java bytecode
and then use the Java Runtime Environment or JRE to run your program in a
virtual machine, called the JVM.
The version that you will use is the Java SE or Standard Edition that you can
download for free from Oracle. Regardless if you use IDEA, or another IDE, you
will need to install the JDK in order to compile and build your programs.
Installation and Setup
If you want to follow along with the same tools that I’ll be using, you will need to
install the JDK and IntelliJ IDEA.
To install the tools I’m using, you will need a PC with Windows 7, 8, 8.1, or 10
already installed.
For a macOS computer, you will need Yosemite, High Sierra, or Mojave. It is
recommended that you uninstall the version that Apple installs by default (called
OpenJDK). Refer to instructions online for how to do this.

Install the JDK


First, we need to install the JDK.
With your browser, go to the Oracle website:

www.oracle.com/technetwork/java/javase/downloads/index.html

From here, click the Java JDK download button.


Then accept the license agreement, and then select Windows which must be
installed on a 64-bit computer and operating system or for macOS.
Your browser will prompt you to save the installer to your computer. Save and
run the installer using the defaults for the configuration.
Remember the location of where the JDK is installed; you will need this later
on to connect IntelliJ IDEA to the JDK.

Install IntelliJ
Now we need to install IntelliJ IDEA.
With your browser, go to the JetBrains website:

www.jetbrains.com

Under Tools, look for the column IDEs, and select IntelliJ IDEA. We will use the
Community Edition, which is free.
Your browser will prompt you to save the installer to your computer. Click Save
to continue and download.
Run the installer and accept the defaults for all the settings.
That’s it! IntelliJ IDEA and the Java Development Kit are successfully installed!
© Doug Winnie 2021
D. Winnie, Essential Java for AP CompSci
https://doi.org/10.1007/978-1-4842-6183-5_3

3. Setting Up GitHub
Doug Winnie1
(1) Mission Hills, KS, USA

When you code, you need to have a location to store it and share that
code with others to work with it and review it. Tools called code
repositories are ideal ways to do this, and there are several different
types that are available for developers to use; one of the most popular
is GitHub, and we will explore it here. GitHub, in the context of this
book, is a tool that you can use on your own. I’m introducing it here,
because as you get more familiar with programming, you’ll find it to be
an indispensable tool.
Figure 3-1 Repository lifecycle

GitHub
The one that we will use is called GitHub. GitHub is a free public code
platform that developers use to build, archive, and manage coding
projects for individual or group collaboration. It is built on the Git
technology that is ordinarily used for private, internal projects, but
GitHub builds their public platform on Git to make it available to
anyone.
To create a GitHub account is simple. Go to www.github.com/
and create an account there. For our use in class, please create your
account as your Serra email address so I can easily identify your
account.
When you create your account, be sure to go to GitHub Desktop to
download the desktop client for Windows or macOS. You can download
the installer here: https://desktop.github.com/.
Install the client and sign in to your account. You can then create a
repository to keep track of the changes you make in your classwork
projects. You can create a single project to capture all of your
homework assignments, or you can create an individual repository for
each project. Whichever you choose is up to you.

How GitHub Works


GitHub and Git create a special directory that it uses to keep track of all
changes that you make to the files inside of it. When you make a change
to a file, it tracks what the change was and notes that.
This is different than a backup. A backup creates a copy of
everything that is in a folder. A change in Git and GitHub only records
what changed, which can save a lot of space and is much faster to
process.
There are many advanced workflows and automations that you can
tie into Git and GitHub, but we will only be using the platform to store
and share projects and homework assignments.
There are ways to tie in GitHub directly into the IntelliJ IDEA IDE,
but for simplicity, we can use the GitHub Desktop client to make, track,
commit, and sync changes to our GitHub account.

Lifecycle of a Repository
A repository, or repo, starts with the master branch, sometimes known
as a trunk. For individual developers, or small teams, projects might
only use a master branch and never create alternate versions of it.
As the program evolves and new changes are made, they are saved
to the repository by making a commit. A commit contains the changes
to the code and a brief comment and description made by the
developer on what changed for future reference. Over time, there will
be dozens or hundreds of commits on a repository.
At some point, a repository will need to split in some way. Either
there needs to be simultaneous work and they don’t want to have code
conflict with others, or a project needs to maintain an existing version
and they want to do something else with it. In that case, a branch is
created from the main trunk, and development can happen in parallel
with the original code.
At some point, a branch will need to rejoin the main development,
and this is done by merging that branch back into the master trunk.
For open source repositories, it is common for a developer to find a
helpful framework and want to add it to their own development
environment. To do that, they would fork the repository, creating a copy
in their own environment to work with and potentially make changes.
When a developer makes changes or improvements to a forked
repository, they might want to contribute those changes back to the
main repository they forked from. To do that, they submit a pull request
back to the original repository. As part of this pull request, the
developer outlines the changes that were made, and the person who
receives the requests can compare the proposed changes to the repo by
performing a diff that shows the changes side by side from one another.
Repositories can vary in complexity from something very simple
with a single or a handful of developers to a large open source project
with tens of thousands of developers. Code repos are the core of how
software developers work together on projects of any size.
© Doug Winnie 2021
D. Winnie, Essential Java for AP CompSci
https://doi.org/10.1007/978-1-4842-6183-5_4

4. Programming Languages
Doug Winnie1
(1) Mission Hills, KS, USA

Programming languages started as an abstract concept and then


adapted and changed over time. From the origins of machine language,
switch input, extending into the early days of simple line-by-line coding
like COBOL or BASIC to object-oriented languages like Java and C#, to
quantum computer languages like Q#, the evolution of programming
languages has developed over the course of many decades.

Origin of Programming
In the early 1840s, Charles Babbage proposed a machine called the
Analytical Engine. It was only a proposal—no actual machine was built,
but one inventive woman by the name of Ada Lovelace decided to write
an article that provided detailed instructions on how to represent
Bernoulli [ber-noo-li] numbers, a recursive equation based on number
theory, on the Analytical Engine. This article is considered to be the
very first computer program.
Since then the devices that can be programmed went from
theoretical to physical, manual to automatic, analog to digital. With
each evolutionary step, the way we program computers needed to
evolve as well.
With the birth of mainframe computers, data processing required
instructions to be sent to the machine to process and interpret the
instructions from the programmer. This was then applied to data to
organize and analyze the data. Instructions were entered through a
keyboard, but without the benefit of a monitor, so everything was done
through printouts on paper or storing data in the form of punched
holes on cards that were stored in stacks. If you look carefully at text
encodings and at some programming languages, you’ll see things like
“carriage return” or “print” that are carryovers from those printer days
from decades ago.
As computers got smaller and more powerful, more languages were
created. Languages also were created to serve specific types of projects
and industries like mathematics and science, data storage, and
graphics.
Today, we work with programming languages that can serve many
different purposes. In fact, a programmer often needs to use multiple
programming languages to get a project completed. As languages have
evolved, they have become specialized to complete specific tasks. As a
programmer, you will use the best languages for specific tasks and
combine them together to create your project.
The programming languages you learn today will continue to evolve
and change in the future. With future waves of new technology, new
languages will be developed to allow programmers to drive even more
innovation.

Forms of Programming
As programming has evolved over the decades, the types of
programming you can do have changed as well. Depending on what you
want to do, there are different types or forms of programming
languages that work in different ways. As a programmer, some forms of
programming give you direct access to the computer processor, while
others abstract the hardware into more human language that needs to
be translated or converted into the native language of the hardware.
Here are some example forms of programming that you might
encounter.

Machine Language
Machine languages allow programmers to code instructions directly to
the processor or hardware. Processors can be programmed by sending
sequences and patterns of ones and zeros through the processor to
enable actions to take place. As a result, the code that is entered by the
programmer is almost natively written. Assembly language, which is an
abstraction of machine language, uses special codes to modify
processor registers and perform functions.

Interpreted
Interpreted languages are readable by humans more easily than
assembly or machine languages. The programmer writes the code and
then runs it. A component called an interpreter reads each line of code
and then “interprets” it into native instructions for the computer. The
process is much slower than machine language since the interpreter
needs to convert each instruction provided by the programmer, even if
it repeats a line of code multiple times—it needs to interpret it each
time. JavaScript is an example of an interpreted language. A
programmer can stop the execution of the program, make a change to a
line, and then run it again without any other steps.

Compiled
A compiled language takes instructions written by a human and sends
that code to something called a compiler. A compiler takes the program
instructions and converts it to binary bytecode or native code for the
hardware and creates a program called an executable. This program is
native to the hardware and operating system and can’t easily be
converted back to the original programmed instructions. With the code
now in the native computer format, it runs much faster than
interpreted code, but if you need to make a change, you need to adjust
the original program instructions and recompile it to create a new
executable. If you are creating programs for multiple types of
processors, you need to compile unique versions for each native
instruction code for the target platforms. C is an example of a compiled
language.

Object-Oriented
Object-oriented programming, or OOP, treats everything as an object.
An object can store values; perform actions, called methods; and accept
and return values. An object is defined using a template, called a class,
that defines what an object can do. A programmer can then create an
instance of that class that has all of the capabilities defined by the class.
Java and C# are examples of object-oriented languages.

Data
There are languages that are specifically designed at working with data.
One example is SQL, pronounced as see-quel, which is a language
designed for working with databases. This is a query language, where
you ask a database a question and it gives you a set of data as a result.
You can use SQL to combine multiple databases together to create
combinations that you can then analyze. R is another example of a data
language. R is designed for statistical computing and graphing.

Functional
Functional programming approaches programming in a much different
way. Think of it like this: In a traditional programming language, which
is called imperative, you are defining the state of a value, object, or
component. You create and define tasks to complete, called an
algorithm, that go from beginning to end. Functional programming isn’t
bound by an algorithm. In a functional language, you perform
transformations on values, like a function in mathematics. You take a
value or object and modify it, with the ability to string multiple
transformations together using functions. Functional languages focus
on what needs to be done, without much care for how it is performed.
Examples of functional languages include Haskell, Scala, and F#.

Scripting
Operating systems regularly need to execute commands to configure
servers, install software, or perform maintenance. To automate that
process, there are scripting languages that allow systems like Windows,
Linux, and macOS to save common commands as a script that can be
run multiple times or distributed to multiple computers. PowerShell,
perl, and bash are examples of scripting languages .
As you can see, there are multiple types of programming languages
that you can work with to perform different types of tasks. This course
will focus on concepts found in object-oriented, compiled, and
interpreted languages like JavaScript, Java, C#, and Swift.
© Doug Winnie 2021
D. Winnie, Essential Java for AP CompSci
https://doi.org/10.1007/978-1-4842-6183-5_5

5. History and Uses of Java


Doug Winnie1
(1) Mission Hills, KS, USA

Java started off with lofty goals, and today it is one of the most popular
and widely used languages throughout the world.

Java Beginnings
Java got its start at Sun Microsystems and was first released to the
public in 1995. The development of the language started in 1991 by
James Gosling, Mike Sheridan, and Patrick Naughton and was designed
to be similar to C and C++ to help developers use their existing
programming skills for the new language. Sun Microsystems was
acquired by Oracle in 2009.
During development, Java was originally called Oak, then renamed
Green, and finally released as Java from Java coffee, which is why the
logo for Java is of a steaming coffee cup.

Write once, run anywhere

When it was launched, it promised “write once, run anywhere,”


meaning that programs you created in Java only needed to be coded
once, and they could run on any platform that supported Java.

Java’s Primary Goals


From the very beginning, there were five primary goals in the creation
of the Java language:
1. It must be “simple, object-oriented, and familiar.”

2. It must be “robust and secure.”

3. It must be “architecture-neutral and portable.”

4. It must execute with “high performance.”

5. It must be “interpreted, threaded, and dynamic.”

Today, Java is one of the most popular languages in use. Java’s heavy
use in web applications, enterprise desktop applications with
technologies like JavaFX, and the Android ecosystem makes it a great
language to learn with many flexible ways to use it.

Uses of Java
Since Java was first released, it has grown to power many large-scale
web applications for ecommerce, finance, and other industries. Java
applications are built on the server side and connect to web servers to
handle the business logic of applications.
Java is also the core language of Android, and native applications
created using Google’s Android Studio tools are built using the Java
language. In addition, you’ll find Java embedded in many devices, like
televisions and other consumer electronics.
Many frameworks have been created based on the Java
programming language to accelerate the development of applications
across many platforms and devices.
For web applications, frameworks like Struts, JSF, Grails, Spring, and
others are used individually or in combination with each other to
provide scalable web apps that can support millions of customers.
For desktop applications, frameworks like JavaFX allow developers
to create user interfaces using FXML, an XML-based markup language,
and meld that with Java code.
For mobile, the Android SDK from Google contains a tool for
developing Android apps and an emulator to deploy and run your app
on a virtual device for testing.
As a developer, there are many coding tools available to you for Java.
Integrated development environments, or IDEs, help combine many of
the tasks you need to perform like coding, code management,
debugging, working with code repositories, and creating
documentation. Some of the more popular IDEs are IntelliJ IDEA,
Eclipse, and NetBeans. The one we will be using in this course is from
IntelliJ.
Java opens up almost unlimited opportunities for you as a
developer, and the best thing is that Java is not complicated to learn or
understand once you get past the basics. Using your new Java skills, you
can build apps for almost anything.
© Doug Winnie 2021
D. Winnie, Essential Java for AP CompSci
https://doi.org/10.1007/978-1-4842-6183-5_6

6. How Java Works


Doug Winnie1
(1) Mission Hills, KS, USA

Java is a unique programming language due to the “write once, run


anywhere” mantra that was part of the original vision. How it makes
this vision come to life is important to understanding how you work as
a programmer.

The Problem with Compiled Languages


Compiled programming languages generally have a big limitation.
When you convert your code to an executable program, the compiler
reads the code and creates a binary file that is specific to a processor
architecture.
So, if I used a language like C or C++ to compile a program on my 32-
bit Windows PC, that program can’t run on a Mac, nor can it run on a
64-bit Windows PC natively without added technologies to bridge the
gap. It can only run on a 32-bit Windows PC.
Every processor and operating system is expecting a program to
meet extremely specific requirements. The way the program accesses
the hardware is vastly different between Intel processors, ARM-based
processors (like those found on phones and tablets), and other
processor types like RISC architectures. (Older Macs used this type of
architecture using chips called PowerPC chips like the G5 or G4.)
Even 32-bit Intel processors and 64-bit Intel processors operate
completely differently. So 64-bit programs can’t run on 32-bit
computers, and 32-bit programs can’t run natively on 64-bit computers
without additional software to make it compatible.
When you expand to other types of computers like servers, the
number of processor types and architectures can get even more
complex.
Web and application servers can use vastly different architecture
types like Sparc, Xeon, Itanium, and other types over the last couple of
decades.
So, the folks at Sun Microsystems, when they designed Java, wanted
to get past this limitation, so they created an innovative way to get
around it.

The JVM and JRE


When you run a Java program, you aren’t just running the program, you
are running a few things at the same time.
For multiple platforms, Oracle has created a set of technologies
called the Java Runtime Environment and the Java Virtual Machine.
These are built so that the specific architectures of the hardware
including Intel, ARM, 64-bit, 32-bit, and more can run Java programs.
These runtimes are installed on the system and stay resident,
waiting for a Java program to be executed.
When a Java program is called to run, the Java Runtime
Environment, or JRE, kicks in and opens the compiled program. The
runtime environment then captures the instructions of the program
and converts them to native executions on the computer.
This is what has made Java so universal. Wherever Oracle has created a
JRE, you can run Java programs.

Compiling Java Bytecode


When you create your Java program, there are a few things in play
when you create your code, called source code or source.
First, when you create your program, you are writing a plain text file.
There are no formatting, special characters, graphics, or anything other
than letters and numbers. When you save this file to your computer, it is
a .java file, meaning that the file extension is .java.
When you are finished coding your program, you take the file and
send it to the compiler. The compiler takes the instructions you created
and converts them to Java Bytecode, which the JRE can read and
understand. The Java Bytecode (sometimes referred to as JBC) is a
concise and compressed file that isn’t human readable but is designed
to be understood and executed quickly by the JRE.
The JRE then takes those bytecode instructions and sends them to
the native hardware to execute the program on the machine.
When you compile your program, you are creating these Java
Bytecode files, called .class files, and they will run in the JRE against
the native hardware of the architecture.

Precompiled Files
Sometimes, you will want to have files that you use repeatedly in your
program. These generally are sections of code that will never change
but contain prebuilt actions that you can execute and use in your own
custom code.
Maintaining these files can be extensive, and when you make
improvements to this code, you want to find a way to make it easy to
take those improvements and bring them to other programs.
To make this easier, Java supports combining precompiled code into
.jar files. JAR, or Java Archive, is a single module that you can then bring
into any program and access the actions and methods within it just as if
they were part of your code.
If you ever want to update or change the JAR, you can just change
that single reference or overwrite the JAR file that your program points
to and the updates are made.

OpenJRE
Java is an open source language , meaning that the community can
build, change, and improve the language and the compiler.
As part of this, Oracle has created the OpenJRE and OpenJDK for the
community to build and enhance. Oracle can then take contributions
made by the open source community and bring them into the official
Oracle Java JDK and JRE.
Oracle then adds additional security and other protections to
ensure the applications that run on it are safe and secure. Because it is a
packaged platform, this security is applied to any hardware, server, or
cloud infrastructures.
Android is largely built on Java, and starting with Android N, or
Android Nougat, Google switched to the OpenJDK due to litigation with
Oracle.
In the end, to you, it doesn’t matter which version of Java you are
running. When you install any JDK and JRE, the source code, compiled
files, and execution of the programs are essentially the same.
© Doug Winnie 2021
D. Winnie, Essential Java for AP CompSci
https://doi.org/10.1007/978-1-4842-6183-5_7

7. Flowcharting
Doug Winnie1
(1) Mission Hills, KS, USA

Programming and coding are just as much about thinking and planning
as it is about sitting in front of a keyboard. Often, a developer needs to
plot out in their mind or on paper how a program is going to work. This
can make the coding process much easier, especially if you are working
together with others on a project.
A flowchart is a common way to sketch out your program. It is
exactly as it sounds: a chart that visually shows the flow of a program.
In a flowchart, you connect various steps, decisions, and actions
together into a string that follows the flow of how the program will
operate.
Because the computer is so literal with how it processes your
actions and code, a flowchart makes it easier to code more accurately
the first time vs. having to debug and thrash your way through code.
Trust me, it is tempting to ditch the flowchart and go straight to the
code, but if you are new, or relatively new to coding, it will save you a
ton of time and force you to stop, pause, and sketch things out before
you go to the keyboard.

Flowcharting Tools
There are a bunch of flowcharting tools you can use; some are pen and
paper, and some are online.

Paper
Another Random Document on
Scribd Without Any Related Topics
THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the free


distribution of electronic works, by using or distributing this work (or
any other work associated in any way with the phrase “Project
Gutenberg”), you agree to comply with all the terms of the Full
Project Gutenberg™ License available with this file or online at
www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand, agree
to and accept all the terms of this license and intellectual property
(trademark/copyright) agreement. If you do not agree to abide by all
the terms of this agreement, you must cease using and return or
destroy all copies of Project Gutenberg™ electronic works in your
possession. If you paid a fee for obtaining a copy of or access to a
Project Gutenberg™ electronic work and you do not agree to be
bound by the terms of this agreement, you may obtain a refund
from the person or entity to whom you paid the fee as set forth in
paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only be


used on or associated in any way with an electronic work by people
who agree to be bound by the terms of this agreement. There are a
few things that you can do with most Project Gutenberg™ electronic
works even without complying with the full terms of this agreement.
See paragraph 1.C below. There are a lot of things you can do with
Project Gutenberg™ electronic works if you follow the terms of this
agreement and help preserve free future access to Project
Gutenberg™ electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright law
in the United States and you are located in the United States, we do
not claim a right to prevent you from copying, distributing,
performing, displaying or creating derivative works based on the
work as long as all references to Project Gutenberg are removed. Of
course, we hope that you will support the Project Gutenberg™
mission of promoting free access to electronic works by freely
sharing Project Gutenberg™ works in compliance with the terms of
this agreement for keeping the Project Gutenberg™ name associated
with the work. You can easily comply with the terms of this
agreement by keeping this work in the same format with its attached
full Project Gutenberg™ License when you share it without charge
with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the
terms of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.

1.E. Unless you have removed all references to Project Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project Gutenberg™
work (any work on which the phrase “Project Gutenberg” appears,
or with which the phrase “Project Gutenberg” is associated) is
accessed, displayed, performed, viewed, copied or distributed:
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.

1.E.2. If an individual Project Gutenberg™ electronic work is derived


from texts not protected by U.S. copyright law (does not contain a
notice indicating that it is posted with permission of the copyright
holder), the work can be copied and distributed to anyone in the
United States without paying any fees or charges. If you are
redistributing or providing access to a work with the phrase “Project
Gutenberg” associated with or appearing on the work, you must
comply either with the requirements of paragraphs 1.E.1 through
1.E.7 or obtain permission for the use of the work and the Project
Gutenberg™ trademark as set forth in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is posted


with the permission of the copyright holder, your use and distribution
must comply with both paragraphs 1.E.1 through 1.E.7 and any
additional terms imposed by the copyright holder. Additional terms
will be linked to the Project Gutenberg™ License for all works posted
with the permission of the copyright holder found at the beginning
of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files containing a
part of this work or any other work associated with Project
Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute this


electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the Project
Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or
expense to the user, provide a copy, a means of exporting a copy, or
a means of obtaining a copy upon request, of the work in its original
“Plain Vanilla ASCII” or other form. Any alternate format must
include the full Project Gutenberg™ License as specified in
paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™ works
unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or providing


access to or distributing Project Gutenberg™ electronic works
provided that:

• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt
that s/he does not agree to the terms of the full Project
Gutenberg™ License. You must require such a user to return or
destroy all copies of the works possessed in a physical medium
and discontinue all use of and all access to other copies of
Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project Gutenberg™


electronic work or group of works on different terms than are set
forth in this agreement, you must obtain permission in writing from
the Project Gutenberg Literary Archive Foundation, the manager of
the Project Gutenberg™ trademark. Contact the Foundation as set
forth in Section 3 below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on, transcribe
and proofread works not protected by U.S. copyright law in creating
the Project Gutenberg™ collection. Despite these efforts, Project
Gutenberg™ electronic works, and the medium on which they may
be stored, may contain “Defects,” such as, but not limited to,
incomplete, inaccurate or corrupt data, transcription errors, a
copyright or other intellectual property infringement, a defective or
damaged disk or other medium, a computer virus, or computer
codes that damage or cannot be read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except for


the “Right of Replacement or Refund” described in paragraph 1.F.3,
the Project Gutenberg Literary Archive Foundation, the owner of the
Project Gutenberg™ trademark, and any other party distributing a
Project Gutenberg™ electronic work under this agreement, disclaim
all liability to you for damages, costs and expenses, including legal
fees. YOU AGREE THAT YOU HAVE NO REMEDIES FOR
NEGLIGENCE, STRICT LIABILITY, BREACH OF WARRANTY OR
BREACH OF CONTRACT EXCEPT THOSE PROVIDED IN PARAGRAPH
1.F.3. YOU AGREE THAT THE FOUNDATION, THE TRADEMARK
OWNER, AND ANY DISTRIBUTOR UNDER THIS AGREEMENT WILL
NOT BE LIABLE TO YOU FOR ACTUAL, DIRECT, INDIRECT,
CONSEQUENTIAL, PUNITIVE OR INCIDENTAL DAMAGES EVEN IF
YOU GIVE NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of receiving
it, you can receive a refund of the money (if any) you paid for it by
sending a written explanation to the person you received the work
from. If you received the work on a physical medium, you must
return the medium with your written explanation. The person or
entity that provided you with the defective work may elect to provide
a replacement copy in lieu of a refund. If you received the work
electronically, the person or entity providing it to you may choose to
give you a second opportunity to receive the work electronically in
lieu of a refund. If the second copy is also defective, you may
demand a refund in writing without further opportunities to fix the
problem.

1.F.4. Except for the limited right of replacement or refund set forth
in paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of damages.
If any disclaimer or limitation set forth in this agreement violates the
law of the state applicable to this agreement, the agreement shall be
interpreted to make the maximum disclaimer or limitation permitted
by the applicable state law. The invalidity or unenforceability of any
provision of this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the Foundation,


the trademark owner, any agent or employee of the Foundation,
anyone providing copies of Project Gutenberg™ electronic works in
accordance with this agreement, and any volunteers associated with
the production, promotion and distribution of Project Gutenberg™
electronic works, harmless from all liability, costs and expenses,
including legal fees, that arise directly or indirectly from any of the
following which you do or cause to occur: (a) distribution of this or
any Project Gutenberg™ work, (b) alteration, modification, or
additions or deletions to any Project Gutenberg™ work, and (c) any
Defect you cause.

Section 2. Information about the Mission


of Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new computers.
It exists because of the efforts of hundreds of volunteers and
donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project Gutenberg™’s
goals and ensuring that the Project Gutenberg™ collection will
remain freely available for generations to come. In 2001, the Project
Gutenberg Literary Archive Foundation was created to provide a
secure and permanent future for Project Gutenberg™ and future
generations. To learn more about the Project Gutenberg Literary
Archive Foundation and how your efforts and donations can help,
see Sections 3 and 4 and the Foundation information page at
www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-profit
501(c)(3) educational corporation organized under the laws of the
state of Mississippi and granted tax exempt status by the Internal
Revenue Service. The Foundation’s EIN or federal tax identification
number is 64-6221541. Contributions to the Project Gutenberg
Literary Archive Foundation are tax deductible to the full extent
permitted by U.S. federal laws and your state’s laws.

The Foundation’s business office is located at 809 North 1500 West,


Salt Lake City, UT 84116, (801) 596-1887. Email contact links and up
to date contact information can be found at the Foundation’s website
and official page at www.gutenberg.org/contact

Section 4. Information about Donations to


the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission of
increasing the number of public domain and licensed works that can
be freely distributed in machine-readable form accessible by the
widest array of equipment including outdated equipment. Many
small donations ($1 to $5,000) are particularly important to
maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws regulating


charities and charitable donations in all 50 states of the United
States. Compliance requirements are not uniform and it takes a
considerable effort, much paperwork and many fees to meet and
keep up with these requirements. We do not solicit donations in
locations where we have not received written confirmation of
compliance. To SEND DONATIONS or determine the status of
compliance for any particular state visit www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states where


we have not met the solicitation requirements, we know of no
prohibition against accepting unsolicited donations from donors in
such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot make


any statements concerning tax treatment of donations received from
outside the United States. U.S. laws alone swamp our small staff.

Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.

Section 5. General Information About


Project Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could be
freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose network of
volunteer support.
Project Gutenberg™ eBooks are often created from several printed
editions, all of which are confirmed as not protected by copyright in
the U.S. unless a copyright notice is included. Thus, we do not
necessarily keep eBooks in compliance with any particular paper
edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg Literary
Archive Foundation, how to help produce our new eBooks, and how
to subscribe to our email newsletter to hear about new eBooks.

You might also like