This project is designed to help you learn basic Java programming concepts through a series of progressively organized packages and examples.
The source code is divided into multiple packages covering key topics:
-
main.java.prog1: Structured Programming I
Data types, operators, type casting, statements, flow control, and comments. -
main.java.prog2: Structured Programming II
Predefined classes (e.g., arrays), debugging with breakpoints, exception handling, and JavaDoc. -
main.java.progOO1: Object-Oriented Programming I
Methods, Strings, StringBuilder, ArrayList, wrapper classes. -
main.java.progOO2.p01top10: Object-Oriented Programming II
Real-world examples: bank account, transfer, dog, room, whistle, door, product, counter, debt, and song.
To explore the documentation of each class and package, open the generated JavaDoc:
This documentation includes descriptions of all methods, fields, and classes. It helps you understand how each piece of the code works and is useful when writing your own programs.
Some exercises include unit tests written with JUnit. These tests are placed inside the same packages as the Java classes they test (e.g., main.java.prog1).
To execute tests one by one, follow these steps:
- Open the project in NetBeans or another Java IDE that supports JUnit.
- In the project tree, navigate to the test file you want to run. For example: src/ └── main/java/prog1/ └── P01_SandboxTest.java
- Right-click on the test file (e.g.,
P01_SandboxTest.java). - Select Run File or Run JUnit Test File from the context menu.
- Check the Test Results window for output and assertion feedback.
- Java 21+
- NetBeans (or any IDE that supports Maven/Ant and JUnit)
- Basic understanding of Java syntax
- Practice with real Java programs and problem-solving
- Improve code structure, readability, and testing skills
- Learn to document code professionally using JavaDoc
Happy coding! 🎉