</tr>
Vocab Definition
software engineer a person who designs, develops, and tests software for home, school, and business use
class header consists of the class keyword and the name of the class
integrated development environment (IDE) a software application for writing, compiling, testing, and debugging program code
software a collection of instructions that is run by a computer
source code a collection of programming commands
syntax the rules for how a programmer must write code for a computer to understand
syntax error a mistake in the code that does not follow a programming language's syntax
(super) keyword/td> a keyword used to refer to the superclass
constructor signature the first line of the constructor which includes the (public) keyword, the constructor name, and the values to specify when an object is created
inheritance an object-oriented programming principle where a subclass inherits the attributes and behaviors of a superclass
subclass a class that extends a superclass and inherits its attributes and behaviors
superclass a class that can be extended to create subclasses
method signature consists of a name and parameter list
code review the process of examining code and providing feedback to improve the quality and functionality of the program
comment a text note that is ignored by the compiler to explain or annotate the code
documentation written descriptions of the purpose and functionality of code
programming style a set of guidelines for formatting program code
(while) loop a control structure which executes a block of code repeatedly as long as a condition is true
algorithm a set of instructions to solve a problem or accomplish a task
control structure a conditional or iteration statement which affects the flow of a program
efficient getting the best outcome with the least amount of waste
infinite loop a loop where the Boolean expression always evaluates to true
iteration statement (loop) a control structure that repeatedly executes a block of code
pseudocode a plain language description of the steps in an algorithm
NOT ( ! ) operator a logical operator that returns true when the operand is false and returns false when the operand is true
if-else statement (two-way selection statement) specifies a block of code to execute when the condition is true and a block of code to execute when the condition is false
logical operator an operator that returns a Boolean value
concatenation joining two strings together
Method Decomposition the process of breaking a problem down into smaller parts to write methods for each part
edge case a bug that occurs at the highest or lowest end of a range of possible values or in extreme situations
redundant code code that is unnecessary
inheritance hierarchy where a class serves as a superclass for more than one subclass
open source code code that is freely available for anyone to use, study, change, and distribute
--------------------------------------------------- ------------------------------------------------------------------------------------
Plans Week 14 Assign Vocabulary
--------------------------------------------------- ------------------------------------------------------------------------------------
Casting, specifically for Division 1 / 3 - return 0 - (if you are doing division with integers that you want an integer result and it will truncate and throw away the part after the decimal point.)
1.0 / 3 - return 0.33333333333333 - (if you use a mixture of integers (int) and decimal (double) numbers Java will assume that you want a double result.)

Values of type double can be rounded to the nearest integer by adding or subtracting .5 and casting with (int) using formulas like the following.
int nearestInt = (int)(number + 0.5);
int nearestNegInt = (int)(negNumber – 0.5);
Casting, specifically for Truncating or Rounding Rounding a number in the range [2.5, 3.5) returns the number 3
Truncating a number in the range [3.0, 4.0) returns the number 3

Truncating 3.3 returns 3
Truncating 3.8 returns 3
java code truncating ex:
truncated = Math.round(nontruncated - 0.5f);

Rounding 3.465 to two decimal places returns 3.47
Rounding 3.464 to two decimal places returns 3.46
java code rounding ex:
roundedToTwoDecimals = Math.round(unrounded*100)/100f;
Work Link
Definition Resource Link
Wrapper Classes, why wrap int, double. Show examples Wrapper classes provide a way to use primitive data types (int, boolean, etc..) as objects.
Sometimes you must use wrapper classes, for example when working with Collection objects, such as ArrayList, where primitive types cannot be used (the list can only store objects)
Ex:
ArrayList myNumbers = new ArrayList(); // Valid
Work Link
Definition Resource Link</td> </tr>
Concatenation, explain or illustrate rules on mixed type Concatenation Concatenation - the operation of joining two strings together.
You can join strings using either the addition (+) operator or the String’s concat() method.
Ex:
System.out.println("pan" + "handle");

Mixed type Concatenation
Ex:
int age = 12;
System.out.println("My age is " + age);
Work Link
Definition Resource Link
Math class, specifically Random usage The java.lang.Math.random() method returns a pseudorandom double type number greater than or equal to 0.0 and less than 1.0.
Ex.
double rand = Math.random();

output: 0.0~1.0

random.nextInt(num) - gives a random number inside range 0 to num

