Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.

Slides:



Advertisements
Similar presentations
Copyright © 2003 by Prentice Hall Computers: Tools for an Information Age Chapter 15 Programming and Languages: Telling the Computer What to Do.
Advertisements

Computers Are Your Future
Chapter 1 Object-Oriented System Development
Introduction To System Analysis and Design
Object Oriented System Development with VB .NET
Computers: Tools for an Information Age
Java Programming, 3e Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Your Interactive Guide to the Digital World Discovering Computers 2012 Chapter 13 Computer Programs and Programming Languages.
Introduction to Java. What is Java? A computer programming language that can be run as either an application or an applet. –What is the difference? It.
Visual Basic Introduction IDS 306 from Shelly, Cashman & Repede Microsoft Visual Basic 5: Complete Concepts and Techniques.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Building Applications.
Your Interactive Guide to the Digital World Discovering Computers 2012.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
Chapter 1 Introduction to Computers and C++ Programming.
Chapter 13 Programming Languages and Program Development 1.
Introduction To System Analysis and design
Java Programming, 2E Introductory Concepts and Techniques Chapter 2 Creating a Java Application and Applet.
Programming Languages: Telling the Computers What to Do Chapter 16.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
CSE 1340 Introduction to Computing Concepts Class 2.
Microsoft Visual Basic 2005: Reloaded Second Edition
UNIVERSITI TENAGA NASIONAL “Generates Professionals” CHAPTER 4 : Part 2 INTRODUCTION TO SOFTWARE DEVELOPMENT: PROGRAMMING & LANGUAGES.
111 © 2002, Cisco Systems, Inc. All rights reserved.
CHAPTER ONE Problem Solving and the Object- Oriented Paradigm.
CSE 1340 Class 3. Class 03 objectives State the difference between Machine Language vs. High Level Languages Discuss some characteristics of the Java.
Unified Modeling Language, Version 2.0
Introduction To System Analysis and Design
CMPE13Cyrus Bazeghi 1 Programming Languages Telling computers what to do.
Computer Concepts 2014 Chapter 12 Computer Programming.
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
1 Chapter 13 Understanding Computers, 11 th Edition 13 Program Development and Programming Languages TODAY AND TOMORROW 11 th Edition CHAPTER.
Systems Analysis and Design in a Changing World, 3rd Edition
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
CT1513 Introduction To java © A.AlOsaimi.
Software Development Programming & Languages. Programming: A Five-Step Procedure Define the problem Design a solution Code the program Test the program.
Connecting with Computer Science2 Objectives Learn how software engineering is used to create applications Learn some of the different software engineering.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
1 Unified Modeling Language, Version 2.0 Chapter 2.
Chapter 14 Programming and Languages McGraw-Hill/Irwin Copyright © 2008 by The McGraw-Hill Companies, Inc. All rights reserved.
Creating a Java Application and Applet
Java Programming: Advanced Topics1 Introduction to Advanced Java Programming Chapter 1.
Basic Characteristics of Object-Oriented Systems
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 1 An Introduction to Visual Basic.NET and Program Design.
Programming 2 Intro to Java Machine code Assembly languages Fortran Basic Pascal Scheme CC++ Java LISP Smalltalk Smalltalk-80.
Introduction to JAVA Programming
Java Programming, 3e Concepts and Techniques Chapter 1 Section 56 – An Introduction to Java.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Your Interactive Guide to the Digital World Discovering Computers 2012 Chapter 13 Computer Programs and Programming Languages.
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
Introduction to Advanced Java Programming
Systems Analysis and Design With UML 2
Objectives Overview Differentiate between machine and assembly languages Identify and discuss the purpose of procedural programming languages, and describe.
An Introduction to Visual Basic .NET and Program Design
VISUAL BASIC – CHAPTER ONE NOTES An Introduction to Visual Basic
Chapter 1 Introduction(1.1)
and Program Development
Presentation transcript:

Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design

Chapter 1: An Introduction to Java and Program Design 2 Objectives Describe characteristics of Java Explain the uses of Java and identify types of Java programs Identify the phases in the program development life cycle Define programs, programming, and applications Read, explain, and create an object structure diagram

Chapter 1: An Introduction to Java and Program Design 3 Objectives Read, explain, and create an event diagram Explain object-oriented programming (OOP) and object-oriented design (OOD) Define the terms objects, attributes, methods, and events Define and explain encapsulation, inheritance, and polymorphism

