| Author |
|
Cock with a soc Honourary Member


Joined: 05 December 2004 Location: United Kingdom Posts: 957
|
| Posted: 21 April 2005 at 2:47pm | IP Logged
|
|
|
Somone do my java assignment im bored of it already
|
| Back to Top |
|
| |
Sirwomble Site Admin

Occasional Table
Joined: 09 September 2002 Location: United Kingdom Posts: 6687
|
| Posted: 21 April 2005 at 2:57pm | IP Logged
|
|
|
no
__________________

|
| Back to Top |
|
| |
Puss Honourary Member


Joined: 04 August 2003 Location: Scotland Posts: 1518
|
| Posted: 21 April 2005 at 3:33pm | IP Logged
|
|
|
Give it to gouldy, he enjoys programming.
__________________ You're about as useful as a cock flavored lollipop.
|
| Back to Top |
|
| |
cannedfool Imba Community Member

Joined: 07 July 2003 Location: United Kingdom Posts: 522
|
| Posted: 21 April 2005 at 4:53pm | IP Logged
|
|
|
what level java are u doing? easy med hard?
__________________ LongJohnDonut
|
| Back to Top |
|
| |
TheGouldFish Honourary Member

The Mapper
Joined: 05 June 2003 Location: Scotland Posts: 3456
|
| Posted: 21 April 2005 at 5:59pm | IP Logged
|
|
|
Java is Damn easy, and very buggy, and odd and way to OOP but still easy.
__________________ TheGouldFish
=============
Fear the Fish
|
| Back to Top |
|
| |
Cock with a soc Honourary Member


Joined: 05 December 2004 Location: United Kingdom Posts: 957
|
| Posted: 21 April 2005 at 8:15pm | IP Logged
|
|
|
Yeah ive got an assignment that is sorted of easy for any decent coder but this being my first year still finding it quite hard.
|
| Back to Top |
|
| |
kotr Public Member

Joined: 15 April 2005 Location: Finland Posts: 83
|
| Posted: 21 April 2005 at 8:34pm | IP Logged
|
|
|
thats cool
|
| Back to Top |
|
| |
TheGouldFish Honourary Member

The Mapper
Joined: 05 June 2003 Location: Scotland Posts: 3456
|
| Posted: 22 April 2005 at 7:44am | IP Logged
|
|
|
just knuckle down and learn the lanague, it will not be the last one you learn so time to get used to it.
__________________ TheGouldFish
=============
Fear the Fish
|
| Back to Top |
|
| |
Puss Honourary Member


Joined: 04 August 2003 Location: Scotland Posts: 1518
|
| Posted: 22 April 2005 at 12:09pm | IP Logged
|
|
|
Or you could do it gouldy, you used to do all mine. :D
__________________ You're about as useful as a cock flavored lollipop.
|
| Back to Top |
|
| |
ScotzMan 1337 Community Member


Joined: 06 August 2003 Location: Scotland Posts: 2163
|
| Posted: 22 April 2005 at 12:09pm | IP Logged
|
|
|
Puss you slacker
__________________
|
| Back to Top |
|
| |
cannedfool Imba Community Member

Joined: 07 July 2003 Location: United Kingdom Posts: 522
|
| Posted: 22 April 2005 at 1:30pm | IP Logged
|
|
|
if u need any help post it on here im willing :)..
__________________ LongJohnDonut
|
| Back to Top |
|
| |
hamble Honourary Member

Middle Eastern Terrorist
Joined: 03 August 2003 Location: Bahrain Posts: 1054
|
| Posted: 23 April 2005 at 1:38pm | IP Logged
|
|
|
I'll do it, but I don't really know anything about Java or how it works, and I haven't done any programming more advanced than a Photoshop Actionscript since High School.
So I'll do it... but don't expect a good grade.
|
| Back to Top |
|
| |
cannedfool Imba Community Member

Joined: 07 July 2003 Location: United Kingdom Posts: 522
|
| Posted: 23 April 2005 at 8:30pm | IP Logged
|
|
|
java is easy tbh
__________________ LongJohnDonut
|
| Back to Top |
|
| |
TheGouldFish Honourary Member

The Mapper
Joined: 05 June 2003 Location: Scotland Posts: 3456
|
| Posted: 24 April 2005 at 1:13pm | IP Logged
|
|
|
God, if LJD thinks itd easy then it must be
__________________ TheGouldFish
=============
Fear the Fish
|
| Back to Top |
|
| |
cannedfool Imba Community Member

Joined: 07 July 2003 Location: United Kingdom Posts: 522
|
| Posted: 24 April 2005 at 2:56pm | IP Logged
|
|
|
haha :P
__________________ LongJohnDonut
|
| Back to Top |
|
| |
Cock with a soc Honourary Member


