All tutorials are implemented in text (here), and also with exercises and multimedia in the Tutorial Player. The main home page has a search engines, and more facilities.
ifBrackets are used and operators:
if (thisBalance > 20000) {
goodCustomer = true;
} else {
goodCustomer = false;
}
The tenary operator can also be used,
condition ? trueResult actions :falseResult actions
For example
goodCustomer ? customerMarketing.offerCustomer(thisCustomer) : customerMarketing.freezeCustomer(thisCustomer);
The class Marketing has methods offerCustomer and freezeCustomer implemented. These would offer a good customer more products, and for a bad one, offers would be frozen.
The switch statement simplifies a complicated if statement:
switch (customerOption) {
case '1':
Stocks.buy(thisCustomer);
break;
case '2':
Stocks.sell(thisCustomer);
break;
}