SlideShare une entreprise Scribd logo
1  sur  17
Welcome To  Problem Solving Problem Solving with OOP and JAVA with OOP and JAVA
Meet Your Instructor That’s me
Meet Your TA Alisha IDC3931 © PIC
Who Should Drink JAVA? Have you done some programming? Do you want to learn Java? Do you prefer stimulating dinner conversations over coffee to dry, dull, technical lectures? Do you need this course to graduate? Muahahahahaha! IDC3931 © PIC
Who Drinks JAVA? IDC3931 © PIC
IDC3931 © PIC What Is A Computer? A computer is something that takes in information (input), processes it according to a set of instructions (program), and produces a result (output). Computers communicate through a binary alphabet. The letters in this alphabet are ‘0’ and ‘1’. Everything else is made out of these ‘letters’ which are called bits. Bits are represented in a computer by electrical signals: low voltage would mean a ‘0’ and higher voltage a ‘1’. Eight bits gathered together form one byte.
What Is JAVA? Java is a free, open-source, Object Oriented Programming (OOP) language – everything is contained inside classes and objects. Java is überportable – it can run on any machine with a Java Virtual Machine (JVM) installed.  No matter what computer you have, you can write the same Java programs. IDC3931 © PIC
How WEuse Java Source Code Virtual         Machines Java bytecode Compiler
How WEuse Java Virtual Machines Source Code Java bytecode Compiler IDC3931 © PIC
Code Structure in Java source code class file method 1 statement method 2 statement statement
What goes in the source file? A source file (with the .java extension) holds one class definition. The class represents a piece of your program, although a very tiny application might need just a single class. The class must go within a pair of public class Bicycle { } curly braces The source file MUST have the same name as the class. For example, the Bicycle class my be stored in the Bicycle.javafile. class A class is the blueprint from which individual objects are created. Think of a bicycle…
What goes in a class? A class has one or more methods.  In the Bicycle class, the pedal method will hold instructions for how the Bicycle should pedal. Your methods must be declared inside a class (in other words, within the  public class Bicycle{ 	void pedal( ) { 	} } curly braces of the class). method A bicycle might have some methods such as: speedup(), break(), gear(), direction()…
What goes in a method? Within the curly braces public class Dog { void bark ( ) { statement1; statement2; 	   statement3; 	} } public class Bicycle{ void pedal( ) { } } of a method, write your instructions for how that method should be performed. Method code is basically a set of statements, and for now you can think of a function or procedure.  statement1; statement2; statement3; What are you staring at? statements
One Blueprint Can Be Used To Help Build Different Objects Shape rotate ( ) playSound ( ) Circle Square Amoeba Triangle This is called inheritance
EVERYTHINGis made from OBJECTS Object equals() getClass() hashCode() toString() Shape rotate() playSound() Circle doSomething() This is the Object class from which ALL other objects are created.
What You Will Get Out Of Learning and Using JAVA! A thorough understanding of Object Oriented Programming. Learn a language that can be run on any platform. Build your programming skills and confidence. Learn how to work and program in groups. Develop Graphical User Interfaces. If you can make it through the day without programming, you haven’t triedJAVA!
Where To Start Setup Eclipse Classic 3.6 Write your first Java program Bring your laptops to class every lecture starting next week!

Contenu connexe

Tendances

OOPs Concepts - Android Programming
OOPs Concepts - Android ProgrammingOOPs Concepts - Android Programming
OOPs Concepts - Android ProgrammingPurvik Rana
 
Java is an Object-Oriented Language
Java is an Object-Oriented LanguageJava is an Object-Oriented Language
Java is an Object-Oriented Languageale8819
 
Introduction to oop using java
Introduction  to oop using java Introduction  to oop using java
Introduction to oop using java omeed
 
Md02 - Getting Started part-2
Md02 - Getting Started part-2Md02 - Getting Started part-2
Md02 - Getting Started part-2Rakesh Madugula
 
Object Oriented Paradigm
Object Oriented ParadigmObject Oriented Paradigm
Object Oriented ParadigmHüseyin Ergin
 
Java Programming Paradigms Chapter 1
Java Programming Paradigms Chapter 1 Java Programming Paradigms Chapter 1
Java Programming Paradigms Chapter 1 Sakthi Durai
 
