Skip to content

artisan1218/Java-GUI-Apps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Java GUI Apps

This repo contains three Java GUI applications:

  1. BMI Calculator
  2. Statistical Calculator
  3. Natural Number Calculator

Note: all of them requires a valid JRE to run

1. BMI Calculator

Read input(height and weight as integers) from user, then perform BMI(Body-Mass index) calculation and display the result to user interface. BMI is weight in kilograms divided by height in meters squared

Application window:

image

Result display:

image

2. Statistical Calculator

Read from user input: a list of numbers and display the statistical measurement of these numbers including:

  1. Mean value
  2. Median value
  3. Mode: the number that appears the most
  4. Range: difference between the max and min value
  5. Mid-Range: mid-way between the least value and the greatest value of the data set
  6. Population Standard Deviation: the formula is shown below

where the parameters are:

image

The input list can be any positive numbers separated by any delimiters, such as comma, white space, etc.

Application window:

image

Result display 1, numbers separated by ,:

image

Result display 2, numbers separated by white space:

image

3. Natural Number Calculator

NN calculator works just like any other calculator but it can calculate any large number without the overflow issue because it's implemented not using Java Int but a customized NaturalNumber class.

How to use: Enter a number in the number pad, click enter to save it to top window, then enter another number in the number pad, then choose the operation you want to perform, such as +, -, *, /, pow, or root.

swap button can switch the top/bottom value. Clear is used to clear the window.

Application window:

image

Result display, calculation of 123456789+987654321: Enter 123456789 in the number pad, click enter, enter 987654321 in the number pad, click +:

image

Result display, calculation of 123 to the power of 6: Enter 123 in the number pad, click enter, then enter 6, click pow:

image