Computer and proramming
Before we talk about programming, let's talk about computer
Develop a program
Install the IDE
Develop a program
Install the IDE
Netbeans 11.3 for Windows
https://archive.apache.org/dist/netbeans/netbeans/11.3/Apache-NetBeans-11.3-bin-windows-x64.exe
Netbeans 11.3 for Mac
https://archive.apache.org/dist/netbeans/netbeans/11.3/Apache-NetBeans-11.3-bin-macosx.dmg
(Demos of this course are based on the Windows version of the Netbeans)
Hello World! Your first program
Create our first Java program
Hellow World! code explained line by line
Hellow World! code explained line by line
Input/Output
Print text to standard output
Print exercise
Getting information from standard input
Hello World! to John Doe
Print exercise
Getting information from standard input
Hello World! to John Doe
Variables
A little bit about Objects
Variables and data types
Identifiers
Declare variables and assign their values
Variable assignment excercise
Compound assignments
Compound assignment excercise
Comments - Messages to developers like you
Naming Conventions - Guidlines for giving your stuffs good names
Write a program to swap the values of two numbers
Write a fahrenheit to celsius converter
Variables and data types
Identifiers
Declare variables and assign their values
Variable assignment excercise
Compound assignments
Compound assignment excercise
Comments - Messages to developers like you
Naming Conventions - Guidlines for giving your stuffs good names
Write a program to swap the values of two numbers
Write a fahrenheit to celsius converter
Basic Math
Let's do some elementary school math (With Java!)
Java's math library
Math library excercise
Java's math library
Math library excercise
Make Decisions
Three types of control statements
The Boolean data type - true or false?
Boolean value excercicise
if, single selection statement
Is John Doe an adult?
Three types of selection statements
if...else.., double selection statement
Is John Doe an adult or a child?
Did you pass the exam?
Ternary operator
Write a program to determine if a number is an even or odd number
Nested if...else... statement
What is your grade? (Nested if...else... statement version)
if...else if... statement
What is your grade? (if...else if... statement version)
How much tax should you pay?
switch, multiple selection statement
If the first day of week is Sunday, how about the 2nd, the 3rd day and so on?
Logical operators
Find the biggest number among 3 numbers
Create a simple calculator
The Boolean data type - true or false?
Boolean value excercicise
if, single selection statement
Is John Doe an adult?
Three types of selection statements
if...else.., double selection statement
Is John Doe an adult or a child?
Did you pass the exam?
Ternary operator
Write a program to determine if a number is an even or odd number
Nested if...else... statement
What is your grade? (Nested if...else... statement version)
if...else if... statement
What is your grade? (if...else if... statement version)
How much tax should you pay?
switch, multiple selection statement
If the first day of week is Sunday, how about the 2nd, the 3rd day and so on?
Logical operators
]
Find the biggest number among 3 numbers
Create a simple calculator
Run the loop
Repetition Statements
Counter controled loop and the unary operator
Unary operator excercise
Prefix and postfix unary operator
Write a program to calculate the factorial of a given number
Write a program to check if a given number is a prime number
Write a program to generate fabonacci series of a given number
Loop header elements are optional
Omit loop header excercise
While loop, the typical condition controled loop
Write a program to count the number of digits
Write a program to reverse a given number
do...while.. loop excercise
Calculate average score at run time
Counter controled loop and the unary operator
Unary operator excercise
Prefix and postfix unary operator
Write a program to calculate the factorial of a given number
Write a program to check if a given number is a prime number
Write a program to generate fabonacci series of a given number
Loop header elements are optional
Omit loop header excercise
While loop, the typical condition controled loop
Write a program to count the number of digits
Write a program to reverse a given number
do...while.. loop excercise
Calculate average score at run time
Object Oriented Programming (A)
In Java, everything is an object
Data fields are an object's attributes, Methods are what an object can do
Method header and method body
Construct an object
The new and dot operators
Access modifiers
Data encapsulation
Write a program to model a circle
The Instance of a class
this reference - a reference to itself
Default values of the data fields
The Bank Account Simulator Project (1)
Data fields are an object's attributes, Methods are what an object can do
Method header and method body
Construct an object
The new and dot operators
Access modifiers
Data encapsulation
Write a program to model a circle
The Instance of a class
this reference - a reference to itself
Default values of the data fields
The Bank Account Simulator Project (1)
Strings
Introduction to text strings
Basic string methods
String is imutable
Write a program to convert a String to snake case
String methods
The string builder
Create an expression calculator
Basic string methods
String is imutable
Write a program to convert a String to snake case
String methods
The string builder
Create an expression calculator
Arrays
Introduction to arrays
Declare and initialize an array
Declare and initialize array excercise
Array initializer excercise
Analize array's default values
Looping through array elements
Write a program to sum array elements
Write a program to reverse an array
Enhanced for loop
Enhanced for loop excercise
Arrays class
Arrays class excercise
Passing an array as a parameter
Write a program to simulate rolling dice and analyze probability
Write a program to generate fortune cookie tickets
Linear search
Binary search
Array List
Array List Excercise
Declare and initialize an array
Declare and initialize array excercise
Array initializer excercise
Analize array's default values
Looping through array elements
Write a program to sum array elements
Write a program to reverse an array
Enhanced for loop
Enhanced for loop excercise
Arrays class
Arrays class excercise
Passing an array as a parameter
Write a program to simulate rolling dice and analyze probability
Write a program to generate fortune cookie tickets
Linear search
Binary search
Array List
Array List Excercise
Object Oriented Programming (B)
Assign an object to a variable
Garbage collection
Calling a method
Local Variables
Passing parameters to a method
Pass array or array element?
Exception Handling
Write a program to count the number of digits (with Exception Handling)
The Bank Account Simulator Project (2)
Static variables
Instance method vs. static method
Alien Fighters
Scope of variables
The Bank Account Simulator Project (3)
Garbage collection
Calling a method
Local Variables
Passing parameters to a method
Pass array or array element?
Exception Handling
Write a program to count the number of digits (with Exception Handling)
The Bank Account Simulator Project (2)
Static variables
Instance method vs. static method
Alien Fighters
Scope of variables
The Bank Account Simulator Project (3)