Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,279 members, 7,807,936 topics. Date: Wednesday, 24 April 2024 at 11:08 PM

Learning To Program With Java by the Fulaman - Programming (2) - Nairaland

Nairaland Forum / Science/Technology / Programming / Learning To Program With Java by the Fulaman (41320 Views)

How To Program Arduino Uno / How To Program With Your Android Phone Using Aide IDE Environment / Which Training Center Can Someone Learn How To Program Quickly (2) (3) (4)

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) ... (16) (Reply) (Go Down)

Re: Learning To Program With Java by the Fulaman by Fulaman198(m): 10:07pm On Apr 07, 2016
ANTONINEUTRON:

ok! i made it String??

Check Out The New Code

Your solution is correct. I think I should create a server where you guys can submit your work therefore people can't get answers from others.
Re: Learning To Program With Java by the Fulaman by gaddafe(m): 10:38pm On Apr 07, 2016
Fulaman198 I have a question I sent to you in PM as I don't want to derail the thread. Thanks
Re: Learning To Program With Java by the Fulaman by Fulaman198(m): 10:54pm On Apr 07, 2016
gaddafe:
Fulaman198 I have a question I sent to you in PM as I don't want to derail the thread. Thanks

Ok let me know when you send it. Thanks!
Re: Learning To Program With Java by the Fulaman by gaddafe(m): 10:57pm On Apr 07, 2016
Fulaman198:

Ok let me know when you send it. Thanks!
I've sent it
Re: Learning To Program With Java by the Fulaman by CAMNEWTON4PRES: 2:05am On Apr 08, 2016
Fulaman198:


Yes you can absolutely, learning programming by yourself is very possible, but learning the science behind it requires extra research. It's all about understanding how to form algorithms.

In regards to your earlier query of why I can't teach this in Hausa for Hausa speaking people and Fulfulde for Fulani speaking people, it would be nice, however the people I'm addressing here are all Nigerians and other Africans. I'm not here to be an ethnic lion for the Fulani people. I'm here to try and help others from the great continent learn about an important programming language. I hope that you understand.
i know , i wouldn't understand myself ... wink
Re: Learning To Program With Java by the Fulaman by Nobody: 6:56am On Apr 08, 2016
fulaman198 can i use notepad++ for the coding?
Re: Learning To Program With Java by the Fulaman by Fulaman198(m): 7:46am On Apr 08, 2016
MuhdG:
fulaman198 can i use notepad++ for the coding?

Yep you can I'll update the thread again later today
Re: Learning To Program With Java by the Fulaman by hardebayho(m): 9:13am On Apr 08, 2016
Wait ooo... For how long are you gonna keep changing the name of the thread? Day 1,2,4... Till day wetin? I'm suggesting you just give the thread a constant name so you don't have to change the name everyday.
Re: Learning To Program With Java by the Fulaman by Nobody: 11:17am On Apr 08, 2016
Fulaman198:


Yep you can I'll update the thread again later today
oh good. and how do i compile it in cmd.. i copied and pasted what you wrote in my cmd but it gave me error...

juma'at kareem
Re: Learning To Program With Java by the Fulaman by Collinz2(m): 11:46am On Apr 08, 2016
Nice and understandable tut. Following.

1 Like

Re: Learning To Program With Java by the Fulaman by ANTONINEUTRON(m): 12:00pm On Apr 08, 2016
Fulaman198:


Your solution is correct. I think I should create a server where you guys can submit your work therefore people can't get answers from others.
No p.


I hope u can continue this tut to where we can create simple Apps; servers e.t.c.
Re: Learning To Program With Java by the Fulaman by satmaniac(m): 4:42pm On Apr 08, 2016
How did you make this so simple? God thank you for showing me this thread. Thank you fulaman!
Re: Learning To Program With Java by the Fulaman by Fulaman198(m): 10:13pm On Apr 08, 2016
MuhdG:

oh good. and how do i compile it in cmd.. i copied and pasted what you wrote in my cmd but it gave me error...

juma'at kareem

