Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Java expert in the house?
04-19-2005, 11:55 PM #1
- Join Date
- Apr 2005
- Thanked 0 Times in 0 Posts
Java expert in the house?
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, 12:20 AM #2
- Join Date
- Sep 2004
- Thanked 40 Times in 40 Posts