This homework-assignments repository is designed to show a solutions for a series of computational problems, ranging from mathematical computations like finding the Greatest Common Divisor (GCD) to string manipulations such as reversing a string. Each problem is encapsulated within its class, and the program allows users to select and execute solutions through a simple interface.
- Java JDK 11 or higher
- An IDE that supports Java (e.g., IntelliJ IDEA, Eclipse, or VSCode with the Java Extension Pack)
- Clone the repository or download the source code to your local machine.
git clone https://github.com/effuone/AITU-ADS.git
- Open the project in your preferred IDE.
- Ensure that the JDK is correctly set up in your project's settings.
- Most IDEs provide a way to build the project through the interface. Look for a "Build" option, usually found in the top menu.
- Alternatively, if you are using a terminal, navigate to your project directory and run:
javac Main.java
- Run the
Main
class. This can typically be done by right-clicking on theMain.java
file in your IDE and selecting "Run Main.main()". - The program will prompt you to enter a problem number corresponding to the problem you wish to solve. For example:
Enter the problem number to run (e.g., 1 for ProblemOne):
- Enter the problem number of your choice and press Enter.
- Depending on the selected problem, you may need to enter additional inputs (e.g., numbers or strings) as prompted by the program.
- The solution to the problem will be displayed, along with the execution time.
To add a new problem:
- Create a new class in the
Solutions
package following the existing naming convention (ProblemEleven
,ProblemTwelve
, etc.). - Implement the problem solution and a
demo
method within your class. - Add a new entry to the
problemActions
map in theMain
class, mapping the new problem number to your class'sdemo
method.