CPSC150 Fall 2008 Dr. L. Lambert. CPSC150 Overview Syllabus Use Textbook, ask questions, extra thorough, I will post sections covered All information.

Slides:



Advertisements
Similar presentations
Object Oriented Programming in Java George Mason University Fall 2011
Advertisements

Dale Roberts Introduction to Java - First Program Dale Roberts, Lecturer Computer Science, IUPUI Department of Computer and.
Welcome to Java Programming. Why do I want to take this course? I want to major in EE/CSE. ECE122 is a requirement. Java is hot in Job market. It is useful.
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.
James Tam Introduction to CPSC 233 CPSC 233: Introduction to Computers II Object-oriented programming The "nuts and bolts" of programming Object-oriented.
How do we make our Welcome.java program do something? The java in our Welcome.java file won’t do anything by itself. We need to tell the computer to execute.
Introduction to Java Lab CS110A – Lab Section 004 Instructor: Duo Wei.
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,
26-Jun-15 Getting Ready for CIT Labs Lab is scheduled for 3;00-4:30 Fridays in Moore 207 Lab is not in Towne 309 (Registrar has it wrong) Everyone.
Begin Java having used Alice Pepper - Some slides from Alice in Action with Java.
Introduction to Java A lab course by Dr. Junaid Ahmed Zubairi SUNY Fredonia.
How do we make our Welcome.java program do something? The java in our Welcome.java file won’t do anything by itself. We need to tell the computer to execute.
30-Jun-15 Getting Ready for CIT Labs Lab is scheduled for 1:30-3:00 Fridays in Moore 207 Lab is not in Towne 313 (Registrar has it wrong) Everyone.
Honors 101, Fall 2006 Please do not sit in back of room! Lots of info on web page Join the mailing list Download Eclipse and start using it Read the text.
Chapter 2: Java Fundamentals Java Program Structure.
CS0007: Introduction to Computer Programming Setting Up Java.
IB Computer Science II Paul Bui
 Mary Jane Heider ◦ Director, Academic Computing ◦  Judie Littlejohn ◦ Online Learning ◦
CS110/CS119 Introduction to Computing (Java)
Summer  Session starts at 11:00 am ◦ We’ll be online shortly ◦ Speaker test starts about 10:45  To ask questions, ◦ use the chat window.
CSCI 273: Processing An Introduction. Programming Languages –An abstract "human understandable" language for telling the computer what to do –The abstract.
EDW647: Internet for Educators Dr. Roger Webster Department of Computer Science Millersville University July 23, 2008 Create.
CPSC150 Spring 2007 Dr. L. Lambert. CPSC150 Overview Syllabus Use Textbook, ask questions, extra thorough, I will post sections covered All information.
Session One Introduction. Personal Introduction Role of programmers Robot Examination HUD & HID Uploading Code.
FRST JAVA PROGRAM. Getting Started with Java Programming A Simple Java Application Compiling Programs Executing Applications.
OOP (Java): Simple/ OOP (Java) Objectives – –give some simple examples of Java applications and one applet 2. Simple Java Programs Semester.
CSc2010 Lab Fall 2015 Bing Li. Contact  Name : Bing Li   Website : cs.gsu.edu/~bli6  Office : Suntrust.
FALL 2011 TECHNICAL ORIENTATION. Session starts at 11:00 am We’ll be online shortly Speaker test starts about 10:45 To ask questions, use the chat window.
Java and C# [this is a bonus – it is not a required lesson] ACO101: Introduction to Computer Science.
© 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
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.
Basics of Java IMPORTANT: Read Chap 1-6 of How to think like a… Lecture 3.
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.
CHAPTER 3 GC Java Fundamentals. 2 BASICS OF JAVA ENVIRONMENT  The environment  The language  Java applications programming Interface API  Various.
JAVA PROGRAMMING BASICS CHAPTER 2. History of Java Begin with project Green in 1991 founded by Patrick Noughton, Mike Sheridan and James Gosling who worked.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
Technical Orientation Summer Technical Orientation Session starts at 2:00 pm – We’ll be online shortly – Speaker test starts about 1:45 pm To ask.
EIE375 BlueJ: Getting Started Dr Lawrence Cheung.
Mixing integer and floating point numbers in an arithmetic operation.
TECHNICAL ORIENTATION WINTER Technical Orientation Session starts at 2:00 pm We’ll be online shortly Speaker test starts about 1:45 To ask questions,
Technical Orientation Summer Technical Orientation  Session starts at 11:00 am  We’ll be online shortly  Speaker test starts about 10:45  To.
Object Oriented Programming (OOP) LAB # 1 TA. Maram & TA. Mubaraka TA. Kholood & TA. Aamal.
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
Lecture1 Instructor: Amal Hussain ALshardy. Introduce students to the basics of writing software programs including variables, types, arrays, control.
3/5/2002e-business and Information Systems1 Java Java Java Virtual Machine (JVM) Java Application Program Interface (API) HW Kernel API Application Programs.
ITP 109 Week 2 Trina Gregory Introduction to Java.
1/16: Intro to Java, Languages, and Environments Types of programming languages –machine languages –assembly languages –high-level languages Java environment.
Computer Science I Lab 1 ISMAIL ABUMUHFOUZ | CS 180.
Your Choices, Your Future A simple guide. All applications for 6 th form places, college courses and apprenticeships will be made through one website.
CS 201 Lecture 1 (b) Using an IDE Tarik Booker CS 201: Introduction to Programming California State University, Los Angeles.
Introduction to java (class and object). Programming languages: –Easier to understand than CPU instructions –Needs to be translated for the CPU to understand.
Introduction to programming in java
Content Programming Overview The JVM A brief look at Structure
Object-Oriented Programming Using Java
GC101 Introduction to computer and program
Chapter 3 GC 101 Java Fundamentals.
Eclipse Navigation & Usage.
Text by: Lambert and Osborne
Programming without BlueJ Week 12
How to Run a Java Program
Hands-on Introduction to JAVA
Introduction to Algorithm Design
Java Intro.
How to Run a Java Program
How Java Program Executes
IB Computer Science II Paul Bui
Chapter 2: Java Fundamentals
Review of Previous Lesson
Presentation transcript:

