X-Received: by 10.224.19.78 with SMTP id z14mr6852025qaa.4.1361738306300; Sun, 24 Feb 2013 12:38:26 -0800 (PST) X-Received: by 10.49.116.115 with SMTP id jv19mr663533qeb.21.1361738306264; Sun, 24 Feb 2013 12:38:26 -0800 (PST) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!t2no4659311qal.0!news-out.google.com!t2ni671qaj.0!nntp.google.com!dd2no2731770qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.java.programmer Date: Sun, 24 Feb 2013 12:38:26 -0800 (PST) In-Reply-To: <42d76fca-d365-4030-ae8c-07a806eab87c@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=173.164.137.214; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T NNTP-Posting-Host: 173.164.137.214 References: <638ed624-9eba-44eb-bcbf-68466e5bb5f1@googlegroups.com> <42d76fca-d365-4030-ae8c-07a806eab87c@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: BlueJ don't know what i did wrong From: Lew Injection-Date: Sun, 24 Feb 2013 20:38:26 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: csiph.com comp.lang.java.programmer:22486 marvin...@htp-tel.de wrote: > I hope that is what you meant by making it easierr to read: You tell us. Is that easy to read? > public class RandomFigures > { > public String [] Name; Follow the naming conventions. Also, you'll learn that members like this should be 'private' with methods to get ('getName()') and set ('setName()') the attributes. > public int [] points; > public int [] assisting; > public int [] help; > public int [] helpstillyet; > public int [] stillthere; > ... Parallel arrays are not the data structure you should use. The correlation between these arrays and their meanings are not enforced. A class is supposed to collect correlated information. Also, follow the Java naming conventions. So: public class RandomFigure { private String name; private int point; private int assisting; private int help; private int helpStillYet; private int stillThere; public RandomFigure( String name, int point, int assisting, int help, int helpStillYet, int stillThere ) { this.name = name; this.point = point; this.assisting = assisting; this.help = help; this.helpStillYet = helpStillYet; this.stillThere = stillThere; } ... // getXxx() and setXxx() methods } Then you can have an array of these correlated attribute things: RandomFigure [] figures = new RandomFigure [160]; // or whatever magic number RandomFigure [0] = new RandomFigure( "Cyprien Esenwein", 150, -1, -1, -1, -1); etc. Just a start. -- Lew