Introduction to OOP concepts
Introduction to OOP conceptsIntroduction to OOP concepts
Introduction to OOP conceptsAhmed Farag
 
Object Oriented Programming in Java _lecture 1
Object Oriented Programming in Java _lecture 1Object Oriented Programming in Java _lecture 1
Object Oriented Programming in Java _lecture 1Mahmoud Alfarra
 
Object-Oriented Concepts
Object-Oriented ConceptsObject-Oriented Concepts
Object-Oriented ConceptsAbdalla Mahmoud
 

Tendances (16)

OOP in Java
OOP in JavaOOP in Java
OOP in Java
 
OOPs Concepts - Android Programming
OOPs Concepts - Android ProgrammingOOPs Concepts - Android Programming
OOPs Concepts - Android Programming
 
Java is an Object-Oriented Language
Java is an Object-Oriented LanguageJava is an Object-Oriented Language
Java is an Object-Oriented Language
 
Introduction to java and oop
Introduction to java and oopIntroduction to java and oop
Introduction to java and oop
 
Oop Presentation
Oop PresentationOop Presentation
Oop Presentation
 
Introduction to oop using java
Introduction  to oop using java Introduction  to oop using java
Introduction to oop using java
 
Oop java
Oop javaOop java
Oop java
 
Oops ppt
Oops pptOops ppt
Oops ppt
 
Md02 - Getting Started part-2
Md02 - Getting Started part-2Md02 - Getting Started part-2
Md02 - Getting Started part-2
 
Object Oriented Paradigm
Object Oriented ParadigmObject Oriented Paradigm
Object Oriented Paradigm
 
Java Programming Paradigms Chapter 1
Java Programming Paradigms Chapter 1 Java Programming Paradigms Chapter 1
Java Programming Paradigms Chapter 1
 
Introduction to OOP concepts
Introduction to OOP conceptsIntroduction to OOP concepts
Introduction to OOP concepts
 
OOPS in Java
OOPS in JavaOOPS in Java
OOPS in Java
 
Object Oriented Programming in Java _lecture 1
Object Oriented Programming in Java _lecture 1Object Oriented Programming in Java _lecture 1
Object Oriented Programming in Java _lecture 1
 
Object-Oriented Concepts
Object-Oriented ConceptsObject-Oriented Concepts
Object-Oriented Concepts
 
C# by Zaheer Abbas Aghani
C# by Zaheer Abbas AghaniC# by Zaheer Abbas Aghani
C# by Zaheer Abbas Aghani
 

En vedette (9)

CH 9: Editorial Style Notes
CH 9: Editorial Style NotesCH 9: Editorial Style Notes
CH 9: Editorial Style Notes
 
CH11 Graphics Notes
CH11 Graphics NotesCH11 Graphics Notes
CH11 Graphics Notes
 
08 boolean expressions
08 boolean expressions08 boolean expressions
08 boolean expressions
 
Chapter.08
Chapter.08Chapter.08
Chapter.08
 
11 interfaces
11 interfaces11 interfaces
11 interfaces
 
14b exceptions
14b exceptions14b exceptions
14b exceptions
 
3 Information Architecture
3 Information Architecture3 Information Architecture
3 Information Architecture
 
WSG CH08 - Typography
WSG CH08 - TypographyWSG CH08 - Typography
WSG CH08 - Typography
 
Chapter.07
Chapter.07Chapter.07
Chapter.07
 

Similaire à Learn OOP and Java for problem solving with hands-on coding

1 2 java development
1 2 java development1 2 java development
1 2 java developmentKen Kretsch
 
R:\ap java\class slides\chapter 1\1 2 java development
R:\ap java\class slides\chapter 1\1 2 java developmentR:\ap java\class slides\chapter 1\1 2 java development
R:\ap java\class slides\chapter 1\1 2 java developmentKen Kretsch
 
Intro Java Rev010
Intro Java Rev010Intro Java Rev010
Intro Java Rev010Rich Helton
 
Bca 4020 java programming
Bca 4020   java programmingBca 4020   java programming
Bca 4020 java programmingsmumbahelp
 
Fundamentals of oop lecture 2
Fundamentals of oop lecture 2Fundamentals of oop lecture 2
Fundamentals of oop lecture 2miiro30
 
OOPM Introduction.ppt
OOPM Introduction.pptOOPM Introduction.ppt
OOPM Introduction.pptvijay251387
 
01slide (1)ffgfefge
01slide (1)ffgfefge01slide (1)ffgfefge
01slide (1)ffgfefgebsnl007
 
Java Programming for Designers
Java Programming for DesignersJava Programming for Designers
Java Programming for DesignersR. Sosa
 
Dependency Injection: Why is awesome and why should I care?
Dependency Injection: Why is awesome and why should I care?Dependency Injection: Why is awesome and why should I care?
Dependency Injection: Why is awesome and why should I care?devObjective
 
Core java-introduction
Core java-introductionCore java-introduction
Core java-introductionRamlal Pawar
 
Dependency Injection Why is it awesome and Why should I care?
Dependency Injection Why is it awesome and Why should I care?Dependency Injection Why is it awesome and Why should I care?
Dependency Injection Why is it awesome and Why should I care?ColdFusionConference
 
Introduction to Software Development
Introduction to Software DevelopmentIntroduction to Software Development
Introduction to Software DevelopmentZeeshan MIrza
 

Similaire à Learn OOP and Java for problem solving with hands-on coding (20)

01 intro tousingjava
01 intro tousingjava01 intro tousingjava
01 intro tousingjava
 
Javalecture 1
Javalecture 1Javalecture 1
Javalecture 1
 
1 2 java development
1 2 java development1 2 java development
1 2 java development
 
R:\ap java\class slides\chapter 1\1 2 java development
R:\ap java\class slides\chapter 1\1 2 java developmentR:\ap java\class slides\chapter 1\1 2 java development
R:\ap java\class slides\chapter 1\1 2 java development
 
Intro Java Rev010
Intro Java Rev010Intro Java Rev010
Intro Java Rev010
 
Bca 4020 java programming
Bca 4020   java programmingBca 4020   java programming
Bca 4020 java programming
 
Java getstarted
Java getstartedJava getstarted
Java getstarted
 
Java fundamentals
Java fundamentalsJava fundamentals
Java fundamentals
 
Fundamentals of oop lecture 2
Fundamentals of oop lecture 2Fundamentals of oop lecture 2
Fundamentals of oop lecture 2
 
01slide
01slide01slide
01slide
 
01slide
01slide01slide
01slide
 
OOPM Introduction.ppt
OOPM Introduction.pptOOPM Introduction.ppt
OOPM Introduction.ppt
 
01slide (1)ffgfefge
01slide (1)ffgfefge01slide (1)ffgfefge
01slide (1)ffgfefge
 
Java Programming for Designers
Java Programming for DesignersJava Programming for Designers
Java Programming for Designers
 
Dependency Injection
Dependency InjectionDependency Injection
Dependency Injection
 
Dependency Injection: Why is awesome and why should I care?
Dependency Injection: Why is awesome and why should I care?Dependency Injection: Why is awesome and why should I care?
Dependency Injection: Why is awesome and why should I care?
 
Core java-introduction
Core java-introductionCore java-introduction
Core java-introduction
 
Dependency Injection Why is it awesome and Why should I care?
Dependency Injection Why is it awesome and Why should I care?Dependency Injection Why is it awesome and Why should I care?
Dependency Injection Why is it awesome and Why should I care?
 
Introduction to Software Development
Introduction to Software DevelopmentIntroduction to Software Development
Introduction to Software Development
 
01slide
01slide01slide
01slide
 

Plus de Program in Interdisciplinary Computing (20)

Phpmysqlcoding
PhpmysqlcodingPhpmysqlcoding
Phpmysqlcoding
 
Database basics
Database basicsDatabase basics
Database basics
 
CGS2835 HTML5
CGS2835 HTML5CGS2835 HTML5
CGS2835 HTML5
 
Mysocial databasequeries
Mysocial databasequeriesMysocial databasequeries
Mysocial databasequeries
 
Mysocial databasequeries
Mysocial databasequeriesMysocial databasequeries
Mysocial databasequeries
 
CGS2835 HTML5
CGS2835 HTML5CGS2835 HTML5
CGS2835 HTML5
 
Web architecture v3
Web architecture v3Web architecture v3
Web architecture v3
 
