Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 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 book: we’ll quickly go through Chapters 1-5 COME TO CLASS AND PARTICIPATE! Attendance is required!

2 Introduction to Computer Science CS is lots of things Key to all sides of CS is learning to be a good programmer Not easy to teach or learn; like writing, comes with experience Experimentation is a crucial part of the learning process Documentation is a critical part of programming

3 Why Java? Relatively simple, but general-purpose Object-oriented, but with imperative basics Interpreted/Compiled Robust/secure Architectural-neutral/portable High-performance Multithreaded and distributed Clean! Powerful

4 API, Java 2SE, JDK, IDE and JVM The Application Programming Interface contains many predefined “classes” (and “interfaces”) upon which we will build. It is controlled by Sun. The Java 2 Standard Edition is the current language standard (for applications and applets). The Java Development Kit from Sun is a set of programs for developing, compiling and testing Java programs. The current version is JDK 5.0 (often called JDK 1.5). Integrated Development Environments, built on top of the JDK, make using Java much more convenient. We will use Eclipse (free, from IBM). The JDK compiles programs to “Java byte code”, which are then executed on the Java Virtual Machine by translating to “native” machine language.

5 Intro to Java: Fundamentals First Required text book by Liang Part I (chapters 1-6): Fundamentals of Programming, that is using the traditional imperative/procedural model Part II (chapters 7-11): Object-oriented programming Part III (chapters 12-16): GUI programming Part IV (chapters 17-19): Exceptions, I/O, recursion We’ll cover almost the whole book

6 Chapter 1: Introduction Please read it before next class. Intro to computers, number systems and Java

7 Chapter 2: Data types and operations Please read this also before next class Identifiers Variables Assignment statements, expressions Primitive types, strings Output: System.out.println Input: JOptionPane.showInputDialog

8 Chapter 3: Conditional statements Read as soon as possible Boolean type If statement Switch statement Precedence

9 Chapter 4: Loops Read as soon as possible While loop Do-while loop For loop Nested loops

10 Chapter 5: Static methods Read as soon as possible We’ll spend some time on this

11 Chapter 6: Arrays No rush to read this yet We’ll spend some time on this too

12 Applications and Applets A Java application is a stand-alone Java program An applet is a Java program that can be run from a web browser, using a graphical user interface (GUI) Application programs can also use GUIs (using AWT or Swing (better)) Swing GUI classes all begin with J

13 Homework (Programming Assignments) Essential to do the homework on time Substantial part of grade will be based on homework First assignment will be given next week Sometimes assignments will be multistaged Getting help from other students is OK ONLY IF YOU DOCUMENT CLEARLY IN THE COMMENTS EXACTLY WHAT HELP YOU GOT AND FROM WHOM See departmental policy on cheating See me EARLY if you are having trouble

14 Placement Are you in the right class? You should have had some programming experience and be eager to learn You should not already be a Java expert! If you are, let’s talk after class. If you’ve taken a Java course already, let’s talk after class.

15 Eclipse State of the art, powerful, easy to use, free Download it and run a SHORT program before next class, and email it to me

16 Pitfalls to watch for using Eclipse Create ONE project the first time you use it. Adding and deleting projects is asking for trouble… Then create ONE new class, also giving it a package name if you like.. **** Make sure the class name starts with a Capital letter! **** projectNames, packageNames and identifierNames should start with lowerCase final variables (constants) should be in UPPER_CASE

17 Running a Program Get the syntax bugs out first – you can see immediately where the bugs are, if not how to fix them When you run the program the first time, you have to select your ClassName from the menu that comes up: it won’t work if it does not start with a CapitalLetter! ECLIPSE DEMO


Download ppt "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."

Similar presentations


Ads by Google