Agenda For Feb 11 1. PowerPoint Presentation (Introduction to Java Methods) 2.Finish Unit 2 exercises on page 13 (due by the end of the class today). 4.

Slides:



Advertisements
Similar presentations
Java Development Kit Installation Guide Sun Microsystems.
Advertisements

Java Packages CSci 1130 Intro to Computer Programming with Java Instructor Tatyana Volk.
INTRODUCTION Chapter 1 1. Java CPSC 1100 University of Tennessee at Chattanooga 2  Difference between Visual Logic & Java  Lots  Visual Logic Flowcharts.
1 eclipse Tips. 2 What is eclipse? Eclipse is a popular IDE (Integrated Development Environment) that we will use to create, compile, execute, and test.
Creating a Program In today’s lesson we will look at: what programming is different types of programs how we create a program installing an IDE to get.
What is a Programming Language? The computer operates using binary numbers. The computer only knows about 1’s and 0’s. Humans can also use 1’s and 0’s,
 2003 Prentice Hall, Inc. All rights reserved. 1 Chapter 3 - Introduction to Java Applets Outline 3.1 Introduction 3.2 Sample Applets from the Java 2.
Java Applets. Road Map Introduction to Java Applets Review applets that ship with JDK Make our own simple applets –Introduce inheritance –Introduce the.
Introduction to Java A lab course by Dr. Junaid Ahmed Zubairi SUNY Fredonia.
JAVA: An Introduction to Problem Solving & Programming, 6 th Ed. By Walter Savitch ISBN © 2012 Pearson Education, Inc., Upper Saddle River,
PHY281Introduction to JavaSlide 1 Introduction to Java In this section we will learn how how to use Java and write our first Java Applet:  The Java Development.
CS0007: Introduction to Computer Programming Setting Up Java.
The Basic Java Tools A text editor to write Java program source code. A compiler to translate source code into bytecode. An interpreter to translate.
Software Development. Chapter 3 – Your first Windows 8 app.
By Alfredo Alvarez. Agenda: Find out who the instructor is. Talk about goals and why you want to learn python. Discuss the materials and the methodology.
Java: Chapter 1 Computer Systems Computer Programming II Aug
Java Programming, 3e Concepts and Techniques Chapter 2 Creating a Java Application and Applet.
Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.
Java the UML Way version Only to be used in connection with the book "Java the UML Way", by Else Lervik and.
1 eclipse Tips. 2 What is eclipse? Eclipse is a popular IDE (Integrated Development Environment) that we will use to create, compile, execute, and test.
From BlueJ to NetBeans SWC 2.semester.
CS413: Java Programming language Applications Applets
Java Workshop for Teachers May 6, 2005 A Brief Look at the Java Programming Language.
Agenda For Feb Discussion (Assignments & Rubric) 2. PowerPoint Presentation (Drawing Basic Shapes). 4.Read Unit 3 carefully (pages ) then.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
CSE 305 Theory of Database Tutorial on Connecting with Sybase from Java program and Developing GUI Jalal Mahmud, TA, CSE 305.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
UCSC All rights reserved. No part of this material may be reproduced and sold. 1 IT1202-Fundamentals Of Programming (Using JAVA) Interacting with.
JAVA Java is a programming language and computing platform first released by Sun Microsystems in It was first developed by James Gosling at Sun Microsystems,
1 Chapter 1 Introduction to Java. 2 History of Java Java Originally for _________________________ devices Then used for creating Web pages with __________________________.
POS 406 Java Technology And Beginning Java Code
How to Run a Java Program CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
How to Run a Java Program CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Creating Projects in JCreator Computer Science 40S.
LEARNING HTML PowerPoint #1 Cyrus Saadat, Webmaster.
Setting Up Eclipse. What is Eclipse? Eclipse is a free, downloadable software that allows us to create, compile, and run JAVA programs.
4-Nov-15 Air Force Institute of Technology Electrical and Computer Engineering Object-Oriented Programming Design Topic 1: The Java Environment Maj Joel.
EIE375 BlueJ: Getting Started Dr Lawrence Cheung.
Mini University July, 2005 A Little Taste of Java (but don’t tell your folks) (they might think there’s caffeine involved)
CSE S. Tanimoto Java Introduction 1 Java A Programming Language for Web-based Computing with Graphics.
Object Oriented Programming Examples: C++, Java Advantages: 1. reusibility of code 2. ability to adapt (extend) previously written code.
Java Methods Methods contain a group of instructions that together perform a single task. For example if I want to perform the task of “making a pizza”,
AN INTRODUCTION TO JAVA LANGUAGE CT Credit Hours : (3 Lecture, 2 Lab)
Tool Install How to download & install Java 6 & Eclipse updated version based on Dr. G. L. Ray’s slides.
How to Install the JDK (Java Development Kit) Click hereClick here to download the JDK.
Lecture 1. Introduction to Programming and Java MIT- AITI 2003.
22-July-2002cse142-13B-Development © 2002 University of Washington1 Development Tools CSE 142, Summer 2002 Computer Programming 1
1 Installing Java on Your PC. Installing Java To develop Java programs on your PC: Install JDK (Java Development Kit) Add the directory where JDK was.
Delete this slide Although multiple images were used to create each slide, they are saved together as a single image file. This means that you cannot remove.
IT11 Agenda for Feb Golden Rule Reminder. 2. PowerPoint demonstration on the structure of Java Applet programs. Source Files HTML Files Class Files.
1.1: Objects and Classes msklug.weebly.com. Agenda: Attendance Let’s get started What is Java? Work Time.
Agenda For Feb PowerPoint Presentation on Java Methods. 3. Finish Happy Face Assignment (Due by the.
Using This PowerPoint This PowerPoint presentation assumes you already have both the Java JDK and JCreator installed and all that you need is the proper.
CPSC 233 Tutorial 01 & 05 Jan 19 Edwin Chan. ■“Office”: ICT 524 –Please me ■Continuous Tutorial: Thursdays, 12-2PM (outside MS.
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
BlueJ X ICSE Syllabus. Board Pattern THEORY (100 marks) PRACTICAL (100 marks) PROJECT (50 marks) ASSIGNMENTS (50 marks)
CS 201 Lecture 1 (b) Using an IDE Tarik Booker CS 201: Introduction to Programming California State University, Los Angeles.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
Development Environment
String Output ICS 111: Introduction to Computer Science I
Your First Java Application
How to Run a Java Program
JCreator Settings Only
How to Run a Java Program
BlueJ: a very quick introduction
An Introduction to Java Language
An Introduction to Java Language
Review of Previous Lesson
Presentation transcript:

Agenda For Feb PowerPoint Presentation (Introduction to Java Methods) 2.Finish Unit 2 exercises on page 13 (due by the end of the class today). 4. If you finish all the above read Unit 3 carefully and try Section 3.1 Mastery Questions 1, 2, & 3 (page 18) Section 3.2 Mastery Question (page 19) Unit 3 Exercises 1-3 (page 20) 3. Assignment 2 (Also to be handed in by the end of Friday).

Java Methods Methods contain a group of instructions that together perform a single task. For example if I want to perform the task of “making a pizza”, I would have to do the following: 1. Make the dough 2. Make the pizza sauce 3. Put sauce on the pizza 4. Put toppings on the pizza 5. Cook the pizza

Java Methods So when we say “make a pizza” we mean do all those instructions. Lucky for us we don’t talk using such detail because conversations would take for ever! If it takes one instruction to draw a single line how many instructions does it take to draw one of these polygons? 100 of them?

Java Methods A Different approach to this problem is to create a method that draws one polygon. We can then use that method to draw as many polygons as we want. This will cut down the number of instructions we’d have to write.

Java Methods General structure of a Java method: public void method_name () { // instruction 1 // instruction 2 // instruction 3 // … }

Java Methods Our method for drawing a polygon would look like this. public void drawPolygon () { /* instruction for drawing line 1 instruction for drawing line 2 instruction for drawing line 3 … */ }

Java Methods Methods contain a group of related instructions for the computer. For the time being we will be using methods that already exist in Java. Later in the course we will be creating our own methods from scratch. Some example of already defined Java methods are: drawString(“Anything I want goes here”, x, y); drawRect(width, height, x, y); setColor(Color.blue);

The import Statement Many useful Java Applet methods and variables are located in pre-made packages. If a programmer wants to use one of these methods or variables he or she must first import the package that it belongs to. Otherwise the compiler will not know where that special word came from. Import statements are used to import these useful packages. Examples of some Java special words we will be using are: AppletJava Applet Template (so we can create Applets) GraphicsJava Applet Variable (lets us draw to the screen) paintJava Applet method initJava Applet method ColorVariable

Java Download Websites Java Developers Kit (Compiler) JCreator: A Java Text Editor (For Windows) Be sure to select JCreator LE version Instructions on installing JDK and JCreator

JDK Java Development Kit The JDK is a free compiler for Java offered by Sun Microsystems. Project Builder is the visual interface for the compiler. In other words Project builder is a program that allows us to use the JDK in an easy (user-friendly) fashion. Project Builder provides us with, windows, buttons, command icons, text-editor etc. Otherwise we would have to use the command line to compile our Java source code. The command to compile Java source files using just the JDK (with no Project Builder) would be: javac mySourceFile.java appletviewer MyHtmlFile.html Then to run your Applet you would type