Presentation is loading. Please wait.

Presentation is loading. Please wait.

Board Activity Find your seat on the seating chart Login – Remember your login is your first initial your last name and the last three numbers of your.

Similar presentations


Presentation on theme: "Board Activity Find your seat on the seating chart Login – Remember your login is your first initial your last name and the last three numbers of your."— Presentation transcript:

1 Board Activity Find your seat on the seating chart Login – Remember your login is your first initial your last name and the last three numbers of your student ID. Your password your last three numbers Write you email next to your name on the sign up sheet.

2 My First Program /* Java Program: HelloStudent1.java * Author: Student Name * */ public class HelloStudent1 { public static void main(String arg[ ] ) { // creates a variable called name String name="John Doe"; //prints info on screen System.out.println("Hello Student " + name); }

3 Important Points Know the basic parts of a Java Program. Know the steps to create a Java Program. Know the difference between source code and byte code. Know that Java is an object oriented programming language. Know the difference between procedural and object oriented programming. Know the advantages of object oriented programming.

4 Parts of a Java Program Comments Class Definition Main Method Braces Statement

5 Comments Explain the purpose of the program Keep notes regarding changes to the source code Store the names of programmers for future reference Explain the parts of your program

6 Class Definition Everything in Java is an object Class is the template used to create an object.

7 Main Method The main method is the first method ran in a java program. Every program must have a main method. Method consists of one or more statements that perform a specific task within a object

8 Braces Are used to mark the beginning and end of blocks of code.

9 Statements Are instructions to the computer Most statements end in semi-colons.

10 White space Tabs used to help organize your program to make it easier to read and debug.

11 Case Sensitive Java is Case Sensitive, which means that it matters if you type something in upper case or lower case Cow is not the same as CoW.

12 Steps to Create a Java Program 1. Type the source code. 2. Save the source code with the same name as the class name. 3. Compile the source code. 4. Fix any errors. 5. Recompile as necessary. 6. Send the file to the Java Virtual Machine to be executed.

13 Source Code Vs. Byte Code Source Code is the file you type up with your statements. Byte Code is a file that can be read by the Java Virtual Machine. It is not English.

14 Procedural Programming Write programs that are completed step by step. Works well with simple programs that change little. Problem when you change the program you have to retest the whole program.

15 Object Oriented Programs Break tasks into Logical groups, called objects. The programmer creates a controller object to talk to other objects. Easy to expand by adding new object. Easier to upgrade, test the new objects.


Download ppt "Board Activity Find your seat on the seating chart Login – Remember your login is your first initial your last name and the last three numbers of your."

Similar presentations


Ads by Google