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.

Slides:



Advertisements
Similar presentations
C++ Basics March 10th. A C++ program //if necessary include headers //#include void main() { //variable declaration //read values input from user //computation.
Advertisements

INTRODUCTION Chapter 1 1. Java CPSC 1100 University of Tennessee at Chattanooga 2  Difference between Visual Logic & Java  Lots  Visual Logic Flowcharts.
Classes  All code in a Java program is part of a class  A class has two purposes  Provide functions to do work for the programmer  Represent data.
Begin Java Pepper. Objectives What is a program? Learn the basics of your programming tool: BlueJ Write a first Java program and see it run Make some.
IT151: Introduction to Programming
Dale Roberts Introduction to Java - First Program Dale Roberts, Lecturer Computer Science, IUPUI Department of Computer and.
JAVA BASICS SYNTAX, ERRORS, AND DEBUGGING. OBJECTIVES FOR THIS UNIT Upon completion of this unit, you should be able to: Explain the Java virtual machine.
Object Oriented Programming in JAVA
Chapter 1: Introduction
Chapter 2: Your First Program! Hello World: Let’s Program  All programs must have the extension.java  Our first program will be named: HelloWorld.java.
How to Create a Java program CS115 Fall George Koutsogiannakis.
CMT Programming Software Applications
Java Intro. A First Java Program //The Hello, World! program in Java public class Hello { public static void main(String[] args) { System.out.println("Hello,
1 Key Concepts:  Why C?  Life Cycle Of a C program,  What is a computer program?  A program statement?  Basic parts of a C program,  Printf() function?
 2003 Prentice Hall, Inc. All rights reserved. Customized by Sana Odeh for the use of this class. 1 Introduction to Computers and Programming in JAVA.
Java An introduction. Example 1 public class Example1 { public static void main (String [] args) { System.out.println (“This is the first example”); int.
COMP 14: Intro. to Intro. to Programming May 23, 2000 Nick Vallidis.
Chapter 3: Introduction to C Programming Language C development environment A simple program example Characters and tokens Structure of a C program –comment.
Chapter 1 - Introduction. Ch 1Goals To understand the activity of programming To learn about the architecture of computers To learn about machine code.
Basics Programming Concepts. Basics A computer program is a set of instructions to tell a computer what to do Machine language = circuit level language.
CS 106 Introduction to Computer Science I 01 / 25 / 2010 Instructor: Michael Eckmann.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Introduction to Java Thanks to Dan Lunney (SHS). Java Basics File names The “main” method Output to screen Escape Sequence – Special Characters format()
Session One Introduction. Personal Introduction Role of programmers Robot Examination HUD & HID Uploading Code.
The Java Programming Language
JAVA BASICS: Variables and References SYNTAX, ERRORS, AND DEBUGGING.
Week 1 - Friday.  What did we talk about last time?  Our first Java program.
CHAPTER 3 GC Java Fundamentals. 2 BASICS OF JAVA ENVIRONMENT  The environment  The language  Java applications programming Interface API  Various.
Sharda University P. K. Mishra (Asst.Prof) Department of Computer Science & Technology Subject Name: Programming Using C Sub Code: CSE-106 Programming.
Introduction to programming in the Java programming language.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 2: Variables & Data Types.
1 Computer Science of Graphics and Games MONT 105S, Spring 2009 Session 1 Simple Python Programs Using Print, Variables, Input.
1 WELCOME TO CIS 1068! Instructor: Alexander Yates.
Anatomy of a Java Program. AnotherQuote.java 1 /** A basic java program 2 * 3 Nancy Harris, James Madison University 4 V1 6/2010.
CPS120: Introduction to Computer Science Introduction to C++
CS 106 Introduction to Computer Science I 01 / 22 / 2007 Instructor: Michael Eckmann.
Java FilesOops - Mistake Java lingoSyntax
Java Basic Syntax. Object - Objects have states and behaviors. –Example: A dog has states-color, name, breed as well as behaviors -wagging, barking, eating.
CS 106 Introduction to Computer Science I 01 / 22 / 2008 Instructor: Michael Eckmann.
Compilers and Interpreters
CS 177 Recitation Week 1 – Intro to Java. Questions?
ITP 109 Week 2 Trina Gregory Introduction to Java.
Programming for Interactivity Professor Bill Tomlinson Tuesday & Wednesday 6:00-7:50pm Fall 2005.
Chapter 3 Introducing Java. Objectives and Goals 1. Define terminology associated with object- oriented programming. 2. Explain why Java is a widely used.
SUMMARY OF CHAPTER 2: JAVA FUNDAMENTS STARTING OUT WITH JAVA: OBJECTS Parts of a Java Program.
Java Programming Fifth Edition Chapter 1 Creating Your First Java Classes.
Introduction to 1. What is Java ? Sun Microsystems Java is a programming language and computing platform first released by Sun Microsystems in The.
2.1 First C Program. First Program Open visual studio, click new file Save as “programName.c” – Program must start with letter and have no spaces – Must.
Introduction to Object Oriented
Introduction to programming in java
Computer Programming Your First Java Program: HelloWorld.java.
Lecture 1b- Introduction
Dept of Computer Science University of Maryland College Park
John Woodward A Simple Program – Hello world
Object-Oriented Programming Using Java
GC101 Introduction to computer and program
Chapter 3 GC 101 Java Fundamentals.
Introduction to.
Intro to Java.
TRANSLATORS AND IDEs Key Revision Points.
Writing Methods.
PROGRAM STRUCTURE CSC 111.
Programming Vocabulary.
Hands-on Introduction to JAVA
Chapter 1: Computer Systems
Java Intro.
Units with – James tedder
Anatomy of a Java Program
CPS120: Introduction to Computer Science
Computer Programming-1 CSC 111
Presentation transcript:

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 next to your name on the sign up sheet.

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); }

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.

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

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

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

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

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

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

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

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.

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.

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.

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.

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.