that's strange how did you attempt to compile it in cmd can you post screenshots of your code and also your command prompt? Thanks! I actually recommend that you install Netbeans IDE to make things easier. But if you want, you can use a combination of your preferred text application and command prompt. Please post your screenshots.
Re: Learning To Program With Java by the Fulaman by Fulaman198(m): 10:13pm On Apr 08, 2016
ANTONINEUTRON:

No p.


I hope u can continue this tut to where we can create simple Apps; servers e.t.c.


I will continue it, I'm sorry I have been so busy today, I'll update it with more content tomorrow.
Re: Learning To Program With Java by the Fulaman by Nobody: 5:58am On Apr 11, 2016

public class AddAndMul{
private static int num1 = 80;
private static int num2 = 1010;
public static voind main(String[] args){
System.out.println("num1 * num2 = " + (num1 * num2));
System.out.println("num1 + num2 =" + (num1 + num2));
}
}



i can't format coz i'm mobile.
Re: Learning To Program With Java by the Fulaman by satmaniac(m): 7:26am On Apr 11, 2016
public class MultiAdd
{

int num1 = 80;

int num2 = 1010;

public static void main(String[]args)

{

addigit = num1 + num2;

multdigit = num1 * num2;

System.out.println(addigit);

System.out.println(multdigit);







}

}

Modified
Re: Learning To Program With Java by the Fulaman by Fulaman198(m): 7:38am On Apr 11, 2016
crotonite:

public class AddAndMul{
private static num1 = 80;
private static num2 = 1010;
public static voind main(String[] args){
System.out.println("num1 * num2 = " + (num1 * num2));
System.out.println("num1 + num2 =" + (num1 + num2));
}
}



i can' format coz i'm mobile.

This won't compile because you don't have a primitive identifier you only did private static num1 and private static num2. Check your declarations again.
Re: Learning To Program With Java by the Fulaman by Fulaman198(m): 7:39am On Apr 11, 2016
hardebayho:
Wait ooo... For how long are you gonna keep changing the name of the thread? Day 1,2,4... Till day wetin? I'm suggesting you just give the thread a constant name so you don't have to change the name everyday.

Thanks for the suggestion, I'll keep that in mind.

1 Like

Re: Learning To Program With Java by the Fulaman by Fulaman198(m): 7:50am On Apr 11, 2016
satmaniac:

public class MultiAdd
{

int num1 = 5;

int num2 = 4;

public static void main(String[]args)

{

addigit = num1 + num2;

multdigit = num1 * num2;

System.out.println(addigit);

System.out.println(multdigit);







}

}

My assignment tisha come mark am now.

It's correct although you used different values than what was assigned. Good job though regardless.
Re: Learning To Program With Java by the Fulaman by Fulaman198(m): 7:51am On Apr 11, 2016
Ladies and gentlemen, I will update the thread later this evening I hope. I'm so sorry that there have been no updates for the last few days.
Re: Learning To Program With Java by the Fulaman by liliian(f): 9:38am On Apr 11, 2016
Fulaman198:
Ladies and gentlemen, I will update the thread later this evening I hope. I'm so sorry that there have been no updates for the last few days.

Hello Dear,i need your help in this thread desperately.

https://www.nairaland.com/3041813/needed-java
Re: Learning To Program With Java by the Fulaman by Nobody: 10:21am On Apr 11, 2016
Fulaman198:


This won't compile because you don't have a primitive identifier you only did private static num1 and private static num2. Check your declarations again.
debugged back-2-back. tnx
Re: Learning To Program With Java by the Fulaman by khattab008: 10:38am On Apr 11, 2016
Following.
Re: Learning To Program With Java by the Fulaman by Fulaman198(m): 3:20pm On Apr 11, 2016
crotonite:

debugged back-2-back. tnx

private static num1 needs to become private static int num1 same goes for num2. Your declarations didn't have identifiers smiley
Re: Learning To Program With Java by the Fulaman by satmaniac(m): 5:26pm On Apr 11, 2016
Fulaman198:


It's correct although you used different values than what was assigned. Good job though regardless.

