View Full Version : Java expert in the house?

04-20-2005, 12:55 AM
Has anyone got a notion about JAVA....

Its my last ever project for school and im stressing out big time over this latest one. Basicaly i havnt got a clue. Any help appreciated.

You are required to produce a ‘library’ class file with methods that carry out functions. Your class should contain methods for at least the following.

getInteger() from the keyboard

getDouble() from the keyboard

getCharacter() from the keyboard

getString() from the keyboard

testLeap(year) this method will determine if a particular year was a leap year (see demo programs from week 5 lecture)

DecPlaces(double, int decplaces) this can be used to convert a double number to one, two or three decimal places. Hint: You should be able to use a switch statement to set up the number format based on the integer decplaces which has been passed as a paramenter.

CtoF(double C) converts temperature Centigrade to Fahrenheit

FtoC(double F) converts Fahrenheit to Centigrade

MilestoKm(double M) converts miles to kilometres

KmtoMiles(double k) converts kilometres to miles

Write a simple test program that makes use of all of the above methods so that it can be tested that they all work properly.

04-20-2005, 01:20 AM
Wrong forum...this is javascript not java...
Homework? (http://www.codingforums.com/showthread.php?t=53446)