Skip to content

md37971/DiceRollUIProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dice Roll UI Project - (Java & Python)

  • Developed By: Michael Delgado
  • GitHub Link: github.com/md37971
  • Core Mechanics & logic: Java using Apache NetBean's IDE
  • CSV Displayer: Programmed in Python using Matplotlib library.
  • Summary: Takes the randomized sum of three dices using Java's random library for the purpose of measuring which sum has the most frequent occurances with additional features including file reading/writing for data collecting purposes.
  • Some bugs may occur since this project is in its early versions.

Project Description

A project developed for the purpose of measuring frequency of the sum of three dices per iteration, where each dice rolls (1-6).

This project was based on one of my old physics assignments that was given to me in my senior year of high school, where we had to measure the frequency of the sum of three dices by either rolling them or programming it. I decided to challenge myself to program the dice frequency rather than do it physically. The original program I programmed in high school was a small program I coded in Python using the same library for this project as well. This project is an advanced version of my old program with more features such as displaying/clearing tables, file reading/writing in CSV & TXT, displaying visual data of results, etc. This project contains files both programmed in Java and Python, showcasing cross-integration of two programming languages in one project.

There are two components of this project that includes the Java UI (for core mechanics & logic) and an add-on program coded in Python for displaying data using the Matplotlib library. Further information about these two components are explained below.


DiceRollUI - Programmed in Java using Apache NetBeans

diceroll

This portion of the project contains all of the main UI components and logic, where Java will take the sum of three dices randomly for a number of iterations of the user's choice to display on the table. The user can interact with the UI to modify the table or save their results in a file to collect data in their respective directory.

Core Features

  • Conducts the sum of three dice rolls per user's preferred iterations to measure frequency.
  • Tables that displays results from the three dice.
  • Interacting with the tables in the UI.
  • Saving results in CSV & TXT files in a directory.
  • Ability for a user to login or logout to access a directory, where ceredentials are stored in the logininfo folder.

Note

Sample files including username folders, CSV files, TXT files, etc. have been included within this repository for experimenting when testing the application.


csvDisplay - Programmed in Python using Matplotlib Library

Screenshot 2025-05-21 151445

A simple add-on program developed in Python included with Java UI program using the Matplotlib library with the purpose to display visual data by reading CSV files in a directory of the user's choosing from collected data from the Java program.

Core Features

  • Displays results by reading CSV files.
  • List all directories from fileDirectories folder set in the login credentials file.
  • Matplotlib features to interact while data window is open.

Caution

DO NOT MODIFY THE LOCATION OF THE PYTHON FILE OR ADD FOLDERS/DIRECTORIES THAT AREN'T INCLUDED IN THE LOGIN CREDENTIALS TEXT FILE AS THIS MAY RESULT IN FILE ERRORS TO OCCUR IN THE PROGRAM.

About

A project that takes the sum of three dices and measures the frequency of the sum of those dices per iteration, developed using Java and Python.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors