1 / 34

Programming with Java

Programming with Java . COP 2800 Lake Sumter State College Mark Wilson, Instructor. Programming with Java. Introductions. Around the Room. Who are you? What is your current educational goal? What do you know about computers and programming?

dorjan
Download Presentation

Programming with Java

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 with Java COP 2800 Lake Sumter State College Mark Wilson, Instructor

  2. Programming with Java Introductions

  3. Around the Room Who are you? What is your current educational goal? What do you know about computers and programming? Why are you here (what do you want to get out of this course)?

  4. The Instructor Mark Wilson (wilsonm@lssc.edu) Software Engineer and IT Manager Since 1980 BA, Psychology from Stetson, 1977 MS, Computer Information Systems from FIT, 2011

  5. Programming with Java Syllabus

  6. Textbook and Reference • Head First Java • By Kathy Sierra, Bert Bates • Publisher: O'Reilly Media • Released: February 2005 • ISBN: 978-0596009205 • Oracle Java SE Documentation • http://www.oracle.com/technetwork/java/javase/documentation/api-jsp-136079.html?ssSourceSiteId=ocomen

  7. Development Environment • You must have access to a computer to successfully complete this course • Required • Windows 7 SP1 or Windows 8.1 • Oracle Java SE JDK 7u45 or later • Eclipse IDE for Java Developers – Kepler SR 1 or later • Optional (time permitting) • Google Android SDK with ADT bundle or • Google Android Studio

  8. Objective and Outcomes Learn fundamentals of programming using Java Use the constructs of the Java programming language as building blocks to develop correct, coherent programs. Analyze problems, develop object-oriented designs that solve those problems, and transform those designs to Java programs. Understand the fundamentals of object-oriented programming using the Java programming language. Program using the fundamental software development process, including design, coding, documentation, testing, and debugging.

  9. Performance Measurement • Programming assignments 50% • Must compile and run without error. • Must meet the requirements. • Must include adequate documentation. Spelling and grammar count. • Must follow published coding standards • Must demonstrate good programming practices. • Must be turned in electronically no later than midnight of the due date. • Mid-term exam 15% • Term project 20% • Final exam (cumulative) 15%

  10. Attendance Roll each class session via sign-in list You should make every effort to attend each class meeting since class discussion will include material not found in the textbook. Withdrawal deadline: Friday, March 21, 2014

  11. Programming with Java History

  12. In the Beginning… Computers were programmed using 1’s and 0’s Each computer had it’s own “machine language” All programs, including operating systems had to be completely rewritten for each new computer Debugging approached impossible

  13. Assembly Engineers started seeing patterns Effective debugging required human readable instructions Assemblers converted human readable code to machine language Assembly language tended to remain the same for a given model line

  14. Compilers The next level of abstraction Programmers needed to be able to port code to many other computers Early compilers created assembly language Current compilers generate machine language FORTRAN – FORmulaTRANslating System COBOL – COmmonBusiness-Oriented Language

  15. Procedural Programming Fortran and Cobol are difficult languages Kemeny and Kurtz (Dartmouth) created BASIC (Beginner's All-purpose Symbolic InstructionCode) in 1964 to teach programming concepts Implemented as an interpreter in the 70’s CBASIC compiled to intermediate code Visual Basic is BASIC in name only

  16. Structured Programming • Method to • Produce provably correct code • Improve clarity (readability) • Reduce development time • Defined a small set of well formed constructs and rules for their use • Bohm, Jacopini, Dijkstra, Hoare, et. al. • Came to the fore in 1970’s • ALGOL, Pascal, PL/1, JOVIAL, C

  17. Object Oriented Programming • A method to: • Increase understanding. • Reduce maintenance. • Support evolution. • Concepts as objects • Objects have attributes and behaviors • Extends structured programming concepts • Components based development • Smalltalk, Ada, C++, C#, Java

  18. Enter Java • Originally developed by Sun Microsystems • Became an Oracle product when Oracle bought Sun • Abstracted from the hardware • Java Virtual Machine • Integral Object Oriented Programming • Derived from C and C++ • Portable code • Interpreter • Machine independent “bytecode”

  19. Why Java Web development (deprecated) Server room applications Legacy applications Android applications

  20. Programming with Java Java and the Virtual Machine

  21. Classic Von Neumann CPU

  22. The Java Virtual Machine

  23. Programming in Java Development Environment

  24. Java SE • Java Platform, Standard Edition • JDK – Java for developers • Server JRE – Server version of Java Runtime Environment • JRE – Java Runtime Environment for end-users • Free download from Oracle • http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html • Install using defaults

  25. Eclipse for Java • Integrated Development Environment • Open Source Software • Eclipse IDE for Java Developers • Code Recommenders Developer Tools • Eclipse Git Team Provider • Eclipse Java Development Tools • Maven Integration for Eclipse • Mylyn Task List • WindowBuilder Core • Eclipse XML Editors and Tools • Download and extract • Must be able to find Java (Java in the path)

  26. Programming with Java Hello World

  27. Origins of Hello World • Formally introduced by Kernighan and Richie • Introduces basics for • Minimum required source code • Fundamental syntax • Build process from source to executable

  28. Hello World for Java /* * The HelloWorldApp class implements an application that * simply prints "Hello World!" to standard output. */ public class HelloWorldApp{ public static void main(String[] args) { System.out.println("Hello, World"); } }

  29. Hello World for Java /* * The HelloWorldApp class implements an application that * simply prints "Hello World!" to standard output. */ public class HelloWorldApp{ public static void main(String[] args) { System.out.println("Hello, World"); } } Block comments begin with /* and end with */. Nothing in between executes.

  30. Hello World for Java /* * The HelloWorldApp class implements an application that * simply prints "Hello World!" to standard output. */ public class HelloWorldApp{ public static void main(String[] args) { System.out.println("Hello, World"); } } Everything in Java is a class including the application which must be public.

  31. Hello World for Java /* * The HelloWorldApp class implements an application that * simply prints "Hello World!" to standard output. */ public class HelloWorldApp{ public static void main(String[] args) { System.out.println("Hello, World"); } } Classes (and other blocks of code) are enclosed in “curly braces”.

  32. Hello World for Java /* * The HelloWorldApp class implements an application that * simply prints "Hello World!" to standard output. */ public class HelloWorldApp{ public static void main(String[] args) { System.out.println("Hello, World"); } } Classes contain attributes and methods or behaviors. This is a method. Every application class must have a main method and it must be public.

  33. Hello World for Java /* * The HelloWorldApp class implements an application that * simply prints "Hello World!" to standard output. */ public class HelloWorldApp{ public static void main(String[] args) { System.out.println("Hello, World"); } } A method within a class within another class.

  34. Hello World for Java /* * The HelloWorldApp class implements an application that * simply prints "Hello World!" to standard output. */ public class HelloWorldApp{ public static void main(String[] args) { System.out.println("Hello, World"); } } Let’s see how it works…

More Related