Gr All – Generate random

Being able in Java to generate a random number, from an arbitrary number, to another arbitrary number (from lower bound to upper bound). Note that the lower bound and upper bound is included. Example: If the lower bound is 2 and upper bound is 15, the code below will...

Gr 10,11,12 – Pause

There are times when we wish our Java code would run a lot slower e.g. when we want to count down from 10 to 0 with 1-second intervals. Here we can use “Thread.sleep(milliseconds)” see line 22 below. Note that the sleep period is not precise as your...

Gr 10 – Java Core

Java Core concepts – Java 101 Java for grade 10 learners from January to mid-year exams. Below are four PowerPoint presentations/shows covering all Java core concepts. Download them and use them with the “Java by Example” textbook pages 1 to page 28....

Gr 10 – Input Processing Output

A simple one-class, one-method calculator program that demonstrates INPUT, PROCESSING, and OUTPUT. Keep these sections separate even when working with larger and more complex programs. Also, keep your prompts and messages useful and user-friendly. Employ good layout...

Gr 10 – Intro to Java. Gogga

Assumption: You are going to use the IDE called jGRASP. To create a Gogga project you need to download the Gogga library published by Funworks. Funworks provides IT text books for grade 10, 11 and 12, both theory and Java. Click here to download the libary. The...