Java tutorial for elementary school students
category: general [glöplog]
I'm typing this in caps lock, perhaps he will listen better.
ADOK. SERIOUSLY. PLEASE LISTEN WHAT YOU ARE BEING TOLD.
AS FAR AS I'M CONCERNED, I REALLY DON'T GIVE A SHIT WHAT KIND OF EUGENISTIC MASTURBATION FANTASIES OR IQ-BASED PEOPLE RANKING SYSTEMS OR WHATEVER YOU SPEND YOUR TIME THINKING ABOUT BUT LEAVE KIDS ALONE. NO MATTER HOW, YOU'RE WAY TOO FUCKING STUPID, IGNORANT, ARROGANT AND GENERALLY CLUELESS TO HAVE ANYTHING TO DO WITH CHILDREN, AND YOU WILL TRAUMATIZE THEM FOR LIFE.
ADOK. SERIOUSLY. PLEASE LISTEN WHAT YOU ARE BEING TOLD.
AS FAR AS I'M CONCERNED, I REALLY DON'T GIVE A SHIT WHAT KIND OF EUGENISTIC MASTURBATION FANTASIES OR IQ-BASED PEOPLE RANKING SYSTEMS OR WHATEVER YOU SPEND YOUR TIME THINKING ABOUT BUT LEAVE KIDS ALONE. NO MATTER HOW, YOU'RE WAY TOO FUCKING STUPID, IGNORANT, ARROGANT AND GENERALLY CLUELESS TO HAVE ANYTHING TO DO WITH CHILDREN, AND YOU WILL TRAUMATIZE THEM FOR LIFE.
WELL SAID.
ADOK STICK TO YOUR OWN KIDS (READ: EP AND MAGIC)
ADOK STICK TO YOUR OWN KIDS (READ: EP AND MAGIC)
My first example for loops is:
Code:
I've explained: "We count from 1 to 10. The variable 'number' is first set to 1, and then in a 'while' loop it's increased by 1 each time the loop is executed, as long as it is less than or equal to 10. As soon as the number is greater than 10, the loop is stopped."import java.io.*;
public class Counter {
public static void main(String[] args)
{
float number = 1;
while (number <= 10){
System.out.println(number);
number = number + 1;
}
}
}
With a loop you can also compute the factorial of a number. Factorial is a mathematical function which assigns the product of all integer numbers less than or equal to this number to an integer number. An integer number is a number greater than or equal to zero without digits behind the comma.
Examples: The factorial of 3 is 1*2*3 = 6. The factorial of 5 is 1*2*3*4*5 = 120. In this way the factorials of other numbers can be computed.
Beneath is a program which computes the factorial of a number you enter by means of a loop.
Examples: The factorial of 3 is 1*2*3 = 6. The factorial of 5 is 1*2*3*4*5 = 120. In this way the factorials of other numbers can be computed.
Beneath is a program which computes the factorial of a number you enter by means of a loop.
Code:
public class Factorial {
public static void main(String[] args)
{
int result = 1;
int number= 1;
int counter;
String inputString = "";
System.out.println("Enter an integer number whose factorial shall be computed!");
InputStreamReader input = new InputStreamReader(System.in);
BufferedReader reader = new BufferedReader(input);
try
{
inputString = reader.readLine();
number = Integer.parseInt(inputString);
}
catch(Exception e)
{
System.out.print("The input is illegal. ");
System.out.print(inputString);
System.out.print(" isn't an integer number.");
return;
}
for (counter = 1; counter <= number; counter = counter + 1)
{
result = result * counter;
}
System.out.print("The factorial of ");
System.out.print(number);
System.out.print(" is: ");
System.out.println(result);
}
}
thats just stupid. the text should (if any) be something like:
"In this example we construct a program that prints numbers from 0 to 9. The printing is done by calling print(i). Try changing LOOP_UNTIL to a different number to see what happens! Can you make it print 1 to 10?"
Code:
import java.io.*;
public class Counter {
public static void print( float number )
{
System.out.println(number);
}
public static void main(String[] args)
{
float number = 0;
float LOOP_UNTIL = 10;
while (number < LOOP_UNTIL){
number = number + 1;
}
}
}
"In this example we construct a program that prints numbers from 0 to 9. The printing is done by calling print(i). Try changing LOOP_UNTIL to a different number to see what happens! Can you make it print 1 to 10?"
You forgot to call print inside the loop!
Quote:
With a loop you can also compute the factorial of a number. Factorial is a mathematical function which assigns the product of all integer numbers less than or equal to this number to an integer number. An integer number is a number greater than or equal to zero without digits behind the comma.
HORRIBLE text. Students at universities HATES texts like that, and you think children will like to read this? MORON.
Explain WHAT needs to be done, then suggest HOW. No "background" for kids! Then hint them to make changes, they will learn without you telling them whats an integer!
Adok; obviously i am not mensah approved.
buffered reader, parseint, exception omg.
Adok: BASIC, BASIC, BASIC, BASIC, PYTHON, BASIC, PYTHON, BASIC, BASIC, BASIC, BASIC !!!
Adok: BASIC, BASIC, BASIC, BASIC, PYTHON, BASIC, PYTHON, BASIC, BASIC, BASIC, BASIC !!!
Oh and showing exceptions for kids? EXCELLENT SUGGESTION!
Seriously, if you where to teach java to kids, do not let them see whats really going on!! Make a "main.java" for them, write the program in "ourprogram.java" that has one method: run() if it crashes, main.java takes care about it (here you have to be smart, catch prety much anything and format it well).
Seriously, if you where to teach java to kids, do not let them see whats really going on!! Make a "main.java" for them, write the program in "ourprogram.java" that has one method: run() if it crashes, main.java takes care about it (here you have to be smart, catch prety much anything and format it well).
Iam sorry if i offend you now Adok, i normally do not wish to visit such private territory, esp not at pouet. But let's be frank, by the way you are behaving (always) and how you behave here we can prety much come to the conclusion you are an aspberger. You are writing this article so strict that MAYBE an aspberger would read it and find it "funny". If this is your goal, fine. It can work. For a "normal" kid (intelligent or not) this kind of texts will never work. Ask a school teacher IRL and see if she thinks a kid can grasp it. If not even she grasps it, theres not a chance the kids will do.
Adok: out of curiousity (I didnt bother reading the rest of the thread), what age group you're targeting again?
(b) came from a friend cald berger. it tend to slip into this word by some reason. oh kids can be so crude!
Quote:
Ask a school teacher IRL and see if she thinks a kid can grasp it. If not even she grasps it, theres not a chance the kids will do.
stefan: which century do you live in?
nutman: we are talking about learning from scratch here. if the teachers cant grasp the texts youre out of luck. this is, if he/she tries to.
slashdot had a few threads on teaching programming for elementary school kids and guess what their conclusions were: basic.
let me translate the discussion into Pouet language, maybe Adok can comprehend it that way.
JAVA + LITTLE CHILDREN = CANCER!
ADOK + LITTLE CHILDREN = EVEN BIGGER CANCER!!
JAVA + LITTLE CHILDREN = CANCER!
ADOK + LITTLE CHILDREN = EVEN BIGGER CANCER!!
Quote:
maybe Adok can comprehend
does not compute.
Preacher, chill a bit man. You're not that young anymore, and we need more cool demos before you have a stroke. :)
<forest gump mode>
Adok is trolling... again.
And people are buying it... again.
</forest gump mode>
I mean, first Hugi News, then Java Tutorial For Kiddies ?! Coincidence ? I think NOT ! :D
Considering what happened in the past, I'm wondering what he's gonna come up with next... Don't you all understand ? It's like a show ! Just sit down and enjoy. It's gonna be fun. No, really ! :D
*grab a box filled with popcorn*
Go on, Adok, roll the opening credits.
*chomp* *chomp*
<forest gump mode>
Adok is trolling... again.
And people are buying it... again.
</forest gump mode>
I mean, first Hugi News, then Java Tutorial For Kiddies ?! Coincidence ? I think NOT ! :D
Considering what happened in the past, I'm wondering what he's gonna come up with next... Don't you all understand ? It's like a show ! Just sit down and enjoy. It's gonna be fun. No, really ! :D
*grab a box filled with popcorn*
Go on, Adok, roll the opening credits.
*chomp* *chomp*
your definition of fun frightens me
wow, that's so awesome preacher. we need a random rebus thread. (but i don't dare creating one :-( anyone who does? pretty please?)
Gargaj: elementary school kids.
stefan: "Horrible text". OK, I'll try to loosen it up a bit, but nevertheless I want to explain factorials.
anes: "BASIC, BASIC, BASIC". That's okay, I've already written a tutorial for Basic (as well as Assembler and C). The disadvantage of Basic is that it's not included in Windows XP/Vista and downloading QBasic or Quick Basic from the Internet would be possible but illegal. I'll search for a free Basic interpreter/compiler.
stefan: "Horrible text". OK, I'll try to loosen it up a bit, but nevertheless I want to explain factorials.
anes: "BASIC, BASIC, BASIC". That's okay, I've already written a tutorial for Basic (as well as Assembler and C). The disadvantage of Basic is that it's not included in Windows XP/Vista and downloading QBasic or Quick Basic from the Internet would be possible but illegal. I'll search for a free Basic interpreter/compiler.
hihihi
preacher's equation said odd
world domination!
hihihi
preacher's equation said odd
world domination!
hihihi
I've downloaded thinBasic. It's free. Unfortunately it doesn't have an IDE. An IDE would be important. It's especially useful if it has automatic syntax checking.