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

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
 
1 2 java development
1 2 java development1 2 java development
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
 
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
 
1 2 java development
1 2 java development1 2 java development
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: 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?
 
Dependency Injection
Dependency InjectionDependency Injection
Dependency Injection
 
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

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Dernier (20)

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

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!