Skip to content

AliesTaha/Java-projects

Repository files navigation

Java-Projects

These are a collection of programs I wrote in Java. They range from complex sorting algorithms, to databases, to simple games. I have gathered them all in one repository as each program is only one file, and explain what each file does below.

Languages Used

Table of Contents


Prerequisites

Java 8 or later
Back to table of contents


Game of Life

The Game of Life is a game that simulates a simple life form using a two-dimensional array and it allows user to select the number of live liveNum the game starts with and the number of generations. Each day, life forms are born or die, depending on a set of rules and the cell's location on a 20X20 grid
Back to table of contents

Averageing Integers

This program asks the user to enter three integers, following which it outputs the average of the three integers to two decimal places
Back to table of contents


Cubing Numbers

The program calculates the cube of an integer value. The user will be prompted to enter an integer number between 1 and 10 and then your program will calculate the cube of that number.
Back to table of contents

Distance Calculator

This program calculates the distance between two places using trigonometric arithmetic, latitudes and longitudes
Back to table of contents

Easter Sunday Calculator

The purpose of this program is to find the date of Easter Sunday using a sequence of Arithmetic
Back to table of contents

Merge Sort

A simple bubble sorting algorithm
Back to table of contents

Rock Paper Scissors

This program is a one player game of Rock, Paper, Scissors. The game is a best of 7 matches; however the winner must win by two. That means that the winner can win in as few as 5 games, and must have two more wins than their opponent. The program implements a while loop, and checks for input errors.
Back to table of contents

Simple Encryption

This program encrypts and deciphers text by shifting the letters up or down (alphabetic rotation) depending on the user's input.
Back to table of contents

Two Dice Roll Guess

The program runs six times and asks the user to guess a number between 2 and 12. The program uses a separate method for the random code and the user's prize depends on how many correct guesses they have.
Back to table of contents

Ordering Words Alphabetically

This program asks the user to enter one word, using println() method, then to enter a second word. The program then assigns an integer value to the word depending on the alphabetical order. It then determines and outputs whether the first word is alphabetically before, after or the same as the second word; depending on the integer value assigned. The interactions of input and output all occur in the compiler output pane.
Back to table of contents


About

Mini-games and small projects coded in Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages