Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction Java Chapter 3.

Similar presentations


Presentation on theme: "Introduction Java Chapter 3."— Presentation transcript:

1 Introduction Java Chapter 3

2 Java Developed by Sun Microsystem High-level programming language
One reason for its wide-spread use is the ability to create platform-independent applications.

3 Object, Classes, & Packages
An object consists of related data and the instructions for performing actions on that data. A class defines the type of data actions that will be associated with an object of that class. A package, sometimes called a library, is a group of related classes.

4 Object, Classes, & Packages
Library Classes Fiction Biography Object Names of books Names of books

5 A Java Application Statements are a set of instructions
Semicolon (;) is required to indicate the end of a statement. { } enclose related statements Start with a Package Name Define a class Define an object

6 Java Program Source code is the code the programmer types
Compiler is used to change the program in to 0 & 1 that the computer can understand. Syntax error occurs in a statement that violates the rules of Java

7 Code Conventions An introductory comment should begin a program.
Package names should begin with a lowercase Class names should be nouns and begins with an uppercase letter. A comment block should be included before each class.

8 Code Conventions Comments should not repeat what is clear from looking at the code. Statements in a method should be indented. An open curly brace { should be placed on the same line as the class or method declaration.

9 Planning Code One method of design is called algorithm.
Pseudocode is steps written out in plain English. Flow Charts are symbols and text to give visual representation of solution Pg.66 is an example.

10 Hello World Use Jcreator to complete the 1st program. Pg. 61, 63, 64


Download ppt "Introduction Java Chapter 3."

Similar presentations


Ads by Google