COMBO1 - COP 3503 Slides 1/9 Today's Topics Downloading...

Info iconThis preview shows pages 1–33. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: COP 3503 Slides 1/9 Today's Topics Downloading Java Algorithm Analysis (Recommended reading: Chapter 2) Downloading Java Downloading Java Downloading Java Downloading Eclipse Downloading Eclipse Creating a Java Program With Eclipse Creating a Java Program With Eclipse Creating a Java Program With Eclipse Creating a Java Program With Eclipse Creating a Java Program With Eclipse Running a Java Program With Eclipse Running a Java Program With Eclipse Double-click Java Application Running a Java Program With Eclipse Running a Java Program Using Command Line Running a Java Program Using Command Line Running a Java Program Using Command Line Running a Java Program Using Command Line Add the path of the bin directory of your JDK install to your path environment variable my case: In my case: C:\Program Files\Java\jdk1.5.0_04\bin Running a Java Program Using Command Line Running a Java Program Using Command Line Running a Java Program Using Command Line If you get the error: Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp Make sure youre in the same directory as your .java file and that you typed everything correctly If you still get the error, type at the command line: set CLASSPATH= Running Time Approximation In many sciences (such as physics) time can be measured and predicted very precisely with comparative ease Computer Science, the exact running In Computer Science, the exact running time of an algorithm is nearly impossible to predict Running Time Approximation Why is running time so hard to predict exactly? The details of the computer's architecture are nknown in general unknown in general The operating system is unknown What else the computer is doing is unknown The exact mapping from high level code to machine instructions is unknown And so on and so forth Running Time Approximation We can still make useful running time predictions using order notation (e.g. Big-O) Algorithm Analysis Why bother? Faster is better Less memory is better Algorithm Analysis The importance of efficiency: log n n n 2 n 3 2 n n! 1 1 1 1 1 2 1 3 00 ,000 ,024 ,628,800 10 3 10 100 1,000 1,024 3,628,800 100 7 100 10,000 1,000,000 1.3*10 30 9.3*10 157 1,000 10 1,000 1,000,000 1*10 9 1.1*10 301 4.0*10 2567 10,000 13 10,000 1*10 8 1*10 12 2.0*10 3010--- 100,000 17 100,000 1*10 10 1*10 15------ 1,000,000 20 1,000,000 1*10 12 1*10 18------ Example Analyze the following code fragment for (int i=1; i<= 2*n; i++) x = x + 1; Analyze the following code fragment for (int i=1; i <= 3*n; i++) for (int j=1; j <= n/2; j=j+3) x = x + 1; Example Analyze the following code fragment int j = n; while (j >= 1) { or (int i=1; i<=j; i++) for (int i=1; i<=j; i++) x = x + 1; j = j/3; } COP 3503 Slides 1/11 Today's Topics Algorithm Analysis (Recommended reading: Chapter 2) Big-O There are: Lies Damn lies ig Big-O Big-O...
View Full Document

This note was uploaded on 04/18/2008 for the course JAVA CDA 4506 taught by Professor Eisler during the Spring '08 term at University of Central Florida.

Page1 / 191

COMBO1 - COP 3503 Slides 1/9 Today's Topics Downloading...

This preview shows document pages 1 - 33. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online