Introduction to Programming with Java¶
Introduction to Programming with Java is an interactive textbook designed to introduce fundamental concepts in software application development using the Java programming language. The curriculum is suitable for an introductory college-level course.
Introduction to Programming with Java is authored by Linda Seiter and Dan Palmer of John Carroll University. This ebook is an adaptation of CSAwesome written by Beryl Hoffman of Elms College, available at https://runestone.academy/runestone/books/published/csawesome/index.html. CSAwesome is based on the Java Review ebook written by Barbara Ericson of University of Michigan, https://runestone.academy/runestone/books/published/apcsareview/index.html.
To make sure the site saves your answers on questions, please click on the person icon at the top to register or login to your course. As you complete the lesson activities on each page, click the “Mark as completed” button at the bottom.
Enjoy the course!
- Unit 1 Getting Started and Primitive Types
- Unit 2 Using Objects
- Unit 3 If Statements
- Unit 4 Iteration/Loops
- Unit 5 Writing Methods
- Unit 6 Writing Classes
- Unit 7 Arrays
- Unit 8 ArrayLists
- Unit 9 2D Arrays
- Unit 10 Inheritance
- Unit 11 Recursion
Table of Contents¶
- 1. Getting Started and Primitive Types
- 1.1. Preface
- 1.2. Why Programming? Why Java?
- 1.3. Variables and Data Types
- 1.4. Expressions and Assignment Statements
- 1.5. Compound Assignment Operators
- 1.6. Casting and Ranges of Variables
- 1.7. Java Development Environments (optional)
- 1.8. Unit 1 Summary
- 1.9. Unit 1 Mixed Up Code Practice
- 1.10. Unit 1 Coding Practice
- 1.11. Multiple Choice Exercises
- 1.12. Lesson Workspace
- 2. Using Objects
- 2.1. Objects - Instances of Classes
- 2.2. Creating and Initializing Objects: Constructors
- 2.3. Calling Object Methods Without Parameters
- 2.4. Calling Methods With Parameters
- 2.5. Calling Methods that Return Values
- 2.6. Strings
- 2.7. String Methods
- 2.8. Wrapper Classes - Integer and Double
- 2.9. Using the Math Class
- 2.10. Unit 2 Summary
- 2.11. Mixed Up Code Practice
- 2.12. Coding Practice
- 2.13. Multiple Choice Exercises
- 2.14. Java Swing GUIs (optional)
- 2.15. Lesson Workspace
- 3. Boolean Expressions and If Statements
- 3.1. Boolean Expressions
- 3.2. If Statements and Control Flow
- 3.3. Two-way Selection: if-else Statements
- 3.4. Multi-Selection: else-if Statements
- 3.5. Compound Boolean Expressions
- 3.6. Equivalent Boolean Expressions (De Morgan’s Laws)
- 3.7. Comparing Objects
- 3.8. Unit 3 - Summary
- 3.9. Mixed Up Code Practice
- 3.10. Coding Practice
- 3.11. Multiple Choice Exercises
- 3.12. Lesson Workspace
- 4. Iteration (Loops)
- 5. Writing Methods
- 6. Writing Classes
- 6.1. Anatomy of a Java Class
- 6.2. Writing Constructors
- 6.3. Comments and Conditions
- 6.4. Accessor Methods
- 6.5. Mutator Methods
- 6.6. Writing Instance Methods
- 6.7. Static Variables and Methods
- 6.8. Scope and Access
- 6.9. this Keyword
- 6.10. Social Impacts of CS
- 6.11. Unit 6 Summary
- 6.12. Exercises
- 6.13. Lesson Workspace
- 7. Arrays
- 8. ArraysLists
- 8.1. Intro to ArrayLists
- 8.2. ArrayList Methods
- 8.3. Traversing ArrayLists with Loops
- 8.4. ArrayList Algorithms
- 8.5. Searching Algorithms
- 8.6. Sorting Algorithms
- 8.7. Ethics of Data Collection and Data Privacy
- 8.8. ArrayList Summary
- 8.9. Mixed Up Code Practice
- 8.10. Code Practice with ArrayLists
- 8.11. Multiple-Choice Exercises
- 8.12. Lesson Workspace
- 9. 2D Arrays
- 10. Inheritance
- 10.1. Inheritance, Superclass, Subclass
- 10.2. Inheritance and Constructors
- 10.3. Overriding Methods
- 10.4. super Keyword
- 10.5. Inheritance Hierarchies
- 10.6. Polymorphism
- 10.7. Object Superclass
- 10.8. Inheritance Summary
- 10.9. Mixed Up Code Practice
- 10.10. Code Practice with Object Oriented Concepts
- 10.11. Multiple-Choice Exercises
- 10.12. Lesson Workspace
- 11. Recursion
Index¶
If you see errors or bugs, please report them with this errata form.
(last revised 7/10/2020)
© Copyright 2015 Barb Ericson, Univ. Michigan, 2019 revised by Beryl Hoffman (Elms College, Mobile CSP Project), 2020 revised by Linda Seiter and Dan Palmer (John Carroll University). Created using Runestone.