Work Link
Definition Resource Link
Compound Boolean Expression If two boolean values/expressions are combined with a logical and (&&) and the first expression is false, then the second expression won't be executed
The logical AND (&&) (logical conjunction) operator for a set of boolean operands will be true if and only if all the operands are true. Otherwise it will be false.

Work Link
Definition Resource Link
Truth Tables A truth table has one column for each variable, one row for each possible combination of variable values, and a column that specifies the value of the function for that combination.

A truth table is a breakdown of a logic function by listing all possible values the function can attain.

Definition Resource Link
De Morgan’s Law De Morgan's Law show how the NOT operator (!) can be distributed when it exists outside a set of patenthesis.
Ex:
!(A && B) is the same as !A || !B
!(A || B) is the same as !A && !B
!(C > D) is the same as C <= D
!(C < D) is the same as C >= D
!(C >= D) is the same as C < D
!(C <= D) is the same as C > D
!(E == F) is the same as E != F
!(E != F) is the same as E == F
!(A && B && C) is the same as !A||!B||!C

Work Link
Definition Resource Link
Comparing Numbers A Double is NEVER equals to an Integer. Moreover, a double is not the same as a Double.
To compare two Numbers in Java you can use the compareTo method from BigDecimal.
EX:
public int compareTo(Number n1, Number n2) {
// ignoring null handling
BigDecimal b1 = new BigDecimal(n1.doubleValue());
BigDecimal b2 = new BigDecimal(n2.doubleValue());
return b1.compareTo(b2);
}

Or use if statement:
if(num1 > num2){
System.out.println(num1 + " is greater than " + num2);
}

Definition Resource Link
Comparing Strings There are three ways to compare String in Java:
By Using equals() Method
By Using == Operator
By compareTo() Method

Work Link
Definition Resource Link
Comparing Objects Java provides the two methods of the Object class to compare the objects are as follows:

Java equals() Method
Java hashCode() Method

Work Link
Definition Resource Link
for loop, enhanced for loop Java for-loop is a control flow statement that iterates a part of the program multiple times. For-loop is the most commonly used loop in java.

If we know the number of iteration in advance then for-loop is the best choice.

This for-loop was introduced in java version 1.5 and it is also a control flow statement that iterates a part of the program multiple times.
This for-loop provides another way for traversing the array or collections and hence it is mainly used for traversing array or collections.
This loop also makes the code more readable and reduces the chance of bugs in the code.

Definition Resource Link
while loop versus do while loop A while loop is a control flow statement that allows code to be executed repeatedly based on a given Boolean condition.
The while loop can be thought of as a repeating if statement.

do while loop is similar to while loop with the only difference that it checks for the condition after executing the statements,
and therefore is an example of Exit Control Loop.

ex:
do
{
statements..
}
while (condition);

Definition Resource Link
nested loops If a loop exists inside the body of another loop, it's called a nested loop.

Work Link
Definition Resource Link
Creating a Class, describe Naming Conventions It should start with the uppercase letter.
It should be a noun such as Color, Button, System, Thread, etc.
Use appropriate words, instead of acronyms.

Definition Resource Link
Constructor, describe why there is no return Work Link
Definition Resource Link
Accessor methods, relationship to getter Work Link
Definition Resource Link
Mutator methods, relationship to setter, describe void return type Work Link
Definition Resource Link
Static variables, Class variables, show use case in code Work Link
Definition Resource Link
Show use case of access modifiers: Public, Private, Protected Work Link
Definition Resource Link
Static methods, Class methods Work Link
Definition Resource Link
this Keyword Work Link
Definition Resource Link
main method, tester methods Work Link
Definition Resource Link
Inheritance, extends Work Link
Definition Resource Link
Subclass constructor, super Keyword Work Link
Definition Resource Link
Overloading a method, same name different parameters Work Link
Definition Resource Link
Overriding a method, same signature of a method Work Link
Definition Resource Link
Abstract Class, Abstract Method Work Link
Definition Resource Link
Standard methods: toString(), equals(), hashCode() Work Link
Definition Resource Link
Late binding of object, referencing superclass object, ie Animal a = new Chicken(); Animal b = new Goat(); Work Link
Definition Resource Link
Polymorphism: any of overloading, overriding, late binding Work Link
Definition Resource Link
Big O notation for Hash map, Binary Search, Single loop, Nested Loop Work Link
Definition Resource Link