I was just excited at the way you are literally putting java concept into our skulls that I couldn't see the variable values given by you. Anyway, It's been taken care of.

1 Like

Re: Learning To Program With Java by the Fulaman by Nobody: 7:20pm On Apr 11, 2016
Sugarhugs:


Sure! I can purchase enough data and also will follow up on this very soon, because I'm so busy so I just hope this will be up for a while till I can settle down to learn it
Hey, if you're interested in programming, you can check out onyenkuzi.com.

1 Like 1 Share

Re: Learning To Program With Java by the Fulaman by Fulaman198(m): 8:36pm On Apr 11, 2016
satmaniac:


I was just excited at the way you are literally putting java concept into our skulls that I couldn't see the variable values given by you. Anyway, It's been taken care of.

Ayyo, it's not a big deal ROFLLL. Don't worry about it. I'm actually a bit glad that you changed the literal values. Good job
Re: Learning To Program With Java by the Fulaman by Fulaman198(m): 8:44pm On Apr 11, 2016
Day 3:

First and foremost, I would like to apologise for not updating this thread for days. I have been quite busy with so many things in my personal life but i have not forgotten about you fellow Nigerians and other Africans. With day 3, I wanted to discuss the JVM (as you recall it stands for Java Virtual Machine) and classes more.

When you compile a Java file (of .java file extension), the resulting file becomes a .class file which is not human-readable. This same .class file is however what is read by the JVM. The class file contains what is known as bytecode. See examples below:

screenshot 1 is of a .java file which is what we as coders write. Screenshot 2 is of the .class file which is the resulting file that the compiler creates for the JVM.

Re: Learning To Program With Java by the Fulaman by Fulaman198(m): 9:07pm On Apr 11, 2016
We have briefly discussed one way out outputting text to the console via the System class (System.out.println). Today, we will discuss how to input data via the Scanner object. The Scanner object is one the class files (object files) that allows one to get scan for input. To use the Scanner class, we have to import it. It is one of the several APIs(Application Programme Interface) built-into the JDK (Java Development Kit). The API is a library of classes found in Java. When you become more sophisticated Java programmers, you will be able to develop and build your own APIs for other programmers to use. Let us get back to the Scanner class.

One of the various jobs of the Scanner class is to allow the programme to capture input from the user at the console. I have gone ahead and made a simple programme demonstrating the user of the Scanner object in the Screenshot below. Please view the comments to see what the programme does.

1 Like

Re: Learning To Program With Java by the Fulaman by Fulaman198(m): 9:08pm On Apr 11, 2016
As you can see from the screenshot when the programme is run, you get a screen prompt and a series of questions.

Re: Learning To Program With Java by the Fulaman by Fulaman198(m): 9:12pm On Apr 11, 2016
I wanted to also mention something that I had not mentioned earlier in regards to the manipulation of strings. I have been so caught up with so many things. In computing science, manipulation of Strings can be quite important. However, often our work calls for the joining of strings. We call this joining of Strings "String concatenation." Here's an example from the programme that was written:

System.out.println("Your name is " + userName + " and you are " + userAge + " years old." );


In Java, one way of concatenating Strings is to the use the '+' symbol in order to join text and values together.
Re: Learning To Program With Java by the Fulaman by Fulaman198(m): 9:19pm On Apr 11, 2016
Today was a rather short lesson on input and output and further information on the JVM. In the next tutorial, We are going to be learning about Conditional Statements (if - else if - else) and switch and we will be writing a programme that involves the utilisation of conditional statements.

As for your assignment, I would like for you to write a programme that prompts a student user for their name, and 4 test scores. With the information gained from the 4 test scores, I would like for you to calculate the median (average) of the 4 test scores and output it back to the user alongside their name.

Example: "Onyewu, your average test score is 84.8" for the output. Please use type double for the test scores and not int. Thank you!

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) ... (16) (Reply)

Java Vs PHP: Which Has The Brightest Future? / The Top Highly Paid Programming Languages To Learn / What Are The Best Laptops For Programmers And Hackers?!

(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. 47
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.