2.5 Edit, Compile, and Execute Figure 2-3 illustrates the edit, compile and execute steps. Java bytecode.

Slides:



Advertisements
Similar presentations
Chapter 1 Chapter 2 Chapter 3 Code Gone Wrong Random 5 pt 5 pt 5 pt
Advertisements

Chapter 2 First Java Programs
Chapter 1 Introduction to JAVA. Why Learn JAVA? Java is one of the fastest growing programming language in the world. Java is one of the fastest growing.
How to Create a Java program CS115 Fall George Koutsogiannakis.
Java Programming Working with TextPad. Using TextPad to Work with Java This text editor is designed for working with Java You can download a trial version.
Introduction to Computer Programming CSC 1401: Introduction to Programming with Java Lecture 2 Wanda M. Kunkle.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
CS0007: Introduction to Computer Programming Setting Up Java.
Chapter 2 First Java Programs
Computer Programming Lab(4).
Program State and Program Execution CSE 1310 – Introduction to Computers and Programming 1.
Chapter Introduction to Computers and Programming 1.
1.1 History of Computers 1940s: The ENIAC was one of the world’s first computers. Large stand-alone machine Used large amounts of electricity Contained.
Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.
Introduction COMP104: Fundamentals and Methodology.
Lesson 2: First Java Programs
Lesson 7: Improving the User Interface
Chapter 1.4 Programming languages Homework Due: Monday, August 11, 2014.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
1 Chapter 2 First Java Programs Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Computer Programming 12 Mr. Jean March 19 th, 2013.
Lesson 2: First Java Programs. Objectives: –Discuss why Java is an important programming language. –Explain the Java virtual machine and byte code. –Choose.
Engineering Computing I Chapter 1 – Part A A Tutorial Introduction.
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
Intro and Review Welcome to Java. Introduction Java application programming Use tools from the JDK to compile and run programs. Videos at
David Streader Computer Science Victoria University of Wellington Copyright: David Streader, Victoria University of Wellington Java Programing Basics COMP.
Basics of Java IMPORTANT: Read Chap 1-6 of How to think like a… Lecture 3.
David Streader Computer Science Victoria University of Wellington Copyright: David Streader, Victoria University of Wellington Java Programing Basics COMP.
CSI 1390: Introduction to Computers TA: Tapu Kumar Ghose Office: STE 5014 Office hours: Thursday 1300 – 1400hrs.
Lecture 3 January 14, 2002 CSC Programming I Fall 2001.
 Pearson Education, Inc. All rights reserved Introduction to Java Applications.
4-Nov-15 Air Force Institute of Technology Electrical and Computer Engineering Object-Oriented Programming Design Topic 1: The Java Environment Maj Joel.
1 Getting Started with C++. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Visual Studio 2008.
JAVA PROGRAMMING WITH ECLIPSE PART 1 PLEASE READ ALL THE CONTENT ON THE SLIDES. WATCH THE RECOMMENDED VIDEOS LISTED.
Java Programming, Second Edition Appendix A Working with Java SDK 1.4.
Lesson 4 Input. JAVA Input JAVA input is not straightforward and is different depending on the JAVA environment that you are using. The reason it is not.
Chapter 2 Input, Variables and Data Types. JAVA Input JAVA input is not straightforward and is different depending on the JAVA environment that you are.
Chapter 1 09/04/13. Change Your Password  The command is: passwd In the lab first do : ssh -Y onyx  You will have to see me to change it, if you forget.
Overview Object oriented programming How to run a simple program.
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved. 1 Chapter 1 Introduction to Computers, Programs,
How to Execute TSR Program. Install Borland C++ Download Borland C++ from LMS – oads/BORLANDC.rarhttp://vulms.vu.edu.pk/Courses/CS609/Downl.
COP 2551 Introduction to Object Oriented Programming with Java Topics –Introduction to the Java language –Code Commenting –Java Program Structure –Identifiers.
3/5/2002e-business and Information Systems1 Java Java Java Virtual Machine (JVM) Java Application Program Interface (API) HW Kernel API Application Programs.
Java How to Program, 9/e Presented by: José M. Reyes Álamo © by Pearson Education, Inc. All Rights Reserved.
© Peter Andreae Java Programs COMP 102 # T1 Peter Andreae Computer Science Victoria University of Wellington.
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
David Streader Computer Science Victoria University of Wellington Copyright: David Streader, Victoria University of Wellington Java Programing Basics COMP.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Chapter 2 First Java Programs Fundamentals of Java.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to Computers,
Starting Out With Java 5 Control Structures to Objects By Tony Gaddis Copyright © 2005 Pearson Addison- Wesley. All rights reserved. Chapter 1 Slide #1.
Basic Concepts: computer, program, programming …
Compiling and Running a Java Program
A Short DOS Presentation
Computing Fundamentals
Text by: Lambert and Osborne
Chapter 2 First Java Programs
Java programming lecture one
Microsoft Office Illustrated
Programming COMP104: Fundamentals and Methodology Introduction.
Lecturer: Mukhtar Mohamed Ali “Hakaale”
Java Programming with BlueJ
Unit-1 Introduction to Java
Lab 5 Process Control Operating System Lab.
Java Intro.
Debugging Visual Basic Programs
How Java Program Executes
Road to Object Oriented Programming
Presentation transcript:

2.5 Edit, Compile, and Execute Figure 2-3 illustrates the edit, compile and execute steps. Java bytecode

2.5 Edit, Compile, and Execute Development environments:  Unix standard text editor command line activation of compiler and JVM  DOS, using Microsoft Windows and NT OS notepad text editor command line activation of compiler and JVM from a DOS window  Integrated development environment, using Windows, NT, or MAC OS Examples: Eclipse, Symantec’s Visual Café, Microsoft’s Visual J++, Borland’s J Builder, or one of Oracle’s products

2.6 Temperature Conversion

The following is an explanation of the program code:  Import statement – “includes” the given code for your program import TerminalIO.KeyboardReader;  Instantiate or create an object KeyboardReader reader = new KeyboardReader(); instantiates an object ( reader ) of the KeyboardReader class and reserves memory for it ( new ). KeyboardReader is a unique class found only in our textbook.  Declare the variables double fahrenheit; double celsius; reserves memory for two numbers of type double

 Position the cursor after “Enter degrees Fahrenheit” System.out.print(“Enter degrees Fahrenheit: “);  Assignment operator fahrenheit = reader.readDouble(); These 2 statements can be combined as: fahrenheit=reader.readDouble(“Enter degrees Fahrenheit: “);  Assignment statements celsius = (fahrenheit – 32.0) * 5.0 / 9.0;

 Print text (and position the cursor) System.out.print(“The equivalent in Celsius is “);  Print the value of the variable System.out.println(celsius); These 2 statements can be combined as: System.out.print(“The equivalent in Celsius is “+celsius);

2.6 Temperature Conversion Figure 2-11 depicts the variables and objects used in the program: