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 filter: about 1 tablespoon per 5 to 6 fluid ounces of cold water for regular coffee, and 2 tablespoons per 5 to 6 fluid ounces for strong coffee.
Agenda ● Programming team goals ● Java programming overview ● Data types ● Variables ● Statements ● Loops ● Classes
Goals of the programming department ● Improve efficiency ● Always be thinking of ideas ● Teamwork
Planning coding ● Identify objectives ● Break projects into smaller pieces ● Variables and Structures ● Time management
Good Programming Habits ● Use proper syntax ● Keep similar programming styles ● Make things easier to manage ● Don’t trip on wires ● Stick to your deadlines
What is Java? Java is an object orientated programming language that was designed for the distributed environment of the internet.
Java Programming Platforms ● Eclipse ○ Used for day to day coding. ○ Very versatile. ○ Industry standard. ● Android Studio ○ Used for the programming of apps. ○ Used by Prior Lake Robotics FTC teams. ● Netbeans ○ 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 ← Class ← Main Method Prints “Hello World” to the console.
Comments ← Single Line ← Multi-line
Variables declaring initializing
Primitive data types int - an integer or whole Primitive data is data type number provided by your program as 12 , 2169 , 1234 simple building blocks. 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
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 Strings Boolean expression is a ints , doubles , statement that compares all booleans , and chars data typed and returns a true or false. Ex. if(3 > 2) it will return 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… ● An initialized value ● An increment ● And a stopping value
Increments and Decrements Increase Decrease by 1 by 1
Loops - for Output to Console
Loops - do Output to Console
Loops - While Output to Console
Scanner Class ← Import ← imports! Declares the class ‘Scanner’ ← Strings
Scanner Class Output to Console
Math Class |a| a^b a^(1/2)
Math Class
Methods 1 3 ← Method
Methods
Questions?
Thanks For Attending! All presentations will be available soon on www.kingtec2169.com
Recommend
More recommend