Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,560 members, 7,958,743 topics. Date: Wednesday, 25 September 2024 at 10:07 PM |
Nairaland Forum / Science/Technology / Programming / Help On Java (9685 Views)
Pls Help Me With Ebooks On Java,d Price For The Book Is High And Am Still A Teen / Anyone With Help On Java App Creation? / [Help Request] Help On Java download and Installation Oo! (2) (3) (4)
(1) (2) (3) (4) (5) (Reply) (Go Down)
Re: Help On Java by candylips(m): 2:45pm On May 02, 2011 |
where is segsalerty he has a better understanding of the code. let him come and solve d problem |
Re: Help On Java by 2muchlogic(m): 3:14pm On May 02, 2011 |
Dolemite: Have you solved it yet? post your attempt here and let me see |
Re: Help On Java by Dolemite(f): 3:23pm On May 02, 2011 |
2muchlogic:Yes i solved it. . . public void removePass(String nameIn) {Now I need to implement a searchPassenger method. . .any ideas? |
Re: Help On Java by 2muchlogic(m): 3:58pm On May 02, 2011 |
Dolemite: Dolemite: Well done, I solved it differently by using the passengerID, for example what happens when 2 or more passengers are called Ms Dolemite? You have already done the searchPassenger method becuause you had to search for the passenger before you removed it - hence modifying your solution: public Passenger searchPassenger(String nameIn) { Passenger pFound; Iterator<Passengers> i = p.iterator(); while(i.hasNext()) { if (i.next().getName().equals(nameIn)) { System.out.println(nameIn + "has been found" pFound = i.next(); break; } } return pFound; } And do not forget to say thank you next time |
Re: Help On Java by Dolemite(f): 4:22pm On May 02, 2011 |
thank youuuuuuuuuu, please stay around, this saga is far from over. . . |
Re: Help On Java by segsalerty(m): 10:00pm On May 02, 2011 |
Wow, this post is so interesting ! I started seeing HasMap , CoalMap solutions , blah blah blah, ;DDatabase solutions , Real heckical codes + algorithms. Aal Izz well, Very Brilliant of u Dolemite for solving this , refering to what i provided u that refused to work for u
which i doubt if it could refuse to if u actually implemented it well, well, Good to see u put urself in the run of finding another way of fixing urs in ur own coding style, shows u re really learning and this thread is actually helping ur Java skill, am so so happy for this, Keep it up ! @others, Pls, dnt make problems too complex for whoever u wanna Help, they wanna learn from u. Try to solve it for them the simplest way, readable and understandable by a 2yrs old kid. This thing called programming is too simple and requires lil tacktics NOT bringing up WILD Algorithms. GBAM ! |
Re: Help On Java by 2muchlogic(m): 11:26am On May 03, 2011 |
Dolemite: you are welcome |
Re: Help On Java by Dolemite(f): 3:44pm On May 03, 2011 |
Any ideas on how I could integrate the first two classes into a gui below? public class Passenger public class Aircraft and Im trying to create a gui: public class BookingGui extends JFrame |
Re: Help On Java by segsalerty(m): 4:12pm On May 03, 2011 |
U shldnt ve proble, doing this at all, Note; ur GUI wont render those components u added using add() funtion, Its either u call on getContentpane().add() or introduce a JPane to add() those conponents and use getContentPane().add(the JPanel) , Get that, To implement ur ongoing codes on GUI, all u nid is just intialize the Aircraft class , Then add actionListeners to ur buttons to call to the Aircraft's necessary function. Try this out urself, show smth new and i will definately help u with codes to do this in the simplest form, Just do ur own homework on working on the idea i gave u, u can do smth beta. Sit down, calm down and do it urself! Sorry for my short explanations, i am on mibile, let me see what u ve got before i logon my sys tonite. |
Re: Help On Java by 2muchlogic(m): 5:10pm On May 03, 2011 |
Dolemite: 1. create an instance of each class by initializing them inside the BookingGui constructor 2. create a listener to handle events for each UI element http://download.oracle.com/javase/tutorial/uiswing/events/actionlistener.html |
Re: Help On Java by Fayimora(m): 11:14pm On May 03, 2011 |
NO offence but seems to me like your using this thread to do your assignment or mini-project or whatever. There is something called the JAVA API. There is also something something called JAVA DOCUMENTATION. Lastly there is something called JAVA TUTORIALS. Am not saying you don't work on your own but to be honest if you have taken time to look at these stuffs, you wont see yourself posting things like this. These are things you can learn generally there(java tutorials). You don't just learn by solving questions.Thats what makes you better but how do you learn? There is a BIG difference between learning and getting better. You learn to know something but practice to get better. You have to go through the Official tutorials and books aswel. If you need any say so and I would make it available to you to download or if you are the type that prefer hard copy books. I can buy one for you here and send to you. Its not gonna cost me anything. Going back to the subject, Also you need to read the documentation, not all at once but bit by bit until you finish it. Lastly, you have to get familiar with using API's. There is a really big difference between a programmer and someone who knows how to write code. There is also a big difference between a Java programmer and a Programmer. Try to look at this over and over but what I have to tell you is that you really don't want to be someone who just knows how to write code nor do you want to be just a Java programmer I just hope you see the GOOD in this post and nothing else. Good Luck. |
Re: Help On Java by Dolemite(f): 11:23pm On May 03, 2011 |
I AM using this to do my assignment. . .on a deadline and I have 2 more exams to prepare for? I do solve some problems, i don't just come in here begging for code, i came in here with my own code? which means i did my work? so chill bro. . . . . .and how can i become a programmer if i don't know how to write code? |
Re: Help On Java by segsalerty(m): 11:30pm On May 03, 2011 |
Fayimora: U really make good sense here bro, But, considering the reason why we need to help her, we need to let her realise her duty also so that all will react together and be a better result in return for her ! She should try to understand ur point and think twice. She will do better! I trust her! Dolemite: so, u are here , u didnt say anything to my response, u denied me abi ? Dont get mad at the guy. He is so much also trying to help. Just do whats necessary and Lets get back to the Brain work ! |
Re: Help On Java by Fayimora(m): 11:31pm On May 03, 2011 |
I just knew you wouldn't understand my point. IF YOU HAD, You wont have to ask for stuffs like this. C'mmon don't you think you are better than this? Asking how to implement 2 classes into a GUI. To be honest that question should come from someone dat programs because he/she has to. You should do you stuffs and i mean everything yourself. You shouldn't come here to learn new concepts. You should come here to learn new Algorithms, new ways of doing what you HAVE already done. If you had read these documentations before hand, which I know you knew was available. You would be like the Almighty Segs you always want to answer your questions. In as much as I am a good programmer, I have met a few from this forum we shared IDEAS and realised new ways of doing things but NOT learning new concepts like GUI. You need to understand my point here. P.S: you male or female? |
Re: Help On Java by Dolemite(f): 11:40pm On May 03, 2011 |
Ok, sometimes i ask questions even before looking at the question im trying to take the lazy way out so i can study. . . |
Re: Help On Java by Fayimora(m): 2:06am On May 04, 2011 |
ur choice girl/guy, |
Re: Help On Java by Dolemite(f): 2:32am On May 04, 2011 |
Both. . . |
Re: Help On Java by csharpjava(m): 6:22am On May 04, 2011 |
Fayimora Programming is one of the few professions where programmers are very selfish in helping those that are learning, with coding. I'm sure you cannot work in an agile environment, in which pair programming is a must (an XP development technique used by agile methodology) in this type of environment you are not allowed to hide your codes. You start your programming career as a trainee and you are trained by advanced programmers, no amount of books you read can make you a very good programmer unless you see the way other programmers have written their codes. This is not a forum for those doing their PHD, so you need to stop asking those asking for help here to go and read books, they won't come here if they can find all the answers they want in books. |
Re: Help On Java by Olamilec(m): 8:01am On May 04, 2011 |
Hello Nairalander, i am a beginner in Java Programming and i like how you guys use to talk about this Java and MySql please can somebody recommend some books for me and maybe anywhere i can do the training which will not be too cost and they will base the student experience on project. |
Re: Help On Java by Olamilec(m): 8:21am On May 04, 2011 |
@Fayimora: please i read your post and i will like you to help me get some different used java books and even a self teach cd rom, i will send you the neccessary money you may require to buy and to send it, please i must know this java by fire by force cos am dying to know how to develop application. I will love to read your positive reply. |
Re: Help On Java by csharpjava(m): 12:01pm On May 04, 2011 |
Dolemite These three classes should get you started just follow the way I have done it upto my comment "// This is where I have got to" in the AircraftGUI Class where all the GUI coding should take place. Create new JLabels and replace all the System.out.println with these JLabels. For the other methods just create new buttons, add addActionListener(this) to them and follow how I used the first button I named AddPassangerButton for the addPassenger method.
|
Re: Help On Java by Dolemite(f): 2:10pm On May 04, 2011 |
Oh wow man thank you!! soooooooooo much, you don't know how BIG this is for me THANKS!! |
Re: Help On Java by csharpjava(m): 2:26pm On May 04, 2011 |
Dolemite No worries!! you can always give me a shout if you need anymore assistance. |
Re: Help On Java by Fayimora(m): 8:02pm On May 04, 2011 |
csharpjava: Funny you. I ain't doing a Phd but would someday. If you really want to know then this is it. I am 17yrs old and just finished my first year. Am british by birth but a nigerian. Am not saying that you shouldn't post codes but hey, allow whoever is in question give it a try. The way i normally explain things are; You ask a question, i give you a pseudo code. You try it until you get stuck. You come back with your code and i tell you where you have gone wrong and tell you what to do again. It goes on in that loop until you et it. When you learn to think for yourself, then you have the tendencies to solve any problem no matter how large it is. Now when he/she finish the code(Completely or to an acceptable level), then I give you my code which would just be another way of doing what you have already done. Dolemite please dnt take ma next few sentences as an offence. She said how can i put the first 2 classes into a gui!!!!!!!!! ? That statement alone shows that she doesn't even understand what a GUI is. Now you have given code to her. What happens? It runs and does something. Ok cool. Now another assignment comes up and requires a GUI, The rest is obvious. Because she still hasn't understood what a gui is, she would post the same problem here. PLease help me with a gui. She has an assignment thats due. OK cool help her but you obviously know that you ain't helping her. I can ask her to change something in that gui now (assuming I gave her the work) and when she get an error she won't be able to handle it. Why? because she doesn't understand the concept. Everything builds up around understanding the concept, Anyways, this is the only forum out of about 12 which am currently in that does this. Seems to me like everyone just "wants it to work" without understanding what he/she is doing. I however would't speak about this anymore, |
Re: Help On Java by Fayimora(m): 8:09pm On May 04, 2011 |
Olamilec: Ok cool. I could buy a very good one for you, you dnt have to pay me. I am currently writing exams therefore very busy. Just [email=fayimora@hotmail.co.uk]mail[/email] me your address and when am free would get you one or two. In the mean time, if you want e-books then i have over 700 of them and not just in Java alone. I could send some to you if you tell me how you want them. I mean either by email or upload and download. Java is good and really improving speedily. I would advice you keep your passion for it and enjoy what it has t offer. Also, when learning Java don't get lot into its wonderful abilities/features but remember that you are lerning how to program and not how to write Java code. Good Luck. |
Re: Help On Java by dabrake(m): 8:27pm On May 04, 2011 |
import java.io.* ; public class Class_name { public static void main (String[] args) throws IOException{ String [] dig = new String [5] ; BufferedReader in ; in = new BufferedReader(new InputStreamReader(System.io)) ; System.out.println("enter your digit(at most 5 digits) :" ; String input = in.readLine() ; if (input.length() != 5) return ; for (i = 0 ; i <= 4 ; i++) {dig[0] = input.substring(i , i+1) System.out.print(dig[i] + " " ;} } } do debug it 4 mi. Myt b prone 2 errors |
Re: Help On Java by Fayimora(m): 8:55pm On May 04, 2011 |
Just a few errors, Can you state what exactly you wanna do? The only errors you have are
Those are basically the only errors. So now what do you wanna do? Fill up an array with something and print it out? |
Re: Help On Java by Dolemite(f): 9:34pm On May 04, 2011 |
Lol, Fayi you have no idea. . . |
Re: Help On Java by Fayimora(m): 10:05pm On May 04, 2011 |
Dolemite: Bout? |
Re: Help On Java by segsalerty(m): 10:21pm On May 04, 2011 |
This Thread is getting more and more interesting ! am Enjoying this, i fold my harms and watch now ! |
Re: Help On Java by Fayimora(m): 10:36pm On May 04, 2011 |
Man go to bed, lolzz |
How Much It Cost To Build An App Like Uber Or Spotify / Q-basic Program To Compute Simple Interest. / Female Programmers Stand Up And Be Counted
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 99 |