1.1 Introduction to Java - KFUPMConventional Program IOICOIOOOIOCCOOICOÍ n 1 1 101000010000100 Java...

9
1.1 Introduction to Java 1.1 Introduction to Java

Transcript of 1.1 Introduction to Java - KFUPMConventional Program IOICOIOOOIOCCOOICOÍ n 1 1 101000010000100 Java...

Page 1: 1.1 Introduction to Java - KFUPMConventional Program IOICOIOOOIOCCOOICOÍ n 1 1 101000010000100 Java Program 1110100100010000010 1000 Compiler SPARC Compiler Macintosh Compiler Java

1.1 Introduction to Java1.1 Introduction to Java

Page 2: 1.1 Introduction to Java - KFUPMConventional Program IOICOIOOOIOCCOOICOÍ n 1 1 101000010000100 Java Program 1110100100010000010 1000 Compiler SPARC Compiler Macintosh Compiler Java

2

• Name: Salahadin Mohammed

• Office: Bldg. 22, Room 102

• Off. Hrs: TBA

• Phone: 1721

• Email: [email protected]

Page 3: 1.1 Introduction to Java - KFUPMConventional Program IOICOIOOOIOCCOOICOÍ n 1 1 101000010000100 Java Program 1110100100010000010 1000 Compiler SPARC Compiler Macintosh Compiler Java

• Textbook:

- “ABSOLUTE JAVA” by WALTER SAVITCH, Addison Wesley, or 2nd edition, 2005.

- Grade Distribution :

3

Page 4: 1.1 Introduction to Java - KFUPMConventional Program IOICOIOOOIOCCOOICOÍ n 1 1 101000010000100 Java Program 1110100100010000010 1000 Compiler SPARC Compiler Macintosh Compiler Java

• Web Site: http://www.ccse.kfupm.edu.sa/ics102

• Discussion: webcourses.kfupm.edu.sa

• Regarding Class Work..Homework

Quizzes

Problem Solving (Participation)

© Abdullah K. Al-ZamelICS 102 - Introduction to Computing I

Page 5: 1.1 Introduction to Java - KFUPMConventional Program IOICOIOOOIOCCOOICOÍ n 1 1 101000010000100 Java Program 1110100100010000010 1000 Compiler SPARC Compiler Macintosh Compiler Java
Page 6: 1.1 Introduction to Java - KFUPMConventional Program IOICOIOOOIOCCOOICOÍ n 1 1 101000010000100 Java Program 1110100100010000010 1000 Compiler SPARC Compiler Macintosh Compiler Java

public class Example01 {

public static void main(String[] args) {

System.out.println(“Hello ICS 102”)

}

}

© Abdullah K. Al-ZamelICS 102 - Introduction to Computing I

Page 7: 1.1 Introduction to Java - KFUPMConventional Program IOICOIOOOIOCCOOICOÍ n 1 1 101000010000100 Java Program 1110100100010000010 1000 Compiler SPARC Compiler Macintosh Compiler Java

© Abdullah K. Al-ZamelICS 102 - Introduction to Computing I

Page 8: 1.1 Introduction to Java - KFUPMConventional Program IOICOIOOOIOCCOOICOÍ n 1 1 101000010000100 Java Program 1110100100010000010 1000 Compiler SPARC Compiler Macintosh Compiler Java

import javax.swing.JOptionPane;

public class Example02 {

public static void main(String[] args) {

String ans;

ans = JOptionPane.showInputDialog(null, "Speed in miles per hour?");

double mph = Double.parseDouble(ans);

double kph = 1.621 * mph;

JOptionPane.showMessageDialog(null, "KPH = " + kph);

}

}

© Abdullah K. Al-ZamelICS 102 - Introduction to Computing I

Page 9: 1.1 Introduction to Java - KFUPMConventional Program IOICOIOOOIOCCOOICOÍ n 1 1 101000010000100 Java Program 1110100100010000010 1000 Compiler SPARC Compiler Macintosh Compiler Java

ENDEND