GRADE 11

JAVA MATERIAL FOR GRADE 11 STUDENTS

Gr11 12 – Data Validation

Data Validation Overview. V1 Validation first, followed by verification. Validation – does the data match the template? Example: The date template could be “yyyy-MM-dd” Verification – the data does match the template but is it valid? Example: “2026-14-13” matches the...

read more

Gr11 12 – SQL database

It is easy to think that a database has some sort of logic, intelligence and self-awareness. It is does not. A database is like a suitcase of clothes. Some items "go with" other items but the clothes themselves do not understand their relationship with one another....

read more

Gr 11 12 Not !

In Java "not" is a bit awkward when used with a String method like "equals" if (name.equals("steve") {    } is easy to understand. If the name equals "steve" then execute the code block that follows. What about if the name does not equal steve? if ( !...

read more

Gr 11 – Switch Case

Complex "if-then-else" statements are needed when there are many options e.g. consider all the options in a menu. Fortunately, there is a better way when a lot of options are needed i.e. the "Switch-Case-Break" construct. It works exactly the same as "if-else" but its...

read more