Joined: 05 December 2004 Location: United Kingdom Posts: 957
|
| Posted: 30 April 2005 at 2:50pm | IP Logged
|
|
|
Could somone look at this java and tell me why it aint working i know its really simple but it is bugging me
import java.util.*;
import java.io.*;
public class TeamManager
{
private static BufferedReader input;
public static void main(String[] args)
{
System.out.println("Blue Bomber");
System.out.println("Green Gardeners");
System.out.println("Purple People");
System.out.println("Red Rovers");
do
{
displayMenu();
System.out.print("\n\t\tEnter option: ");
entry = input.readLine();
option = entry.charAt(0);
switch (option)
{
case '1': insertResult();
break;
case '2': displayResult();
break;
case '3': displayTeamStats();
break;
case '4': displayLeagueStats();
break;
case '5': displayCurrentLeader();
break;
case '0': //Do nothing. ('Quit' option)
break;
default: System.out.println(
"\t\tInvalid entry! Try again...");
}
if (option != '0')
{
System.out.print("\n\t\tPress <Return> to continue...");
anyEntry = input.readLine();
}
}while (option != '0');
public static void displayMenu()
{
System.out.println("\n\n\n");
System.out.println("\t\t1. Insert Result.");
System.out.println("\t\t2. Display Result.");
System.out.println("\t\t3. Display Team Stats.");
System.out.println("\t\t4. Display League Stats.");
System.out.println("\t\t5. Display Current Leader.");
System.out.println("\t\t0. Exit.");
}
}
}
}
thanks guys
|
| Back to Top |
|
| |
TheGouldFish Honourary Member

The Mapper
Joined: 05 June 2003 Location: Scotland Posts: 3456
|
| Posted: 01 May 2005 at 12:44pm | IP Logged
|
|
|
Well there was a good bit wrong here is your code back working:
import java.util.*;
import java.io.*;
public class TeamManager
{
private static BufferedReader input;
public static void main(String[] args) throws IOException
{
System.out.println("Blue Bomber");
System.out.println("Green Gardeners");
System.out.println("Purple People");
System.out.println("Red Rovers");
String entry, anyEntry;
char option;
do
{
BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
displayMenu();
System.out.print("\n\t\tEnter option: ");
entry = br.readLine();
option = entry.charAt(0);
switch (option)
{
case '1':
// insertResult();
break;
case '2':
// displayResult();
break;
case '3':
// displayTeamStats();
break;
case '4':
// displayLeagueStats();
break;
case '5':
// displayCurrentLeader();
break;
case '0': //Do nothing. ('Quit' option)
break;
default: System.out.println("\t\tInvalid entry! Try again...");
}
if (option != '0')
{
System.out.print("\n\t\tPress <Return> to continue...");
anyEntry = br.readLine();
}
}while( option != '0');
}
public static void displayMenu()
{
System.out.println("\n\n\n");
System.out.println("\t\t1. Insert Result.");
System.out.println("\t\t2. Display Result.");
System.out.println("\t\t3. Display Team Stats.");
System.out.println("\t\t4. Display League Stats.");
System.out.println("\t\t5. Display Current Leader.");
System.out.println("\t\t0. Exit.");
}
}
With out you telling me what problem you think you were haveing I can't tell you what you did wrong but here is a quick few:
When using ReadLine() you need to throw an IOException.
You have closing brakets "}" in the wrong place and too many of them.
You had NO variables setup.
All the functions bar the display function are not there so it won't compile.
plus you were using the ReadLine() function wrong.
what I surgest is goout and buy "the complete referance to Java 2"
Amazon Java book
it's about £21 and it is the best book you can get on Java, if you are doing alot of Java work get it. I bought version 2 and version 5.
Edited by TheGouldFish on 01 May 2005 at 12:49pm
__________________ TheGouldFish
=============
Fear the Fish
|
| Back to Top |
|
| |
Cock with a soc Honourary Member


Joined: 05 December 2004 Location: United Kingdom Posts: 957
|
| Posted: 01 May 2005 at 12:52pm | IP Logged
|
|
|
Cheers Gouldie I didnt realise all the functions had to be there for it to compile im working on writeing the other functions now thanks for the help though
|
| Back to Top |
|
| |
TheGouldFish Honourary Member

The Mapper
Joined: 05 June 2003 Location: Scotland Posts: 3456
|
| Posted: 01 May 2005 at 12:52pm | IP Logged
|
|
|
Also what editor are you using to write you code, I know alot of people just use notepad, but I found a great Java baed Editor call Arachnophilia, which can tidy up code and compile and run it. you can get it from :
http://www.arachnoid.com/arachnophilia
It's what I used to write my 4th year dissertation on.
Which was a Java based network chat program that was compeletely server-less. Gui'ed as well.
__________________ TheGouldFish
=============
Fear the Fish
|
| Back to Top |
|
| |
Cock with a soc Honourary Member


Joined: 05 December 2004 Location: United Kingdom Posts: 957
|
| Posted: 01 May 2005 at 12:54pm | IP Logged
|
|
|
Yeah were using a program called TextPad which seems alright ill stick with it for now anyway. It looks like we do the same final year projects thats what i have to do in the final year
|
| Back to Top |
|
| |