1 / 30

Programming Software Applications Week 1 Dr. Xiaohong Gao Trent Park – B107, ext. 2252

Programming Software Applications Week 1 Dr. Xiaohong Gao Trent Park – B107, ext. 2252 x.gao@mdx.ac.uk. Course Objectives (1/2). Upon completing the course, you will understand : Java applications Primitive data types Java control flow Methods Object-oriented programming Inheritance

infinity
Download Presentation

Programming Software Applications Week 1 Dr. Xiaohong Gao Trent Park – B107, ext. 2252

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Programming Software Applications Week 1 Dr. Xiaohong Gao Trent Park – B107, ext. 2252 x.gao@mdx.ac.uk

  2. Course Objectives (1/2) Upon completing the course, you will understand : • Java applications • Primitive data types • Java control flow • Methods • Object-oriented programming • Inheritance • Polymorphism • Core Java classes (Swing) • Graphics

  3. Course Objectives (2/2) You will be able to : • Write applications • Develop a simple GUI interface • Write interesting projects • Establish a firm foundation on Java concepts

  4. Learning Patterns • Lecturer(1.5 hours): theory with sample programs • Labs (1.5 hours) : Practice theory using Java programs • Workshops/seminars: discussion/reflection

  5. Assessment Pattern • Exam (3 hours) ---- 70 Course work ---- 30% 2 Mini-tasks 10% Project 20% Note: You have to pass both coursework and exam in order to pass the module.

  6. Contact Information • Duty tutor time • Friday, 12:30-13:30, Bevan Building • Email x.gao@mdx.ac.uk • Learning Materials http://www.cs.mdx.ac.uk/staffpages/xiaohong/cmt4001

  7. Introduction to Java Objectives What Is Java? • Getting Started With Java Programming • Compiling and Running a Java Application • Compiling and Running a Java Applet

  8. Example 1 --- Using TextPad

  9. 2. File  New 3. File  Save As  Hello1.java

  10. 3. Tools  Compile Java

  11. 4. Tools  Run Java Application

  12. What Is Java? • History • Characteristics of Java

  13. History • James Gosling • Oak • Java, May 20, 1995, Sun World • HotJava • The first Java-enabled Web browser

  14. Characteristics of Java • Java is simple • Java is object-oriented • Java is distributed • Java is interpreted • Java is robust • Java is secure

  15. Characteristics of Java • Java is architectural-neutral • Java is portable • Java’s performance • Java is multithreaded • Java is dynamic

  16. JDK Versions • JDK 1.02 (1995) • JDK 1.1 (1996) • Java 2 SDK v 1.2 (a.k.a JDK 1.2, 1998) • Java 2 SDK v 1.3 (a.k.a JDK 1.2, 2000) • Java 2 SDK v 1.4

  17. Java IDE Tools • Inprise JBuilder (RAD) (www.inprise.com) • Microsoft Visual J++ (www.microsoft.com) • Visual Café by WebGain (www.webgain.com) • JFactory by Rouge Wave (www.rougewave.com) • Forte by Sun (www.javasoft.com) • IBM Visual Age for Java (RAD) (www.ibm.com)

  18. Getting Started with Java Programming • A Simple Java Application Compiling Programs Executing Applications • A Simple Java Applet Viewing Java Applets • Applications vs. Applets

  19. A Simple Application Example: //This application program prints Welcome //to Java! public class Welcome { public static void main(String[] args) { System.out.println("Welcome to Java!"); } }

  20. Compiling Programs • On command line • javac file.java

  21. Executing Applications • On command line • java classname

  22. Example javac Welcome.java java Welcome output:...

  23. A Simple Applet (Optional) Example /* This is an example of Java applets */ import java.awt.Graphics; public class WelcomeApplet extends java.applet.Applet { public void paint (Graphics g) { g.drawString("Welcome to Java!",10,10); } }

  24. Creating an HTML File <html> <body> <applet code="WelcomeApplet.class" width = 100 height = 40> </applet> </body> </html>

  25. Viewing Java Applets

  26. Applet Viewer Utility appletviewer htmlfile.html Example: appletviewer WelcomeApplet.html

  27. Applications vs. Applets • Similarities • Differences

  28. Security Restrictions on Applets • Applets are not allowed to read from, or write to, the file system of the computer viewing the applets. • Applets are not allowed to run any programs on the browser’s computer. • Applets are not allowed to establish connections between the user’s computer and another computer except with the server wherethe applets are stored.

  29. Java books • Dietel & Dietel • “Advanced Java 2 Platform -How to program” • Prentice Hall,last edition • Judith Bishop • “Java Gently,Third edition,Addison-Wesley”

  30. Summary • Introduction to the module • Java characteristics

More Related