Principles of Computer Programming (using Java) Chapter 2, Part 1

Slides:



Advertisements
Similar presentations
Classes And Objects II. Recall the LightSwitch Class class LightSwitch { boolean on = true; boolean isOn() { return on; } void switch() { on = !on; }
Advertisements

Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 3: Flow Control I: For Loops.
STRING AN EXAMPLE OF REFERENCE DATA TYPE. 2 Primitive Data Types  The eight Java primitive data types are:  byte  short  int  long  float  double.
Introduction to Computing Concepts Note Set 7. Overview Variables Data Types Basic Arithmetic Expressions ▫ Arithmetic.
Types, Variables and Operators Computer Engineering Department Java Course Asst. Prof. Dr. Ahmet Sayar Kocaeli University - Fall 2013.
Java Syntax Part I Comments Identifiers Primitive Data Types Assignment.
Introduction to Primitives. Overview Today we will discuss: –The eight primitive types, especially int and double –Declaring the types of variables –Operations.
Lecture 4 Types & Expressions COMP1681 / SE15 Introduction to Programming.
COMS W1004 Introduction to Computer Science June 1, 2009.
CS 178: Programming with Multimedia Objects Aditya P. Mathur Professor of Computer Sciences Purdue University, West Lafayette Sept 20, 2004 Last update:
Principles of Computer Programming (using Java) Haidong Xue Summer 2011, at GSU Copyright © 2000 W. W. Norton & Company. All rights reserved. 1.
Principles of Computer Programming (using Java) Review Haidong Xue Summer 2011, at GSU.
Programming Principles Data types and Variables. Data types Variables are nothing but reserved memory locations to store values. This means that when.
Introduction to Java Appendix A. Appendix A: Introduction to Java2 Chapter Objectives To understand the essentials of object-oriented programming in Java.
VARIABLES AND TYPES CITS1001. Types in Java the eight primitive types the unlimited number of object types Values and References The Golden Rule Scope.
Java means Coffee Java Coffee Beans The name “JAVA” was taken from a cup of coffee.
Java Programming Presented by Daniel Rosenthal Friday, November 30 th, 2007.
 JAVA Compilation and Interpretation  JAVA Platform Independence  Building First JAVA Program  Escapes Sequences  Display text with printf  Data.
Java Programming: From Problem Analysis to Program Design, 4e Chapter 2 Basic Elements of Java.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 2: Variables & Data Types.
An Introduction to Java – Part 1 Dylan Boltz. What is Java?  An object-oriented programming language  Developed and released by Sun in 1995  Designed.
1 Programming Java Java Basics. 2 Java Program Java Application Program Application Program written in general programming language Applet Program running.
Java Programming, Second Edition Chapter Two Using Data Within a Program.
School of Computer Science & Information Technology G6DICP - Lecture 4 Variables, data types & decision making.
Data Tonga Institute of Higher Education. Variables Programs need to remember values.  Example: A program that keeps track of sales needs to remember.
“Great leaders are never satisfied with current levels of performance. They are restlessly driven by possibilities and potential achievements.” – Donna.
Java Nuts and Bolts Variables and Data Types Operators Expressions Control Flow Statements Arrays and Strings.
Developed at Sun Microsystems in 1991 James Gosling, initially named “OAK” Formally announced java in 1995 Object oriented and cant write procedural.
Spring 2009 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 8.
Chapter 1 Java Programming Review. Introduction Java is platform-independent, meaning that you can write a program once and run it anywhere. Java programs.
COP2800 – Computer Programming Using JAVA University of Florida Department of CISE Spring 2013 Lecture 06 – Java Datatypes Webpage:
 Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory. 
Java Computer Industry Lab. 1 Programming Java Java Basics Incheon Paik.
 Data Type is a basic classification which identifies different types of data.  Data Types helps in: › Determining the possible values of a variable.
1 Lecture # 2. * Introducing Programming with an Example * Identifiers, Variables, and Constants * Primitive Data Types * Byte, short, int, long, float,
David Streader Computer Science Victoria University of Wellington Copyright: David Streader, Victoria University of Wellington Java Programing Basics COMP.
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
Basic Data Types อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา Chapter 4.
Object Oriented Programming Lecture 2: BallWorld.
CSE 110: Programming Language I Matin Saad Abdullah UB 1222.
Review by Mr. Maasz, Summary of Chapter 2: Starting Out with Java.
Chapter 2 Variables and Constants. Objectives Explain the different integer variable types used in C++. Declare, name, and initialize variables. Use character.
Fundamentals 2.
JAVA MULTIPLE CHOICE QUESTION.
Elementary Programming
Haidong Xue Summer 2011, at GSU
Multiple variables can be created in one declaration
Data types and variables
Java package classes Java package classes.
Java Programming: From Problem Analysis to Program Design, 4e
Haidong Xue Summer 2011, at GSU
Haidong Xue Summer 2011, at GSU
Chapter 2.
Computers & Programming Languages
Unit-2 Objects and Classes
null, true, and false are also reserved.
Computers & Programming Languages
An Introduction to Java – Part I, language basics
Chapter 2: Java Fundamentals
Sridhar Narayan Java Basics Sridhar Narayan
Chap 1 Chap 2 Chap 3 Chap 5 Surprise Me
Java Programming Review 1
Java’s Central Casting
Names of variables, functions, classes
Chapter 3 Introduction to Classes, Objects Methods and Strings
Haidong Xue Summer 2011, at GSU
Haidong Xue Summer 2011, at GSU
Principles of Computer Programming (using Java) Chapter 5 Arrays
Variables and Constants
Review of Java Fundamentals
Presentation transcript:

Principles of Computer Programming (using Java) Chapter 2, Part 1 Haidong Xue Summer 2011, at GSU

Content Answers of assigenment1 Quiz1 Review Your first Java program Ch2.1, Ch2.2, Ch2.3 Variables and Types Ch2.4, Ch2.5 Examples

Assignment 1 Assignments received: 30 Average courses taken: 2.3 Number of beginners: 20 (beginner is defined as: 0 or limited programming experience)

Assignment 1 Make the photo in uLearn public

Quiz1 1:50PM – 2:00PM

Review Algorithm textbook wiki Ch1.3 Ways to express algorithms Ch1.3 Computer programs (algorithms in the form of certain programming language) Ch1.3 The stuff computer programs manipulate Ch1.4 Compiler and Interpreter Ch1.5 The compiler and interpreter in Java Ch1.5

YOUR FIRST JAVA PROGRAM Ch2.1, Ch2.2, Ch2.3 YOUR FIRST JAVA PROGRAM

Your First Java Program (Oracle documents)

The knowledge I suggest you to remember JDK, JRE, JVM How to get a Java program executed The composition of Java programs The composition of a method Java Keywords: public, static, void

VARIABLES AND THEIR TYPES Ch2.4, Ch2.5 VARIABLES AND THEIR TYPES

Primitive Data Types in Java Range Integer Types byte -128 to 127 short -32768 to 32767 int -231 to 231-1 long -263 to 263-1 Floating-Point Types float A lot double A lot and much more than float Boolean Type boolean {true, false} Char Type char 2128 characters

The knowledge I suggest you to remember Variable declaration How to assign value to a variable The 4 most important data types and their keywords

Examples HelloWorldPro.java FahrenheitToCelsius.java