CPSC150 Fall 2008 Dr. L. Lambert

CPSC150 Overview Syllabus Use Textbook, ask questions, extra thorough, I will post sections covered All information and assignments posted on CPSC150 web page: For anything you don’t see on the web page, send me All grades posted on Blackboard

Success in this Class Collaborative Come prepared to work in class Take notes; pay attention; ask questions Never procrastinate Don’t assume you know/can program easily Come see me/Java expert early and often Ask questions Consult with (possibly non-expert) peers, but be careful. >50% of your grade is exams. Make sure you are doing your own work before you take the exam

Success in the Department Join ACM, IEEE, SWE Study with others. –Right now, find others and exchange: major, contact information, one thing about you Sign up for department info. 1.open browser, go to 2.click on mailing lists, and students and careers 3.Subscribe using an address that you read regularly

Using Java and Jedit We will use Jedit for program development JEdit is editor – lots of others (e.g., Eclipse) free and available for Mac, Windows, UNIX (download Java 1.5 first): (Download SDK, NOT JRE) Download jedit for your home machines for development:

Next Steps Running Java Code Reading Java Code Writing Java Code

PC, Linux, Mac, Unix Operating System and Computer Java Virtual Machine Java ByteCode Figure 1.5 from textbook

Java program (Source Code) Compiler Java Byte Code Program (Object Code) JVM runs program Output of program

Reading Source Code A Java program import package; // if any // comments and /* … */ and /** javadoc here */ public class Name { // entire program in here. For now, main only public static void main(String[ ] args) { // put code here }

Write, Compile and Test Listing Figure 1.1, page 15 // This application program prints Welcome to Java! public class Welcome { public static void main(String[] args) { System.out.println("Welcome to Java!"); } // Green part is the same in every program // Black is the program

Three Steps to A Program 1.Type program (in JEdit) 2.Compile program (using javac) 3.Run program (using java)

1.Type program Open Jedit. Type program. Save. public class Welcome { public static void main(String[] args) { System.out.println("Welcome to Java!"); } Save as classname +.java –File name MUST be class name +.java (Welcome.java in this case)

2. Compile program 1.Go to Start 2.Choose Run … 3.Type cmd in box 4.Type javac Welcome.java – need ‘c’ and ‘.java’

Run program 1.If errors, fix them 2.If no errors, you will see a prompt 3.Run your program: java (no ‘c’) program (no.java) at prompt: java Welcome

Parts to a program Class name –must be same as file name main function –required for every Java program { }s around class and around main ‘;’ at the end of every statement in a function System.out.println for printing

Write a program that prints “My name is …” (fill in your name). Save it to your username.