Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,148,903 members, 7,802,929 topics. Date: Saturday, 20 April 2024 at 03:48 AM

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

Nairaland Forum / Science/Technology / Programming / Learning To Program With Java by the Fulaman (41233 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 asalimpo(m): 11:04pm On Apr 11, 2016
sonOfLucifer:

Hey, if you're interested in programming, you can check out onyenkuzi.com.
server dns address could not be found.
Re: Learning To Program With Java by the Fulaman by Fulaman198(m): 11:07pm On Apr 11, 2016
asalimpo:

server dns address could not be found.

The link works for me, but if you two could, could you please kindly open a different thread for that. It's a bit rude to be posting that in this thread. Thanks!
Re: Learning To Program With Java by the Fulaman by asalimpo(m): 11:10pm On Apr 11, 2016
Fulaman198:


The link works for me, but if you two could, could you please kindly open a different thread for that. It's a bit rude to be posting that in this thread. Thanks!
is that a thread worthy topic? Or maybe i should pm him?
Carry on your work - it's not something that would derail even this thread. At most, 2/3 replies and that issue is done with. It's not even derailing cuz the alternatives are like killing mosquito with sledge hammer.
Re: Learning To Program With Java by the Fulaman by satmaniac(m): 11:53pm On Apr 11, 2016
Fulaman198:
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!
impport java.util.Scanner //wrong spelling of import.

public class TestScores

{

public static void main(String[]args)

{
String name;
double engScr,mathScr,phyScr,chemScr;
double average ; // I really don't know why, I just assign a value of 0.0 to it. Probably, seen somewhere.
Scanner stdio = new Scanner(System.in)
;
System.out.println("Enter your name pls"wink;
name = stdio.nextLine();
System.out.println("Pls, enter your English test
score"wink;
// The out println statement should be on one single line.
engScr = stdio.nextDouble();

System.out.println("Pls, enter your Math test Score"wink;
mathScr = stdio.nextDouble();

System.out.println("Pls, enter your Physics
score"wink;
//Should all be in one single line.
phyScore = stdio.nextDouble(); // phyScore did not match the declared phyScr

System.out.println("Pls, Enter your Chemistry
score"wink;
// Have to be on single line.
chemScore = stdio.nextDouble(); //chemScore did not match the declared chemScr

average = (engScr + mathScr + phyScr chemScr)/4 // Forget to end it with a semicolon(wink


System.out.println("Welcome" + name + "Your
average score is" + average);
// Should be on single line and no semicolon(wink





}
}

Looking forward to corrections from all.

1 Like

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

impport java.util.Scanner

public class TestScores

{

public static void main(String[]args)

{
String name;
double engScr,mathScr,phyScr,chemScr;
double average;
Scanner stdio = new Scanner;
System.out.println("Enter your name pls"wink;
name = stdio.nextline();
System.out.println("Pls, enter your English test
score"wink;
engScr = stdio.nextdouble();

System.out.println("Pls, Math test Score"wink;
mathScr = stdio.nextdouble();

System.out.println("Pls, enter your Physics
score"wink;
phyScore = stdio.nextdouble();

System.out.println("Pls, Enter your Chemistry
score"wink;
chemScore = stdio.nextdouble();

average = (engScr + mathScr + phyScr chemScr)/4


System.out.println("Welcome" + name + "Your
average score is" + average);

Looking forward to corrections.



}
}

I think you know why your programme won't compile. Just curious do you have a compiler to test the code? It looks like it was written by hand without actually going through the compilation process. There are lots of bugs caused by syntax errors. Your logic is correct, but the code needs some minor corrections. Sorry, I'm a stern and tough grader.

1 Like

Re: Learning To Program With Java by the Fulaman by seunny4lif(m): 12:00am On Apr 12, 2016
satmaniac:

import java.util.Scanner

public class TestScores

{

public static void main(String[]args)

{
String name;
double engScr,mathScr,phyScr,chemScr;
double average;
Scanner stdio = new Scanner;
System.out.println("Enter your name pls" );
name = stdio.nextLine();
System.out.println("Pls, enter your English test
score" );
engScr = stdio.nextDouble();

System.out.println("Pls, Math test Score" );
mathScr = stdio.nextDouble();

System.out.println("Pls, enter your Physics
score" );
phyScore = stdio.nextDouble();

System.out.println("Pls, Enter your Chemistry
score" );
chemScore = stdio.nextDouble();

average = (engScr + mathScr + phyScr + chemScr)/4


System.out.println("Welcome " + name + " Your
average score is " + average);

Looking forward to corrections.



}
}
Re: Learning To Program With Java by the Fulaman by seunny4lif(m): 12:04am On Apr 12, 2016
smiley
You try but writing programming in hand
It's a none going area
import java.until.Scanner
satmaniac:

impport java.util.Scanner;

public class TestScores

{

public static void main(String[]args)

{
String name;
double engScr,mathScr,phyScr,chemScr;
double average;
Scanner stdio = new Scanner(System.in)
;
System.out.println("Enter your name pls"wink;
name = stdio.nextline();
System.out.println("Pls, enter your English test
score"wink;
engScr = stdio.nextdouble();

System.out.println("Pls, Math test Score"wink;
mathScr = stdio.nextdouble();

System.out.println("Pls, enter your Physics
score"wink;
phyScore = stdio.nextdouble();

System.out.println("Pls, Enter your Chemistry
score"wink;
chemScore = stdio.nextdouble();

average = (engScr + mathScr + phyScr chemScr)/4


System.out.println("Welcome" + name + "Your
average score is" + average);

Looking forward to corrections.



}
}
Re: Learning To Program With Java by the Fulaman by satmaniac(m): 12:34am On Apr 12, 2016
Fulaman198:


I think you know why your programme won't compile. Just curious do you have a compiler to test the code? It looks like it was written by hand without actually going through the compilation process. There are lots of bugs caused by syntax errors. Your logic is correct, but the code needs some minor corrections. Sorry, I'm a stern and tough grader.

It is true I was using my techno H5 with a partially broken screen, at that time. It is difficult to type out the characters on the screen, at times I need to turn the phone in order to change the screen orientation, so as to get to type some characters. My system is up now, I will compile after the correction, then I will report back here sir. Permission to fall out sir.

1 Like

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


It is true I was using my techno H5 with a partially broken screen, at that time. It is difficult to type out the characters on the screen, at times I need to turn the phone in order to change the screen orientation, so as to get to type some characters. My system is up now, I will compile after the correction, then I will report back here sir. Permission to fall out sir.

LOL sure no problem, you didn't do a bad job. You just made some syntactical errors that are easily addressed. As aforementioned, your logic is correct.
Re: Learning To Program With Java by the Fulaman by satmaniac(m): 1:00am On Apr 12, 2016
Fulaman198:


LOL sure no problem, you didn't do a bad job. You just made some syntactical errors that are easily addressed. As aforementioned, your logic is correct.


Yeah I have seen them and corrected all and the program compile fine. For the sake of forgetfulness, I will mark all the areas the errors are found in my code, so that I will be able to familiarise myself with such errors. Thank you for encouraging me.

1 Like

Re: Learning To Program With Java by the Fulaman by satmaniac(m): 1:52am On Apr 12, 2016
seunny4lif:
smiley
You try but writing programming in hand
It's a none going area
import java.until.Scanner


Now I know better, Thanks at seun4lif.
Re: Learning To Program With Java by the Fulaman by satmaniac(m): 1:57am On Apr 12, 2016
I can not quantify the happiness that swell in my heart right now. Finally, I am in luv, I never knew what it means to be in luv, until I met.... JAVA. Thanks for coming into my life JAVA. I will forever love you, oh my dear JAVA.

1 Like

Re: Learning To Program With Java by the Fulaman by Fulaman198(m): 1:58am On Apr 12, 2016
satmaniac:
I can not quantify the happiness that swell in my heart right now. Finally, I am in luv, I never knew what it means to be in luv, until I met.... JAVA. Thanks for coming into my life JAVA. I will forever love you, oh my dear JAVA.

Is this your first time programming in Java? Just asking before I go to sleep.
Re: Learning To Program With Java by the Fulaman by satmaniac(m): 2:06am On Apr 12, 2016
Fulaman198:


Is this your first time programming in Java? Just asking before I go to sleep.
Re: Learning To Program With Java by the Fulaman by satmaniac(m): 2:08am On Apr 12, 2016
satmaniac:


I got some books on JAVA last three weeks and I have been reading about JAVA as well as practicing it. I once take my problem to larisoft's thread where he talked about how to hire a good programmer. So, yes this is my first time programming. Why do you ask?
Re: Learning To Program With Java by the Fulaman by Fulaman198(m): 2:11am On Apr 12, 2016
I asked because I realised a flaw in my teaching today, since I was in such a hurry to put up some content (I should say yesterday really). I never mentioned Scanner methods nextDouble(), next(), etc. etc. just mentioned nextInt and nextLine. I'll pay closer attention to the next tutorial I put up. Thanks!

1 Like

Re: Learning To Program With Java by the Fulaman by Nobody: 4:33am On Apr 12, 2016
Fulaman198:
I asked because I realised a flaw in my teaching today, since I was in such a hurry to put up some content (I should say yesterday really). I never mentioned Scanner methods nextDouble(), next(), etc. etc. just mentioned nextInt and nextLine. I'll pay closer attention to the next tutorial I put up. Thanks!
Apologies for my rudeness, Bro. Nice thread btw. Really sorry.
Re: Learning To Program With Java by the Fulaman by seunny4lif(m): 7:52am On Apr 12, 2016
grin
You are welcome
Meself na beginner I be grin
satmaniac:



Now I know better, Thanks at seun4lif.
Re: Learning To Program With Java by the Fulaman by satmaniac(m): 8:44am On Apr 12, 2016
seunny4lif:
grin You are welcome Meself na beginner I be grin
I know but you don epp na.
Re: Learning To Program With Java by the Fulaman by seunny4lif(m): 8:45am On Apr 12, 2016
grin grin
I dey battle OOP now
satmaniac:


I know but you don epp na.
Re: Learning To Program With Java by the Fulaman by satmaniac(m): 8:48am On Apr 12, 2016
seunny4lif:
grin grin I dey battle OOP now
I know you will defeat OOP.
Re: Learning To Program With Java by the Fulaman by seunny4lif(m): 8:49am On Apr 12, 2016
grin
Amen but dat thing dey confusing grin grin
satmaniac:


I know you will defeat OOP.
Re: Learning To Program With Java by the Fulaman by satmaniac(m): 9:00am On Apr 12, 2016
seunny4lif:
grin
Amen but dat thing dey confusing grin grin

Not with the way oga fulaman198 is putting us through. Have faith and remember that you could be able to spot the error in my code and it means you are learning well.
Re: Learning To Program With Java by the Fulaman by seunny4lif(m): 9:15am On Apr 12, 2016
grin grin
Ok o Oooh
Make I wait still he reach OOP then grin
satmaniac:


Not with the way oga fulaman198 is putting us through. Have faith and remember that you could be able to spot the error in my code and it means you are learning well.
Re: Learning To Program With Java by the Fulaman by asalimpo(m): 1:01pm On Apr 12, 2016
gosh.. see how happy these students are ..
Bubbling with joy to learn..
What is the op feeding them? weed and coffee? java beans and cannabis?
wink

1 Like

Re: Learning To Program With Java by the Fulaman by seunny4lif(m): 2:39pm On Apr 12, 2016
grin
Java with weeds grin
asalimpo:
gosh.. see how happy these students are ..
Bubbling with joy to learn..
What is the op feeding them? weed and coffee? java beans and cannabis?
wink
Re: Learning To Program With Java by the Fulaman by satmaniac(m): 3:08pm On Apr 12, 2016
asalimpo:
gosh.. see how happy these students are ..
Bubbling with joy to learn..
What is the op feeding them? weed and coffee? java beans and cannabis?
wink

Hahahaha.......so you funny like dis? Ewa Java ati igbo Oshogbo.
Re: Learning To Program With Java by the Fulaman by Nobody: 6:39am On Apr 13, 2016
sonOfLucifer:

Hey, if you're interested in programming, you can check out onyenkuzi.com.

Ermm okay, your name sha na wa, do you know where I can learn basic hacking?
Re: Learning To Program With Java by the Fulaman by Nobody: 6:57am On Apr 13, 2016
Sugarhugs:


Ermm okay, your name sha na wa, do you know where I can learn basic hacking?
I can give you some guides. It's a long process. You should be familiar with programming and have a basic ide of how computer networks work.
Also, try to go through this: http://www.catb.org/esr/faqs/hacker-howto.html.. I started sometime last year, and I'm familiar with most web languages, along with Java(OCA), Python and C/C++. Preparing for Comptia/CCNA next month.

Interest matters a lot. And willingness to read widely.

@bold: a rose, by any other name, will still smell as sweet. grin tongue

@ogaFulaman : Last post. grin sorry for the intrusion.
Re: Learning To Program With Java by the Fulaman by Nobody: 8:02am On Apr 13, 2016
sonOfLucifer:

I can give you some guides. It's a long process. You should be familiar with programming and have a basic ide of how computer networks work.
Also, try to go through this: http://www.catb.org/esr/faqs/hacker-howto.html.. I started sometime last year, and I'm familiar with most web languages, along with Java(OCA), Python and C/C++. Preparing for Comptia/CCNA next month.

Interest matters a lot. And willingness to read widely.

@bold: a rose, by any other name, will still smell as sweet. grin tongue

@ogaFulaman : Last post. grin sorry for the intrusion.

Lol Okay o I checked ibiblo and it said page am looking for no longer available

1 Like

Re: Learning To Program With Java by the Fulaman by Nobody: 8:21am On Apr 13, 2016
Sugarhugs:


Lol Okay o I checked ibiblo and it said page am looking for no longer available
http://www.catb.org/esr/faqs/hacker-howto.html
Re: Learning To Program With Java by the Fulaman by Nobody: 8:34am On Apr 13, 2016
sonOfLucifer:

http://www.catb.org/esr/faqs/hacker-howto.html

Thanks, will start with learning programming then move on

2 Likes

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

Facebook Is Suing Me For This / The Top Highly Paid Programming Languages To Learn / Java Vs PHP: Which Has The Brightest Future?

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