A starter lab for the Object-Oriented Computing 2 (OOC2) module at Atlantic Technological University (ATU). Students complete guided coding exercises to refresh core Java fundamentals before moving on to advanced topics.
This repository provides skeleton Java files with inline instructions and placeholder comments where students write their code. The exercises revisit essential concepts from OOC1, including variables, control flow, arrays, and basic class design. A VS Code Dev Container is included so that students can begin coding immediately in a preconfigured Java 17 environment.
- While loop exercise printing and incrementing a counter variable
- For loop exercise replicating the while loop behavior with a for construct
- If statement exercise reading user input with Scanner and applying conditional logic
- Arrays exercise declaring, populating, and iterating over a String array
- Student class exercise defining instance variables, constructors, getters, setters, and methods
- Dev Container with Java 17 and VS Code Java Extension Pack preconfigured
- Java Development Kit (JDK) 17 or later
- VS Code with the Java Extension Pack (recommended) or any Java IDE
- Docker (optional, for Dev Container support)
git clone https://github.com/danielcregg/ooc2-lab-java-refresh.git
cd ooc2-lab-java-refreshOpen the project in VS Code. If Docker is available, reopen in the Dev Container for a ready-to-use Java environment. Then navigate to the source files under src/main/ie/atu/refresh/ and complete each exercise by replacing the // PUT YOUR CODE HERE and // YOUR CODE HERE comments with working Java code.
To compile and run a completed file manually:
javac -d bin src/main/ie/atu/refresh/WhileLoopDemo.java
java -cp bin src.main.ie.atu.refresh.WhileLoopDemo| Technology | Purpose |
|---|---|
| Java 17 | Core programming language |
| VS Code Dev Containers | Preconfigured development environment |
| Docker | Container runtime for Dev Container |
This project is licensed under the MIT License. See the LICENSE file for details.