KING TeC
Avery Swank and Matthew Zwinger
KING TeC Java : The Basics Avery Swank and Matthew Zwinger How To - - PowerPoint PPT Presentation
KING TeC Java : The Basics Avery Swank and Matthew Zwinger How To Brew Fresh Java For Tired Team Members Pour the water in the reservoir and put the carafe on the heating plate. Measure Your Grounds: Add the desired amount of grounds to the
Avery Swank and Matthew Zwinger
How To Brew Fresh Java For Tired Team Members
Pour the water in the reservoir and put the carafe on the heating plate. Measure Your Grounds: Add the desired amount of grounds to the filter: about 1 tablespoon per 5 to 6 fluid
tablespoons per 5 to 6 fluid ounces for strong coffee.
Agenda
Goals of the programming department
Planning coding
Good Programming Habits
What is Java?
Java is an object orientated programming language that was designed for the distributed environment of the internet.
Java Programming Platforms
○ Used for day to day coding. ○ Very versatile. ○ Industry standard.
○ Used for the programming of apps. ○ Used by Prior Lake Robotics FTC teams.
○ For developing desktop, mobile, and web applications. ○ Uses Java, Javascript, HTML5, PHP, C/C++, and more.
Classes
A class is a collection of related properties and behaviors, A class contains fields and methods (We will talk about these later) to describe the behavior of an object
Basic Layout - Hello World
Prints “Hello World” to the console. ← Class ← Main Method
Comments
← Single Line ← Multi-line
Variables
declaring initializing
Primitive data types
int - an integer or whole number 12 , 2169 , 1234 double - a decimal 2.22 , .25 , 1.1 boolean true or false char or character - holds a single letter or integers ‘A’ , ‘b’ , 2 , 45
Primitive data is data type provided by your program as simple building blocks.
Non-Primitive data types
Non-primitive data types are not defined by the programming language
Concatenation
To attach strings and variables together with the plus symbol
Boolean Expressions
ints , doubles , booleans , and chars Strings Boolean expression is a statement that compares all data typed and returns a true
If and If-else statements
← boolean expression
If and If-else statements
Output to Console
Else-if ladder
Output to Console
Switch-cases
Output to Console
Loops
All loops in java require three things…
Increments and Decrements
Increase by 1 Decrease by 1
Loops - for
Output to Console
Loops - do
Output to Console
Loops - While
Output to Console
Scanner Class
← Import
Declares the class ‘Scanner’
← Strings
← imports!
Scanner Class
Output to Console
Math Class
|a| a^b a^(1/2)
Math Class
Methods
← Method 1 3
Methods
Thanks For Attending! All presentations will be available soon on www.kingtec2169.com