Skip to content

Comprehensive toolkit for 2D array manipulation and statistical analysis in Java. Provides operations for matrix transformations, data analysis, and array processing with support for common array algorithms and data structure manipulation.

License

Notifications You must be signed in to change notification settings

maxwell-hauser/java_array_2d_operations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2D Array Operations

Java Maven License Status

A Java AWT/Swing desktop application for creating, visualizing, and manipulating two-dimensional integer arrays with comprehensive statistical analysis and matrix operations.

✨ Features

  • Array Generation: Create random 2D arrays with custom dimensions and value ranges
  • Visual Display: Interactive grid rendering with automatic resize support
  • Statistical Analysis: Calculate min, max, average, and standard deviation
  • Search Operations: Find values and display their coordinates
  • Matrix Mathematics: Add, subtract, and multiply arrays
  • Menu-Driven Interface: Intuitive menu system for all operations
  • Real-Time Updates: Automatic repainting on window resize

🚀 Quick Start

Using Maven (Recommended)

# Build the project
mvn clean package

# Run the application
java -jar target/array-2d-operations-1.0.0.jar

Without Maven

# Compile
javac Array2DOperations.java TwoDArray.java

# Run
java Array2DOperations

📖 Usage Guide

Menu Options

File Menu

  • About: Display feature summary and application info

Two Dimensional Array Menu

  • Create New Array: Configure rows, columns, and value range to generate random array

Statistics Menu

  • Minimum: Find and display smallest value
  • Maximum: Find and display largest value
  • Average: Calculate mean value
  • Standard Deviation: Compute statistical deviation

Operations Menu

  • Array Search: Find specific value and show its location
  • Array Add: Add two arrays element-wise
  • Array Subtract: Subtract second array from first
  • Array Multiply: Perform matrix multiplication (requires compatible dimensions)

🔢 Matrix Operations

Addition & Subtraction

  • Arrays must have same dimensions
  • Element-wise operations

Multiplication

  • Requires compatible sizes: A[m × k] × B[k × n] = C[m × n]
  • Standard matrix multiplication algorithm

🏗️ Architecture

Components

  • Array2DOperations.java: Main window, menu system, event handling, rendering
  • TwoDArray.java: Core logic for array operations, statistics, and matrix math

Key Features

  • Dialog-based input using JOptionPane
  • Custom rendering with Java Graphics API
  • Event-driven architecture
  • Thread-safe operations

📋 Requirements

  • JDK 21 (Temurin recommended)
  • Maven 3.9+
  • Cross-platform: Windows, macOS, Linux

🏗️ Building from Source

# Clone the repository
git clone https://github.com/maxwell-hauser/java_array_2d_operations.git
cd java_array_2d_operations

# Build with Maven
mvn clean install

# Run tests
mvn test

💡 Tips

  • Dimensions: Choose array sizes that fit comfortably in your window
  • Value Range: Select appropriate min/max values for better visualization
  • Matrix Multiplication: Ensure middle dimensions match (k in A[m×k] and B[k×n])
  • Resize: Window automatically redraws arrays when resized

🚀 Future Enhancements

  • Enhanced input validation with retry loops
  • Export arrays and results to CSV
  • Color-coded cells based on value magnitude
  • Search result highlighting in grid
  • Keyboard shortcuts for frequent operations
  • Additional statistical measures (median, mode)

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👤 Author

Maxwell Hauser

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

About

Comprehensive toolkit for 2D array manipulation and statistical analysis in Java. Provides operations for matrix transformations, data analysis, and array processing with support for common array algorithms and data structure manipulation.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages