Getting Started - PowerPoint PPT Presentation

1 / 36
About This Presentation
Title:

Getting Started

Description:

She can ask its name or its hair color, and it will respond. ... happening in the main plot (routine), but rather what happens behind the scenes. ... – PowerPoint PPT presentation

Number of Views:48
Avg rating:3.0/5.0
Slides: 37
Provided by: course199
Category:
Tags: getting | hair | scene | started

less

Transcript and Presenter's Notes

Title: Getting Started


1
Getting Started
  • You were supposed to
  • Read Chapter 1
  • Read the syllabus
  • Any questions?

2
What was chapter 1 about?
3
The Software Life Cycle
  • Preparation required before writing code
  • Specify the problem
  • Design the overall structure of the solution
  • Select and analyze algorithms and data structures
  • After work completed
  • Testing
  • Documentation
  • Support
  • Maintenance

4
The Software Life Cycle (continued)
  • No universal agreement on exact steps in software
    development
  • Software life cycle
  • Problem specification
  • Program design
  • Selection of algorithms and data structures
  • Coding and debugging
  • Testing and verification
  • Documentation and support
  • Maintenance

5
The Software Life Cycle (continued)
6
Problem Specifications
  • Problem specification phase
  • Complete, accurate, unambiguous statement of
    exact problem
  • Solve a problem correctly solve the correct
    problem
  • List inputs provided to the program
  • For each input, list what outputs the program
    produces
  • Problem specification document is an input/output
    document

7
Problem Specifications (continued)
8
Problem Specifications (continued)
  • Problem statement completed through meetings and
    interviews
  • Document contains information about
  • Delivery date
  • Budget constraints
  • Performance requirements
  • Acceptance criteria
  • Software requirements document is a contract
    between user and developer

9
Challenges with the Problem Specifications
  • Significant errors caused by incomplete,
    inaccurate, ambiguous specifications
  • People specifying the problem may be inaccurate,
    or change their mind

10
Problem Specifications (continued)
  • Rapid prototyping helps users decide what they
    want
  • Developer constructs a model of the software
  • Simulates look and feel
  • Little or no functionality

11
Problem Specifications (continued)
  • Developers must include description of programs
    behavior for every possible input
  • Computer programs have no common sense
  • Describe software behavior for all inputs, even
    if unexpected
  • Majority of specification document describes
    responses to unusual, unexpected, illegal inputs
  • More realistic diagram of a problem specification

12
Problem Specifications (continued)
13
Challenges with the Problem Specifications
  • Significant errors caused by incomplete,
    inaccurate, ambiguous specifications
  • People specifying the problem may be inaccurate,
    or change their mind
  • Natural language is poor notation for accurate
    specifications
  • Language has multiple meanings, differences in
    interpretation
  • Having said that, its almost universally used

14
Problem Specifications (continued)
  • Formal specification languages more precise
  • More difficult to read and interpret
  • UML (Unified Modeling Language) visually diagrams
    relationships and dependencies
  • What we will start looking at for the next session

15
Software Design
  • Follows completion of specification document
  • Specify an integrated set of software components
  • Component is a separately compiled program unit
  • Function, procedure, class, template, package,
    interface
  • Organizes and manages coding task
  • Divide-and-conquer large problem divided into
    smaller, simpler subproblems

16
Software Design (continued)
  • For each component, specify three items
  • Interface
  • Preconditions
  • Postconditions
  • Software design document component
    specifications and their relationships
  • If all preconditions are true, the program unit
    guarantees postconditions will be true

17
Software Design (continued)
  • Top-down design decomposes problem functionally
  • Difficult to modify many program units need
    details of data structures
  • Object-oriented design decomposes software by
    the entities in the problem
  • Class models each entity in the problem
  • Object instance of a class
  • Methods operations an object can perform
  • Information exchanged between objects via method
    calls

18
Software Design (continued)
19
Software Design (continued)
20
Algorithms and Data Structures
  • Select data structures and choose algorithms
    before coding
  • Efficiency influenced most by algorithms and data
    structures
  • Efficient algorithm remains efficient even if
    poorly coded
  • Inefficient algorithms cannot be made efficient
    by clever programming or machine speed

21
Coding and Debugging
  • Coding is the software development phase covered
    in the first courses in computer science
  • Java created as a platform-independent
    environment to control embedded systems
  • Used for applets embedded in Web pages
  • Supports object-oriented design
  • Standard classes provide useful services
  • Software productivity the amount of correct
    code produced by a programmer

22
Coding and Debugging (continued)
  • Software reuse using software that already
    exists
  • Java class library
  • Java 1.5 has 166 packages, 3279 classes
  • Java contains features vital to modern software
    development

23
Exceptions and Streams
  • Exception handling is a way to handle errors,
    failures during program execution
  • Java has classes for handling network and file
    input/output in many formats
  • Lets the programmer view information as
  • Binary or character streams
  • Buffered or unbuffered

24
Threads
  • Thread a program unit in execution
  • Multithreading more than one thread executing
    at the same time
  • When each thread executes on a separate
    processor, they are said to be executing in
    parallel
  • Concurrent processing threads take turns
  • Threading operations located in the
    java.lang.Thread class

25
Graphical User Interfaces
  • Graphical user interface (GUI) interacts with
    users
  • Users create visual features such as windows,
    buttons, text fields, labels, choice boxes, etc.
  • Routines control placement, size, color of
    components
  • Abstract Windowing Toolkit located in the package
    java.awt
  • Swing package has additional visual components

26
Graphical User Interfaces (continued)
27
Networking
  • Most programs work in tandem with a computer
    network
  • E-mail, file transfer, Web browsers
  • Distributed databases, dynamic Web pages, chat
    rooms, remote sensing, etc.
  • Java package java.net allows users to develop
    client/server network applications
  • Uses TCP/IP and UDP network protocols
  • Classes are easy to explain and understand
  • Security is essential to networking packages

28
Testing and Verification
  • Program verification formally proves the
    correctness of a program
  • Develop correctness proof as you write the code
  • Difficult and time consuming
  • Not widely used
  • Empirical testing demonstrates correctness with
    carefully chosen test data
  • Unit testing test each program unit on
    carefully chosen data

29
Testing and Verification (continued)
  • Flow path test every execution sequence through
    a program unit
  • Virtually infinite number of flow paths
  • Exhaustive testing usually impossible
  • Verify every statement executed at least once
  • Integration testing test the correctness of
    routines working together
  • Usually proceeds from the bottom up

30
Testing and Verification (continued)
  • Clear box testing look inside the code to
    decide what test cases are needed
  • Also called alpha testing
  • Black box testing put the program in a
    realistic environment and run it
  • Also called beta testing, acceptance testing
  • Data related to actual user operations
  • If beta tests show the program operates
    correctly, problem specification has been met
  • Program can be delivered to the user

31
Documentation and Support
  • User documentation complete users manual
  • May include online documentation
  • Users expect extensive support environment
  • Phone, e-mail support, Web site
  • Downloadable upgrades and patches
  • Technical documentation
  • Problem specification document
  • Program design document
  • Description of algorithms and data structures
  • Program listing with inline comments
  • Description of testing and acceptance procedures

32
Documentation and Support (continued)
  • Javadoc comment placed between / and / in the
    program code
  • Comments contain tags that provide information
    about the program unit
  • Four common javadoc tags
  • _at_author name
  • _at_version text
  • _at_param name description
  • _at_return description

33
Program Maintenance
  • Program maintenance adapts the software to
    maintain correctness
  • Stays current with changing specifications and
    new equipment
  • Implies software life cycle repeated more than
    once
  • Maintenance easier if program well designed from
    the start

34
Summary
  • Much more to programming than coding
  • Time spent on implementation relatively small
    compared to preparatory work
  • Over 5- to 15-year life of software, great deal
    of time and money will be spent on maintenance
  • Software development is extremely complex
  • Do not equate software development with coding

35
Summary (continued)
  • Coding preceded by preparatory work clarifying
    and specifying the solution
  • Coding followed by testing, verifying, measuring,
    and documenting
  • Software engineering refers to systematic
    approach to software development

36
Summary (continued)
Write a Comment
User Comments (0)
About PowerShow.com