Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,227,526 members, 8,070,659 topics. Date: Wednesday, 05 February 2025 at 07:48 AM

Segsalerty's Posts

Nairaland Forum / Segsalerty's Profile / Segsalerty's Posts

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (of 26 pages)

Programming / Re: Help On Java by segsalerty(m): 3:10pm On Apr 27, 2011
Thats the modules logic my friend, It depends on ur class structure and how u implementing it. Try to fix it, if u cant, zip all ur src codes and send to my mail : segsalerty@yahoo.com
Programming / Re: Help On Java by segsalerty(m): 1:54am On Apr 27, 2011
Dolemite:

EDIT**I modified the code thus;I get a 'null' whenever i run the checkPass() method, why is that?

I haven't tried that one though, the remove command. . .

u got this wrong
use this

public class Aircraft
{
private ArrayList<Passengers>pass=new ArrayList<Passengers>();
String name;
int fare;
int weight;
int luggage;
Passengers p1;
public Aircraft(String i,int f, int w, int l){
name=i;
fare=f;
weight=w;
luggage=l;
p1 = new Passengers(name,fare,weight,luggage);
}
/** public void addPass(Passengers p){
pass.add(p);
System.out.println(p.toString());
}
*/
public void addPass(String i,int f, int w, int l){
int tpw=w*l;
if(tpw>250){
System.out.println("Too much weight"wink;
System.out.println(i+"Cannot be added!"wink;
}else{
pass.add(p1); //add the new created object to the arralist
System.out.println("You have just added"+i); //print out the name of the passanger u just added by getting its name u initialized
}
}
public void checkPass(){
System.out.println(p1.getName());
}

}


sad sad sad sad ur coding logic is kinda poor, are u copying/modifying any code there?
Programming / Re: Help On Java by segsalerty(m): 1:43am On Apr 27, 2011
Dolemite:

Edited. . . Thanks
works ? u welcome thou wink
Programming / Re: Help On Java by segsalerty(m): 1:35am On Apr 27, 2011
Dolemite:

Thanks alot, silly me i could KISS kiss you right now lol, it really helped, but I would also need to a remove passenger functionality. . .

are u female? if(true) kiss kiss kiss kiss kiss 1 million times coz we have few female java programmers.
Sure, u can remove a Passanger by saying


public void removePassanger(String nameOfPassanger){
int passangerIndexToRemove = 0;
for(Passangers p : pass){
if(p.getName().equals(nameOfPassanger){
pass.remove(passangerIndexToRemove);
}
else{
passangerIndexToRemove++;
}
}
}


including the function above can do it ,
it will remove the passanger from the ArrayList of u provide the passanger name on the list !
Hope this helps ? wink
Programming / Re: Keeping Only The Jbuttons In A Selected Row Active In A 2d Array by segsalerty(m): 11:37pm On Apr 26, 2011
csharpjava:

segsalerty

Can you then from the row you have enabled above, only keep 5 Jbuttons including the one the one the user has selected.

Or is this impossible to do?

cant understand u , can u make urself clearer?
Programming / Re: Help On Java by segsalerty(m): 11:30pm On Apr 26, 2011
ur Passangers class shld be Okay !
this concept should work out in ur Booking class as follows

public class Booking
{
private ArrayList<Passengers>pass = new ArrayList<Passengers>();

public Booking(){

}

public void addPass(String i,int f, int w, int l){
Passengers p1 = new Passengers(i,f,w,l); //create an instance of Passengers to be added
pass.add(p1); //add the new created object to the arralist
System.out.println(p1.getName()); //print out the name of the passanger u just added by getting its name u initialized
}
}


Hope this helps wink
Software/Programmer Market / Re: Need Php Programmers @ Ololufe.com by segsalerty(m): 9:34pm On Apr 25, 2011
whats the mode of work and payment cheesy cheesy? You need someone to hire or Staff cool? or Work now and we will pay u later? lipsrsealed
Programming / Re: Keeping Only The Jbuttons In A Selected Row Active In A 2d Array by segsalerty(m): 3:49pm On Apr 24, 2011
csharpjava:

segsalerty

Thanks for the good work you are doing for people on this forum, please keep it up. I have found a way to get the Buttons the way I want them, but I will go through your code step by step and compare it with mine to see how you went about yours. Because of the nature of my project I cannot post my code yet, but, later I will come back and post the full code here for anyone that might want to build an application like mine.


u re so much welcome bro
All the best
Programming / Re: Programming Projects (individual) by segsalerty(m): 5:53am On Apr 24, 2011
Nice one , How i wish i could participate in this cool
but, sucks , i havent touched my Oracle JAVA CX-310-252A Assignment for more than 3wks now that i've downloaded it cry cry (well, i have still got 11months wink)
But, I Encourage my fellow mates in Programming on here to seize this opportunity in improving in there skills!

@Poster,
Why cant u atleast post some of these projects so that people can start working. and if anyone is stucked with problem, u can advice to seek assistance here.
Let people understand the aim of this is not to mock or bulshit anybody thats trying to get beta with this freaking programming skill. But, this is an opportunity to be personally more friendly with Programming as a whole.

All the Best !
Programming / Re: Programming Projects (individual) by segsalerty(m): 4:05am On Apr 24, 2011
wink
Programming / Re: Keeping Only The Jbuttons In A Selected Row Active In A 2d Array by segsalerty(m): 3:24am On Apr 24, 2011
Fayimora:


It should be obvious what exactly am doing here. I have a new array of type JButton that is eventually hold the whole row that you want enabled when disabling others.

The previous code segs posted was disabling, now instead of disabling you store the row into the new matrix. Then you loop through every button and disable those that are not in the new matrix.

Thats exactly what my pseudo-code says but no one asked for more explanation on any part of it. Rather it was "bullshitted".

Fayimora

Excellent , making 2 ways of solving this problem for our brother in Programming. lets see, we've still got 999 more ways of solving this problem ! let him try and show us his coding approach on here !
I think there is more sense in ur idea of Helping people with problems they've got on here. if at all there is gonna be need for Helper to show sample, it shouldnt be pointing to the Result Gan Gan (It will so much help the Helpee wink wink wink wink), abi what do u think ? cool
Programming / Re: Keeping Only The Jbuttons In A Selected Row Active In A 2d Array by segsalerty(m): 2:57am On Apr 24, 2011
grin grin
csharpjava:

This pseudo-code will not yield the desired result, try it for yourself, what I'm trying to archieve is very complex.
Sorry to say , nothing is too/very complex in programming  wink (Just make ur approach simple as possible --- as if its sand play cheesy),  the solution i gave u is damn gonna solve the problem u have at hand, just wana get it twisted for u so that u can show how much u are gonna learn solving this problem.
******this is one of the 1,001 ways of solving the problem, this is quite very very simple, nothing is complex, okay ? just study it and imagine how local i took the problem before solving it this way.
I inlcuded a new method as follows

    private void disableAll_andEnableBack_in10_Seconds(final int r, final int colCount){
        SwingUtilities.invokeLater(new Runnable(){
            public void run(){
                final int count  = 10;
                for(int i = 0; i < buttons.length; i++){
                    for(int j = 0; j < buttons[i].length; j++){
                        buttons[i][j].setEnabled(false);
                    }
                }
               
                for(int x = 0; x < colCount; x++){
                    buttons[r][x].setEnabled(true);
                }
               
                t = new Timer(1000, new java.awt.event.ActionListener() {
                    int c = 0;
                    public void actionPerformed(java.awt.event.ActionEvent e) {
                        if(c >= count){
                            for(int i = 0; i < buttons.length; i++){
                                for(int j = 0; j < buttons[i].length; j++){
                                    buttons[i][j].setEnabled(true);
                                }
                            }                           
                            t.stop();                         
                        }
                        c++;
                    }
                });
                if(!t.isRunning()){
                    t.start();
                }
            }
        });
    }

******and i modified this existing function body to do like this ->

    private void loadAction(final int r, final int k, final int colCount){
        buttons[r][k].addActionListener(new java.awt.event.ActionListener(){
            public void actionPerformed(java.awt.event.ActionEvent e){
                disableAll_andEnableBack_in10_Seconds(r, colCount);
            }
        });       
    }

********Note: i introduced a new global variable
private Timer t;

so that i can track the timer instance and not abuse it in the program, a timer must stop before another
u grab?

I attached the new full length of code,  just download and re-run it ,  then, do urs in ur own way

Hope this Helps ?

Fayimora:

Hahaha cheesy cheesy  Funny you. You are the one who has to cool down and look at what you want to do. LOCALIZE THE PROBLEM.

Just so you dnt think am blabbin poo. Look at  the image below


Its funny how you have a problem and you decide to insult who is helping you. CHILDS PLAY Wow!!! thats deep for a "programmer". As for me, I believe it is smaller than child's play. Every problem is child's play when you learn to localize it. Think about that.

Please, u dnt have to talk that way to him, U shld beta have helped him more if ur pseudo-code couldnt help him
I guess u were the one that even mentioned about codes provided on problems posted on NAiraland ,  anywayz,  u should have tried beta helping him !  wink wink

Nobody knows all or is beta or perfect,  if someone finds what is so simple for u to solve tasking sometimes doesnt mean the person is OLODO!  okay? wink
Thanks for the understanding ! grin

Programming / Re: Keeping Only The Jbuttons In A Selected Row Active In A 2d Array by segsalerty(m): 9:34pm On Apr 23, 2011
Yeah , u re so much welcome, Someone post here on facebook abt posting codes as a solution to people's problem that we only need to assist not SOLVE wink wink
Thats why i did what i did with the code i posted and i hope it will help u in solving your problem !
grin grin cool cool
Programming / Re: Keeping Only The Jbuttons In A Selected Row Active In A 2d Array by segsalerty(m): 8:33am On Apr 23, 2011
U knw one funny thing? i have improved in the way i help dudes here  wink wink, We need to do this together and help ourselves ,  i just helped u with smth that should guide u in solving your real problem, all u need to do is understand my code( oh sorry, i dnt like comments coz i expect anyone to be able to read and interprete my codes  shocked shocked) , 
Codes below attached  try compile and run it
You didnt even tell us the laguage u want it solved in ,  well, this is JAVA !

smiley smiley wink wink cheesy grin

Software/Programmer Market / Re: Php Developers Required by segsalerty(m): 3:02am On Apr 22, 2011
wink
Programming / Re: Please Read by segsalerty(m): 10:38pm On Apr 18, 2011
Fayimora:

Life is not all about getting answers. What good are you to software design if all you do when you have a problem is just ask for code? Its funny how you guys ain't seeing reason to this. I was going to organize a programming competition with third prize £300. Obviously, you guys don't want me to so am just gonna take ma money back and enjoy maself with it.

NB: I said 300 for third prize and I meant it.

i dey here for that !
Programming / Re: Help On Java by segsalerty(m): 10:00pm On Apr 17, 2011
Dolemite:

Seg whats your take on this, I'm really interested in games programming, java doesn't seem to be used much as most of the coolest games i've played were done with c++, my belief is that java makes good software not games, actioncript doesn't seem like a strong contender for making games only a gamer would appreciate. . .what do you think? java vs c++ vs actionscript. . .

sad sad sad sad sad so sorry , I dnt have idea beyond the fence of JAVA SE for Desktop Application using JAVA Technology, cant really help with u question, and i dnt play GAMES also , i am not a GAME HOLIC wink wink
Programming / Re: Help On Java by segsalerty(m): 9:27pm On Apr 16, 2011
Derenle:

Write a C++ program to roll 3 dice,it would show the values of these dice, and show the total value of these dice. Can someone help me?

sorry, this topic isnt for c++ solution, create a new thread and let me see if i can help before someone else does wink wink
Programming / Re: Help On Java by segsalerty(m): 9:24pm On Apr 13, 2011
sonymax:

i need ebook 4 java beginner, chiscomax452@yahoo.com or @gmail.com

Google will help out ! wink wink wink wink
Programming / Re: How To Use Div? by segsalerty(m): 10:59pm On Apr 12, 2011
wink put ur email address here, i have a book for u that i can send to ur inbox!
Programming / Re: C++ by segsalerty(m): 9:57pm On Apr 11, 2011
oguntadej:

hey bro, I am really really sorry. Thanks Alot bro!

cool smiley wink
Programming / Re: Help On Java by segsalerty(m): 10:03pm On Apr 10, 2011
Otuabaroku:

Hi Segsalerty, I have just down loaded the client for trial but seem not to know how to get it running as each time I launch it, it does not come up until it times out.Hope it is the same default password?

Bleep NETBEANS IDE, it has been Building wrong .jar files for me for over a month now, thats why the thing didnt run whenever i redistribute its generated .jar file. shit, i was only testing the stuff with the 'run' button on the IDE, just figured the problem out, will send u a new link when everything if fixed, i just un-installed and re-installed a beta version of the IDE, hope it works fine this time, later

sorry for the inconviniency
Programming / Re: Help On Java by segsalerty(m): 9:54pm On Apr 09, 2011
prodam:

i really love java.

grin Good to hear that buddy !
Programming / Re: Help On Java by segsalerty(m): 9:24pm On Apr 09, 2011
prodam:

this thread is making me inferior already, as in a an undergraduate i can't boast of a single programming language
and u guy are talking java as if you worked with james goslings at sun microsystems.
my question: can i be scjp certified(qualifies to take the exam) after 3month of intense java training

sure dude, u can ! just do well in undertstanding the basics and practice DOMS, u can then be satified !

engrkunlex:

@seg,lola,odura.Am very g8fu 4 d litu orientation i heard fr u,i know d nxt tin 4me is to cheer up and do d program.Pls incase anybody has e-book sud pls send to ma mail @ olupeace4us@gmail.com or engrkunlexy4u@yahoo.com.10ks alot

u are so much welcome!
Programming / Re: Help On Java by segsalerty(m): 1:05am On Apr 09, 2011
lolade123:

@Dolemite
Thanks for your criticism,i do appreciate it.The 2 questions i asked on this forum are from Deitel & Deitel Java How to Program 8 edition,from second chapter exercises.If you have ever used the book b4,u find out the two solutions have not been touched in the lessons of that chapter.i solved all the questions except those two i asked here.So man,am advancing !!!!!  wink

grin grin Nice one , so, Deitel Deitel now have 8th Edition, uhmm, am out-dated ooo !
lolade123:

@seg
The solution solved my problem and have been able to decode everything.Thanks so u much for your help,have been having probs with my laptop but ok now.
pls send me your name FB and email address at dipowo@gmail.com.Thanks man.
u are so much welcome anytime, good to hear ur lappy is back to life and my solutions are useful ,
i just sent u an email ,
Programming / Re: Help On Java by segsalerty(m): 12:39am On Apr 09, 2011
lolade123:

@engrkunlex
your most Welcome to the java world.I have a nice gift for you, [url]http://www.4shared.com/file/fPX-FbMp/NIIT_JAVA_2.html
[/url], this is my electronic books from NIIt.hope u would love it and u can always stay here on NL for more info. wink

i really love this lolade123 , u just embacked on the way forward ! grin
@engrkunlex.
U see the spirit in those that code java? Its Open, sometimes (Open Source) wink our Knowledge is to build a beta would for software development.
You will enjoy this much more than other lang ! shocked shocked shocked
Programming / Re: Help On Java by segsalerty(m): 10:10pm On Apr 08, 2011
engrkunlex:

@seg pls can i av your contat?May be mail,facebook or number i jst wana ask 1 or 2 question wic i wl b very g8fu if u ka reply me.
okay , i accepted u on FB now ! wink
Programming / Re: Help On Java by segsalerty(m): 9:36pm On Apr 08, 2011
Otuabaroku:

Yes, I launched the admin UI first before launching the client. What I explained earlier, that is what is still happening. I have attached the screen shot of what displays on launching the application before it times out.

Oh, i see, sorry abt that, Found the bug here, Thats why ITS GOOD to test the app by diff people i diff env, the problem is technical, has to do with the RMI, dnt worry, am gonna upload a new Admin which will support online UPDATE. so that corrections can be by users anytime.


engrkunlex:

Thank GOD my dream come through many yrs of bin ignorant but now GOD mak me to mt JAVA guru at leart to put 4ward.To start wit am KUNLE an undagraduate student of ABU curently in 100 to 200l comp.Sc. Now av done alot of programs unda computer lik HARDWARE CORE durin my days in IB. Now am despirate to JAVA because i was told i kant do away witout it,now i nd your orientation on wic 1 to do 1st and wia to do it am curently in ZARIA.

you ar wlcome Mr kunle , just started with java basic, GOOGLE will help u alot with it. Throw any question here is nothing isnt clear to u or u need any solution to problems u encounter
Programming / Re: Help On Java by segsalerty(m): 7:28pm On Apr 07, 2011
Otuabaroku:

Hi Segsalerty, I have just down loaded the client for trial but seem not to know how to get it running as each time I launch it, it does not come up until it times out.Hope it is the same default password?

did u launch the admin UI before launching the client? try running it from the 'cmd' and tell me the error message printed out to u so that i can tell u what to do
Programming / Re: Programmers In Da Builing Pls Resue Me by segsalerty(m): 7:22pm On Apr 07, 2011
start learning the basis and let the programming flow in ur blood stream wink wink wink wink wink
Programming / Re: C++ Compiling Error by segsalerty(m): 11:56pm On Apr 06, 2011
sweet-pawn:

Ah, don't mind me! I was just thinking aloud!

i see ,

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (of 26 pages)

(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 - 2025 Oluwaseun Osewa. All rights reserved. See How To Advertise. 54
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.