₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,346,852 members, 8,525,459 topics. Date: Thursday, 26 November 2026 at 04:27 PM

Toggle theme

I Am Bored, I Just Tried This Code - Programming (2) - Nairaland

Nairaland Forum › Science/Technology › Programming › I Am Bored, I Just Tried This Code (2154 Views)

1 2 Reply (Go Down)

Re: I Am Bored, I Just Tried This Code by NDSMELODY(op): 7:49am On Aug 09, 2022
Hi, everyone i have change it to Obidient oo, but seriously it is not that I am supporting tinubu oo, the man is old na
Re: I Am Bored, I Just Tried This Code by NDSMELODY(op): 7:51am On Aug 09, 2022
Think4Myself:
You still support APC huh
I sincerely hope you don't go far in your coding journey and make sapa fire you

angry
i have change it bro, smiles na wao
Re: I Am Bored, I Just Tried This Code by CuteEmma(f): 7:52am On Aug 09, 2022
Xedmark:
The logic in this program is total crab... Sincerely I don't mean to discourage anyone here but let's look at something, if statement then else if and else if. Meaning there are so many unnecessary things in this program. Cos it's like saying if the food is not on the table (if statement)and it is not on the dining table (else if)and it's not on the stool (else if)then Mumm didn't cook anything (result). So what's the point?you could have just use the AND operator to tie the three conditions plus the condition in the logic just doesn't make sense at all.
An Int is assigned a value
Int i =8
If (i > 3)
And other else if statement are met then a string value should print

Like are u for real? pls be genius.!!
He’s a beginner with a mobile phone.. Fine, there’s no correlation between the variable values and the output but I guess he’s just learning about conditions. Also there was no else but it would’ve been unnecessary btw since the conditions already take care of all possible integers.

Another thing he could’ve done is an exception if variable i is not an integer.. but he’s not there yet so it’s not enough to be so upset, are you his teacher??
Re: I Am Bored, I Just Tried This Code by NDSMELODY(op): 7:52am On Aug 09, 2022
LikeAking:
Op dis coding guys stingy die.. just dey use ya phone run am..

Good luck
abi oo, I will soon upgrade to laptop. Just started with phone for now.
Re: I Am Bored, I Just Tried This Code by LikeAking: 10:07am On Aug 09, 2022
TastyFriedPussy:
see your mouth..as if your Papa follow them work for their money....come here come dey talk nonsense.
Abeg respect ya self...
Re: I Am Bored, I Just Tried This Code by Telegon: 4:15pm On Aug 09, 2022
Xedmark:
The logic in this program is total crab... Sincerely I don't mean to discourage anyone here but let's look at something, if statement then else if and else if. Meaning there are so many unnecessary things in this program. Cos it's like saying if the food is not on the table (if statement)and it is not on the dining table (else if)and it's not on the stool (else if)then Mumm didn't cook anything (result). So what's the point?you could have just use the AND operator to tie the three conditions plus the condition in the logic just doesn't make sense at all.
An Int is assigned a value
Int i =8
If (i > 3)
And other else if statement are met then a string value should print

Like are u for real? pls be genius.!!
This your logical proposition seems like a joke to me. How will tying the conditions with AND operator show any result.

Come off your high horse bro, we are all still learners.
Re: I Am Bored, I Just Tried This Code by Kvngfrosh(m): 4:19pm On Aug 09, 2022
@op
Maybe something like this

Re: I Am Bored, I Just Tried This Code by Telegon: 4:49pm On Aug 09, 2022
@Op, well done.
Considering the op is using phone for programming, we know he's a beginner and it's obvious this program is just for practice and not going to be deployed to public space, so I don't understand why he should handle exception.

My take on your program @op is that, you should have used three ifs rather than the else ifs, so if two conditions are met, you will see the two results rather than one.

Rock on... The journey is still far
Re: I Am Bored, I Just Tried This Code by NDSMELODY(op): 4:56pm On Aug 09, 2022
Kvngfrosh:
@op
Maybe something like this
sir, how can some one install java software in a new system........but you tried for this code oo
Re: I Am Bored, I Just Tried This Code by NDSMELODY(op): 4:57pm On Aug 09, 2022
Telegon:
@Op, well done.
Considering the op is using phone for programming, we know he's a beginner and it's obvious this program is just for practice and not going to be deployed to public space, so I don't understand why he should handle exception.

My take on your program @op is that, you should have use three ifs rather than the else ifs, so if two conditions are met, you will see the two results rather than one.

Rock on... The journey is still far
thank you sir, noted sir
Re: I Am Bored, I Just Tried This Code by NDSMELODY(op):
Kvngfrosh:
@op
Maybe something like this
do we really need to make our variable declaration private
Re: I Am Bored, I Just Tried This Code by NDSMELODY(op): 5:17pm On Aug 09, 2022
Kvngfrosh:
@op
Maybe something like this
well done, I see oop in your code..
Re: I Am Bored, I Just Tried This Code by Kvngfrosh(m): 10:37pm On Aug 09, 2022
NDSMELODY:
sir, how can some one install java software in a new system........but you tried for this code oo
A simple google search can help with that.
Re: I Am Bored, I Just Tried This Code by Kvngfrosh(m): 10:39pm On Aug 09, 2022
NDSMELODY:
do we really need to make our variable declaration private
It’s a good practice. Always declare your instance variables private unless you have a good reason not to.
Then use getters and setters to have access/modify the instance variables.
I didn’t do that up there sha(I’ll edit later…)
Re: I Am Bored, I Just Tried This Code by NDSMELODY(op): 10:42pm On Aug 09, 2022
Kvngfrosh:
It’s a good practice. Always declare your instance variables private unless you have a good reason not to.
Then use getters and setters to have access/modify the instance variables.
I didn’t do that up there sha(I’ll edit later…)
ok, will like to know how to use getter and setter method. Thanks
1 2 Reply

As A Programmer, What Will Be The Output Of This Code? • I Need Explanation On This Code?? Php Programmers • Please,Help Explain This Code In C • 2 • 3 • 4

Learn Basic Concept Of Coding And Quickly Adopt Any Language Of Your Choice • Breaking Into Tech In 2025: Should I Keep Pushing Or Switch Fields? • What Do You Do When Your Brain Gets Jammed While Coding