Your SlideShare is downloading. ×
  • Like
01 intro to using java
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply
Published

 

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,079
On SlideShare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
9
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 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!