Complete lab solutions for the Object-Oriented Computing 1 (OOC1) module at Atlantic Technological University (ATU). These exercises cover foundational Java programming and core object-oriented principles.
This repository contains worked solutions for all OOC1 lab exercises, organized by topic. Each package demonstrates a specific concept with well-commented Java source files that students can reference when studying. The repository includes a VS Code Dev Container configuration for a consistent Java 21 development environment.
- Introductory exercises covering Hello World, variables, and basic syntax
- Data types and operators with casting, user input, and arithmetic examples
- Control flow including if-else statements, switch, for/while/do-while loops, and break/continue
- Arrays with 1D and 2D array manipulation, for-each loops, and a TicTacToe game
- Classes and objects with Car, Dog, and Student modeling examples
- Encapsulation demonstrating getters, setters, and access modifiers
- Inheritance through animal, vehicle, beverage, and human hierarchies
- Polymorphism covering method overloading, overriding, and reference types
- Abstraction with abstract classes, interfaces, and multiple inheritance via interfaces
- APIE principles combining Abstraction, Polymorphism, Inheritance, and Encapsulation
- Java Development Kit (JDK) 17 or later
- A Java IDE or text editor (VS Code with Java Extension Pack recommended)
- Alternatively, use the included Dev Container for a preconfigured environment
git clone https://github.com/danielcregg/ooc1-labs-solutions.git
cd ooc1-labs-solutionsCompile and run any solution from the project root. For example:
javac -d bin src/ie/atu/intro/HelloWorld.java
java -cp bin ie.atu.intro.HelloWorldOr open the project in VS Code and use the Dev Container for a ready-to-go Java 21 environment with the Java Extension Pack preinstalled.
| Technology | Purpose |
|---|---|
| Java | Core programming language for all lab exercises |
| VS Code Dev Containers | Preconfigured development environment |
This project is licensed under the MIT License. See the LICENSE file for details.