A collection of small Java programs during Computer Science Degree (First year)
The following collection is only a small part of the many mini programs developed in my "Intro to programming" module. Some of the apps can be started by double clicking the App class item, others are command line programmes that need to started with:
java {the app class name}
This is indicated with "cl" in the following list and descriptions.
PigLatin is a secret language used by children whereby the first letter
of a word is moved to the end of the word and the letters “ay” are added to the end.
For example, Frances would translate to rancesfay in PigLatin.
A Palindrome is a word which is spelled the same forward as it is backward. For example, noon is spelled the same forward and backward. The application checks whether or not the word entered by the user is a Palindrome.
A small application to give the greatest common divider of two numbers
An application that accepts a one word message from the user as input. The application then encodes and outputs the word by reversing the word and replacing all of the vowels with numbers as follows: a = 1, e = 5, i = 9, o = 15 and u = 21.
An application that accepts a string from the user as input and replaces all the a's with '*'.
An application that accepts a word from the user, reverses and saves the reversed word as a new word and outputs the new word.
An application that accepts a mobile number (Irish mobile format: 083000000 or 085000000 or 0860000000 or 0870000000 or 0890000000) from the user and check the validity of the mobile number.
An applicatin that accepts a sentence from the user and outputs the amount of spaces, vowels and consonants.
A text based version of Rock Paper Scissors, The game is based on the best out of three, the user enters their option on text and the computer randomly chooses its option then compares the winner and keeps a record, declaring the winner.
An application that acccepts the user blood type and age and outputs the type of blood they can accept as a donation.
An application that accepts the users month of birth and the day in the month and outputs to the user their star sign
A game of hangmany where the chosen hidden phrase is picked at random from an array of phrases. the letters to be covered with an asterix isalso random each time. When the user inputs a letter, they receive either a message to say their letter was in the phrase and show it revealed or the letter wasnt in the phrase and to try again, once all the letters are guessed correctly a congratulations message along with the entire phrase is shown