Program Name
|
Description
|
Further Technical Info
|
DayFromDate.java |
Program To Calculate the day from the date using Zeller's congruence. |
Calls external classes. [requires NeilClass.java] |
DaysInMonth.java |
Type in the number of days in the month and on which day the month starts
and it will produce a calender for that month. |
Get's input, uses For loops and If statements. |
EmailSurname.java |
Type in an email address such as bill.gates@microsoft.com and it will
extract the 'gates' bit of it |
Uses indexOf and substring to extract the Surname. |
Factorial.java |
Produces factorials by using the switch statement. |
Demonstrates the use of the switch statement. |
LeapYear.java |
Prints out a list of which years are leap years. |
Demonstrated 'for' and 'if, else' constructs. |
ListAverage.java |
Inputs a list of numbers and then gives you the average of them. |
Uses While, For and If constructs. |
Midnight.java |
Type in the number of minutes past midnight and this will tell you what the
time is |
Simple input & modula arithmetic. |
NewtonRaphson.java
NewtonRaphsonClass.java |
Calculates the square root of a number using the Newton Raphson formula.
|
Calls internal methods & external classes. [requires
NeilClass.java] |
ReverseAlt.java |
Reverses the letters of alternate words. |
Demonstrated string tokeniser |
SimilarWords.java |
Compares two words and tells you how many of the letters are different.
|
Inputs two strings and compares them using charAt. |
Stamps.java |
Type in the weight of your parcel and it will tell you how much you need to
spend on stamps. |
Simple If constructs |
TempChart.java |
Outputs a chart of temperatures in Celcius and Fahrenheit. |
Uses a for loop to produce the chart. |
WordOrder.java |
Type in two words and the program will tell in which order they come. |
Uses compareTo and StringTokeniser |
Program Name
|
Description
|
Further Technical Info
|
BinomialCoefficient.java
needs GetBiClass.java |
Calculated The Binomial Coefficient of two numbers. |
Does some error checking with pre & post conditions. |
FileCopy.java |
Copies and displays the contents of a file. |
Copies the data into a byte array before outputing it to the destination
file. As it copies the data one byte at a time it can be a bit slow. Contains
no error checking. |
FileCopyEC.java |
Same as above. |
Same as above but contains the propper error checking code. |
FileDisplay.java |
Displays the contents of a file. |
Contains no error checking. |
FileEncrypt.java |
Encrypts a file |
Uses very simple XOR encryption. Contains no error checking. |
GCD.java
needs GCDClass.java |
Calculates the GCD using a recursive functions. |
Does some error checking with pre & post conditions. |
NewtonRaphson.java
needs NewtonRaphsonClass.java |
Calculates the square root of a number using the Newton Raphson
formula. |
Like the previous Newton Raphson program but does some error checking with
pre & post conditions. |
Nought.java |
A very simple noughts & crosses game. |
Coded very craply I have to admit but I didn't have much time to do it in.
Needs NeilClass.java. |
Connect4.java |
A simple Connect 4 game. |
Adapted from the Noughts & Crosses Java code but it is coded much
better. It is also a far superior game. |
CarGoatSim.java |
Simulates and solves the Car & Goats quiz problem. |
Creates random numbers. |
If the programs need NeilClass.java then this must be in the same directory
as the Java program which is being compiled. These programs were written using
emacs on UNIX.