Xhtml
XhtmlXhtml
Xhtml
 
Webdev
WebdevWebdev
Webdev
 
Web architecture
Web architectureWeb architecture
Web architecture
 
Sdlc
SdlcSdlc
Sdlc
 
Mysocial
MysocialMysocial
Mysocial
 
Javascript
JavascriptJavascript
Javascript
 
Javascript
JavascriptJavascript
Javascript
 
Html5
Html5Html5
Html5
 
Frameworks
FrameworksFrameworks
Frameworks
 
Drupal
DrupalDrupal
Drupal
 
Database
DatabaseDatabase
Database
 
Javascript2
Javascript2Javascript2
Javascript2
 
12 abstract classes
12 abstract classes12 abstract classes
12 abstract classes
 

Dernier

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 

Dernier (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 

Learn OOP and Java for problem solving with hands-on coding

  • 1. Welcome To Problem Solving Problem Solving with OOP and JAVA with OOP and JAVA
  • 2. Meet Your Instructor That’s me
  • 3. Meet Your TA Alisha IDC3931 © PIC
  • 4. Who Should Drink JAVA? Have you done some programming? Do you want to learn Java? Do you prefer stimulating dinner conversations over coffee to dry, dull, technical lectures? Do you need this course to graduate? Muahahahahaha! IDC3931 © PIC
  • 5. Who Drinks JAVA? IDC3931 © PIC
  • 6. IDC3931 © PIC What Is A Computer? A computer is something that takes in information (input), processes it according to a set of instructions (program), and produces a result (output). Computers communicate through a binary alphabet. The letters in this alphabet are ‘0’ and ‘1’. Everything else is made out of these ‘letters’ which are called bits. Bits are represented in a computer by electrical signals: low voltage would mean a ‘0’ and higher voltage a ‘1’. Eight bits gathered together form one byte.
  • 7. What Is JAVA? Java is a free, open-source, Object Oriented Programming (OOP) language – everything is contained inside classes and objects. Java is überportable – it can run on any machine with a Java Virtual Machine (JVM) installed. No matter what computer you have, you can write the same Java programs. IDC3931 © PIC
  • 8. How WEuse Java Source Code Virtual Machines Java bytecode Compiler
  • 9. How WEuse Java Virtual Machines Source Code Java bytecode Compiler IDC3931 © PIC
  • 10. Code Structure in Java source code class file method 1 statement method 2 statement statement
  • 11. What goes in the source file? A source file (with the .java extension) holds one class definition. The class represents a piece of your program, although a very tiny application might need just a single class. The class must go within a pair of public class Bicycle { } curly braces The source file MUST have the same name as the class. For example, the Bicycle class my be stored in the Bicycle.javafile. class A class is the blueprint from which individual objects are created. Think of a bicycle…
  • 12. What goes in a class? A class has one or more methods. In the Bicycle class, the pedal method will hold instructions for how the Bicycle should pedal. Your methods must be declared inside a class (in other words, within the public class Bicycle{ void pedal( ) { } } curly braces of the class). method A bicycle might have some methods such as: speedup(), break(), gear(), direction()…
  • 13. What goes in a method? Within the curly braces public class Dog { void bark ( ) { statement1; statement2; statement3; } } public class Bicycle{ void pedal( ) { } } of a method, write your instructions for how that method should be performed. Method code is basically a set of statements, and for now you can think of a function or procedure. statement1; statement2; statement3; What are you staring at? statements
  • 14. One Blueprint Can Be Used To Help Build Different Objects Shape rotate ( ) playSound ( ) Circle Square Amoeba Triangle This is called inheritance
  • 15. EVERYTHINGis made from OBJECTS Object equals() getClass() hashCode() toString() Shape rotate() playSound() Circle doSomething() This is the Object class from which ALL other objects are created.
  • 16. What You Will Get Out Of Learning and Using JAVA! A thorough understanding of Object Oriented Programming. Learn a language that can be run on any platform. Build your programming skills and confidence. Learn how to work and program in groups. Develop Graphical User Interfaces. If you can make it through the day without programming, you haven’t triedJAVA!
  • 17. Where To Start Setup Eclipse Classic 3.6 Write your first Java program Bring your laptops to class every lecture starting next week!