Chapter 1: An Introduction to Java and Program Design 4 Objectives Describe rapid application development (RAD) Identify key components of the Java Software Development Kit (SDK)

Chapter 1: An Introduction to Java and Program Design 5 Introduction A program is a step-by-step series of instructions for a computer Programming is the process of writing these instructions Programmers, or developers, design and write programs using a programming language or development tool Java is a programming language that provides the structure for efficient and economical programs

Chapter 1: An Introduction to Java and Program Design 6 What Is Java? High-level language Object-oriented –Data and operations are packaged into a single unit called an object Basic syntax derived from C, C++, and Smalltalk –Designed by a team from Sun Microsystems led by James Gosling in the early 1990’s

Chapter 1: An Introduction to Java and Program Design 7 What Is Java? Parsimonious –Compatible with older versions Robust –Strongly typed and incorruptible data Secure –Protection against misuse of code Portable –Platform-independent

Chapter 1: An Introduction to Java and Program Design 8 Java Program Types Console and Windowed applications Applets Servlets Web Services JavaBeans

Chapter 1: An Introduction to Java and Program Design 9 Console Applications Stand-alone programs using a command- line interface

Chapter 1: An Introduction to Java and Program Design 10 Windowed Applications Stand-alone programs using a graphical user interface (GUI)

Chapter 1: An Introduction to Java and Program Design 11 Applets Client-side programs executed within a Web browser

Chapter 1: An Introduction to Java and Program Design 12 Servlets Server-side programs hosted and run on a Web server Used in conjunction with Java Server Pages (JSP) to provide sophisticated server-side logic Enable connections to server databases through Java Database Connectivity (JDBC)

Chapter 1: An Introduction to Java and Program Design 13 Servlets

Chapter 1: An Introduction to Java and Program Design 14 Web Services Services receive information requests over the Web and return the requested data

Chapter 1: An Introduction to Java and Program Design 15 JavaBeans Reusable software components

Chapter 1: An Introduction to Java and Program Design 16 Programming a Computer Companies need developers to build general application software packages Custom applications are built for specific needs Existing programs need maintenance and upgrades New applications will be needed due to emerging technologies

Chapter 1: An Introduction to Java and Program Design 17

Chapter 1: An Introduction to Java and Program Design 18 Program Development Cycle

Chapter 1: An Introduction to Java and Program Design 19 Phase 1 – Analyze Requirements Verify that the requirements are clear and complete Evaluate the problem to determine that it is solvable using a program List the required input and output data Determine whether the input data is available for testing

Chapter 1: An Introduction to Java and Program Design 20 Phase 1 – Analyze Requirements Ensure that a solution, or algorithm, can be developed with the information provided in the requirements Verify the user interface specifications

Chapter 1: An Introduction to Java and Program Design 21

Chapter 1: An Introduction to Java and Program Design 22 Phase 2 – Design Solution Develop a logical model that illustrates the sequence of steps you will take to solve the problem Use design tools such as storyboards, object structure diagrams, flowcharts, and pseudocode to outline the logic of the program

Chapter 1: An Introduction to Java and Program Design 23 Phase 2 – Design Solution Storyboards are sketches of the user interface

Chapter 1: An Introduction to Java and Program Design 24 Phase 2 – Design Solution Object Structure Diagrams illustrate the attributes and methods of an object –Attributes define the characteristics of an object –Methods are instructions an object uses to manipulate values, generate outputs, or perform actions

Chapter 1: An Introduction to Java and Program Design 25 Phase 2 – Design Solution

Chapter 1: An Introduction to Java and Program Design 26 Phase 2 – Design Solution Flowcharts graphically represent the logic used to develop an algorithm Control structures allow the programmer to specify the code that will execute only if a condition is met Flowcharts use pseudocode, English, or mathematical notation inside symbols to represent the steps of a solution

Chapter 1: An Introduction to Java and Program Design 27

Chapter 1: An Introduction to Java and Program Design 28

Chapter 1: An Introduction to Java and Program Design 29 Phase 2 – Design Solution Pseudocode is an English representation of how the program code should be written

