Skip to content

tranleduyan/RandomNumberGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Random Number Generator GUI Application

Author: Le Duy An Tran

image

About:

This is my personal project I work on to tackle on different problems in generating random number program and turn into a user-friendly useable application using more on Java Swing. The purpose of this project is practice and improve my thinking towards the specific achievement - a functional application with graphics and easy to use.

Inspiration:

Random number generator is an essential program in most of people's lives with different unique uses - for small lottery party games, solve the problems of missing dices games, choose people or divide group with random people, etc.. Not only it is to solve daily random number - related problems, it is also used for such purpose as in science, mathematics, and more. As a person who also use them a lot in my daily lives and a Computer Science student, I was inspired and feel the urge of making one for myself and local uses.

Softwares:

Eclipse IDE

What it does:

The application will generate the random number in a user-defined range. The user will enter the number where they want the random range to start with and then enter the number they want for the end of the range. These actions can be done by pressing, interacting with the button interfaces.

How it is built:

A console program was created first to easily test, track and debug the logic errors. After the console program is working perfectly, the design of the random number generator was tested, the visuals and interfaces are inspired by many other random number generators. The arrays is used to store the buttons, and JFrame is responsible for creating the window. In order to populate the arrays, for loop is used for code readability, and avoid redundant code. JLabel is in charge of labeling buttons, showing right text for each button, and each button has to do the expected function. After taking all the user inputs, the application will then perform the random number generating in range logic to output a random number within the range on to the screen.

What I learned:

  1. Java Swing and how to implement simple buttons, and deliver the user's inputs to the program to work as expectations.
  2. How to practice code readability, debugging, and avoid redundant code.
  3. Get used to build an useable application rather than just the program itself.
  4. Appropriate Mathematics logic that apply to solve such problems along the way for the program to work correctly.

What Can It Be Improved:

  • The application can be more polished if after generating number a short time screen showing the generated number, emphasize the value of the number.
  • It can also be extended by implemented more different modes: A mixed random of alphanumerics (number mixed with letters) in a wanted order just like license plate, a pure random number, or random betweens alphabet letters.

About

Sophomore Year Project: A Random Number Generator Application (Java)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages