Tag: Java

  • Java: Recursive Handshake Function

    Java: Recursive Handshake Function

    This was an assignment for an advance java class at my local community college. I was required to use a static recursive method calculate the number of handshakes that would occur with n number of people in a room. Each person shakes hands with everyone once.

  • Java: Fibonacci Sequence

    Java: Fibonacci Sequence

    This was an assignment for an advance java course at my local community college.

  • Java: Linked Lists and HashMaps

    Java: Linked Lists and HashMaps

    This assignment allows a user to input names of birds. The program had to store that information in a linked list. The program also had to produce a count of the each bird population if the user requested it. As I came up against the dead, this assignment got a bit messy. It fully functions,…

  • Java: Printing Jagged Array Combinations

    Java: Printing Jagged Array Combinations

    In this assignment I was asked to print out all possible combinations of each element in a 2D array. The assignment asked for a recursive program, first I solved it traditionally, then morphed that into the recursive program the assignment required.

  • Java: Steganography – Least Significant Bit

    Java: Steganography – Least Significant Bit

    This was an assignment for an advance java class at my local community college. I was asked to get the Least Significant Bit from a text file of binary numbers. Then output the last bit of each line, the LSB, to a new text file. Each line of the new file needed to be eight…

  • Java: Reading a Text File to Check for Cheating

    Java: Reading a Text File to Check for Cheating

    This program looks for runner who skipped a sensor or had a pace under 4:30 in one of their splits. This was an assignment for an advance java class at my local community college.

  • Java: Writing Race Data to Text Files

    Java: Writing Race Data to Text Files

    This program creates an array from a text file that contains data about the amount of time it takes a runner to complete a half-marathon. I was then required to create a way for a user to input a runner’s number and get data about their race performance printed to the console. This was an…

  • Java: Exception Handling in Time Program

    Java: Exception Handling in Time Program

    This program demonstrates how to use exceptions in Java. It allows the user to enter a time in 24-notation. The program throws an exception if the format or numbers are invalid. If no exceptions exist it converts the time and outputs it in 12-hour notation to the console. This was an assignment for an advanced…

  • Java: Extended Subclasses in Horse Program

    Java: Extended Subclasses in Horse Program

    This assignment require me to extend subclasses to create various types of horse objects. It was an assignment for an advance java class at my local community college. I was under a bit of a time crunch, so this program is somewhat thrown together. However, if it works it works.

  • Java: Abstract Periodic Array

    Java: Abstract Periodic Array

    An assignment for an advance java course at my local community college. The assignment asked for four separate files, as shown below. Periodic needed to be abstract and PeriodArray had contain both metals and nonmetals elements.

  • Java: Phone Book

    Java: Phone Book

    This was an assignment for an advance college course at my local community college. The assignment gives you much of the code, it combines two seperate arrays, names and phone numbers, into a single multidimensional array. It allows the user the to look up numbers too.