Java for CMSC 120
Java is a prominent programming language and software development platform used to build applications for a broad range of computing environments, from mobile devices and desktops to large-scale distributed systems. It supports object-oriented programming, a design philosophy that models entities in the problem domain as bundles of data and behaviors, hiding internal details and allowing programmers to focus on high-level abstractions.
This book introduces readers with no prior programming experience to object-oriented programming in Java. The emphasis is on understanding how objects are constructed from classes, how they interact, and how to write code that is clear and well-organized. Core programming constructs and principles needed to write complete programs are developed, including modularity, decision statements, loops, and arrays.
What this book does not cover: the natural next point of study after completing this short book would be the design and implementation of new classes — blueprints for objects — along with interface types, inheritance, polymorphism, and exception handling.
Source Code
All program listings are available under code/src/ at
https://github.com/drue-coles/cmsc-120.
Each program compiles with Java 17, except in rare cases where a newer language or library feature
is used for simplicity. In such cases, an accompanying comment indicates the required Java version.