Chapter 1: An Introduction to Java and Program Design 30 Phase 3 – Validate Design The programmer steps through the solution with test data The user agrees that the program design solves the problem put forth in the requirements The user verifies that the initial requirements document contains all necessary requirements

Chapter 1: An Introduction to Java and Program Design 31 Phase 4 – Implement Design Write the code that translates the design into a program Create the user interface Create comments within the code that explains the purpose of the code Test the code as it is written Test related code

Chapter 1: An Introduction to Java and Program Design 32 Phase 4 – Implement Design

Chapter 1: An Introduction to Java and Program Design 33 Phase 5 – Test Solution Create a test plan with test cases of sample input data and expected output Perform integration testing to ensure that components interact correctly Test boundary values Document any problems –If results are unsatisfactory, a new iteration of the development cycle begins

Chapter 1: An Introduction to Java and Program Design 34 Phase 6 – Document Solution Requirements documents, program design documents, user interface documents, and documentation of the code Test cases and proof of successful completion of testing Program code should be archived electronically

Chapter 1: An Introduction to Java and Program Design 35 Object-Oriented Programming and Design Object-oriented programming –Data and the code that operates on the data are packaged into a single unit called an object Object-oriented design –Identifies how objects interact with each other to solve a problem

Chapter 1: An Introduction to Java and Program Design 36 Objects Class –Implementation of an object or set of objects with a common structure and behavior Class diagram –A tool displaying a hierarchy of classes, including superclasses and subclasses Instance –A specific occurrence of an object Attributes –The properties of an individual object

Chapter 1: An Introduction to Java and Program Design 37 Operations Method –The code of an operation on the data of an object Message –The activation of an operation through naming the object and the operation to be performed on the object Trigger –Impetus for a sent message Event –The process of a trigger sending a message that results in an operation

Chapter 1: An Introduction to Java and Program Design 38 Event Diagrams and UML Graphically represents relationships among event and operations Useful for designing event-driven programs Part of the Unified Modeling Language (UML) –The UML provides a standardized model to describe object-oriented designs graphically –The UML is a system of symbols to represent object behavior and program behavior

Chapter 1: An Introduction to Java and Program Design 39

Chapter 1: An Introduction to Java and Program Design 40 Encapsulation The process of hiding the implementation details of an object from its user The user is shielded from the system’s complexity Information hiding provides access to an object only through its messages Objects can be modified without requiring application modification

Chapter 1: An Introduction to Java and Program Design 41 Inheritance An efficient way to reuse code by defining a subclass as an extension of another class The subclass inherits all the data and functions of the superclass The subclass has at least one attribute or method that differs from its superclass

Chapter 1: An Introduction to Java and Program Design 42 Polymorphism Allows an instruction to be given to an object using a generalized command The same command will obtain different results depending on the object receiving the command The specific actions internal to the object are encapsulated from the user

Chapter 1: An Introduction to Java and Program Design 43

Chapter 1: An Introduction to Java and Program Design 44 Rapid Application Development Pre-built objects speed up program development

Chapter 1: An Introduction to Java and Program Design 45 What Is the Java SDK? The Java Software Development Kit (SDK) is a programming package to develop Java applications The Java Runtime Environment (JRE) provides the tools to deploy Java applications

Chapter 1: An Introduction to Java and Program Design 46 Features of the J2SE The Java Compiler –Converts code into bytecode The Java Virtual Machine –Contains an interpreter to execute the bytecode The Java API –The standard set of packages available in Java The Java Applet Viewer –Mini browser to display Java applets

Chapter 1: An Introduction to Java and Program Design 47 Other Java Development Tools VATE (value-added text editor) –Color codes elements and numbers lines –Examples: TextPad, JCreator, JGrasp IDE (integrated development environment) –Builder tool to aid coding and debugging –Examples: Sun ONE Studio, JBuilder, Visual Age, Simplicity Web server –Deploys servlets –Example: Tomcat

Chapter 1: An Introduction to Java and Program Design 48 Summary Overview of computer programming Overview of the Java programming language Characteristics of Java Program development life cycle Java program types

Chapter 1: An Introduction to Java and Program Design 49 Summary Object-oriented programming and design –Objects, methods, attributes, events –Encapsulation, inheritance, polymorphism The Java SDK Other Java development tools

Java Programming, 2E Introductory Concepts and Techniques Chapter 1 Complete