Skip to content

Fundamental Java implementations for numeric solvers, prime number algorithms, and 2D function plotting.

Notifications You must be signed in to change notification settings

edennmor/Java-Computational-Tools

Repository files navigation

Java Computational Utilities and 2D Plotting

Overview

This repository showcases a collection of fundamental mathematical algorithms and console-based numeric solvers, implemented in Java. The project culminates in the integration of logic with basic 2D graphics, utilizing the StdDraw library for visualizing numeric output, such as function plotting.


Project Structure and Functionality

File Name Primary Function Description
Ex1_1_1.java Prime Number Checker Determines if a given integer is a prime number.
Ex1_1_2.java Twin Primes Generator Finds and lists all twin prime pairs up to a user-defined limit.
Ex1_1_3.java Generalized Prime Pairs Finds and lists prime pairs with a user-defined gap (m-primes) up to a limit.
Ex1_2.java Integer Arithmetic Simulation Implements basic arithmetic (like multiplication) using only iterative operations.
Ex1_3.java Quadratic Equation Solver (Console) Solves the quadratic equation $ax^2 + bx + c = 0$ and outputs the real roots (if any) to the console.
Ex1_4.java Repeated Solver Allows the user to solve the quadratic equation in a loop until explicitly stopped.
Ex1_5.java Quadratic Equation Plotter Solves the quadratic equation and uses StdDraw to plot the resulting parabola on a 2D coordinate system.
StdDraw.java 2D Drawing Library The utility class providing drawing primitives (points, lines, shapes) for visualization.

How to Compile and Run

To compile all source files, ensure you are in the project root directory and run the following command. Note that StdDraw must be compiled first as it is a dependency.

# Compile all Java source files
javac *.java

# Run a specific program (e.g., the Parabola Plotter)
java Ex1_5

About

Fundamental Java implementations for numeric solvers, prime number algorithms, and 2D function plotting.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages