Conventions
In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Each chapter of this book will also include a case study, or similar code example, that will be broken down and detailed to explain how the data structure is applied. As such, this book is full of code examples.
A block of code is set as follows:
public boolean isEmpty() { Â Â Â return this._commandStack.empty(); }
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
func canAddUser(user: EDSUser) -> Bool
{
if (_users.contains(user))
{
return false;
} else {
return true;Â
}
New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "The first validation method, isFull()
, checks if our stack has reached its capacity."
We will also discuss algorithms and mathematical concepts related to algorithms in this text. Whenever operational cost values written in Big-O notation are shown they appear as follows: "This is small consolation, however, because the selection sort algorithm still has an O(n2) complexity cost."
Likewise, when mathematical formulas and algorithms are used, they will appear as follows: "Our algorithm will find the smallest value in S[0...4]
, which in this case is 3, and place it at the beginning of S[0...4]
."
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.