Program General Structure - PowerPoint PPT Presentation

1 / 31
About This Presentation
Title:

Program General Structure

Description:

The Java compiler checks for syntax errors in the source program and then ... With the KJP translator, students can quickly convert their OO programs to Java. ... – PowerPoint PPT presentation

Number of Views:39
Avg rating:3.0/5.0
Slides: 32
Provided by: csis5
Category:

less

Transcript and Presenter's Notes

Title: Program General Structure


1
Program General Structure
  • Data descriptions, which define all the data to
    be manipulated and transformed by the
    instructions.
  • A sequence of instructions, which defines all the
    transformations to be carried out on the data in
    order to produce the desired results.

2
Structure of a Program
3
Software
  • The system software is a collection of programs
    that control the activities and functions of the
    various hardware components. An example of system
    software is the operating system, such as Unix,
    Windows, MacOS, OS/2, and others.
  • Application software consists of those programs
    that solve specific problems for the users. These
    programs execute under control of the system
    software. Application programs are developed by
    individuals and organizations for solving
    specific problems.

4
Programming Languages
  • A programming language is a formal notation that
    is used to write the data description and the
    instructions of a program.
  • A language has a well-defined set of syntax and
    semantic rules.
  • The syntax rules describe how to write sentences.
    The semantic rules describe the meaning of the
    sentences. These two types of rules must be
    consistent.

5
High-level Programming Languages
  • The purpose of a programming language is to allow
    a human to write instructions to the computer in
    the form of a program.
  • Are so called because they are hardware
    independent and closer to the problem (or family
    of problems) to be solved.
  • Allow more readable programs, and that are easier
    to write and maintain. Examples of these
    languages are Pascal, C, Cobol, Fortran, Algol,
    Ada, Smalltalk, C, Eiffel, and Java.

6
Compilation
  • The solution to a problem is implemented in an
    appropriate programming language. This becomes
    the source program written in a high-level
    programming language, such as C, Eiffel, Java,
    or others.
  • Once a source program is written, it is compiled
    or translated to an equivalent program in machine
    language.
  • The computer can only execute instructions that
    are in machine language.

7
Compiling a Java Program
8
Compiling Java Programs
  • The Java compiler checks for syntax errors in the
    source program and then translates it into a
    program in byte-code, which is the program in an
    intermediate form.
  • The Java bytecode is not dependent of any
    particular platform or computer system. This
    makes the bytecode very portable from one machine
    to another.

9
Executing a Program in Bytecode
10
KJP Translator
  • The KJP translator analyzes the syntax of the
    program and then to converts the program from KJP
    to Java.

11
KJP Notation
  • With the KJP translator, students can quickly
    convert their OO programs to Java.
  • KJP can be integrated with jGRASP.
  • The semantics of KJP is the same as that of Java.

12
Problem Solving
  • Computer problem solving involves a series of
    tasks or phases to develop a computer solution.
  • To carry out this process of developing programs
    in an appropriate manner, basic knowledge of the
    software development process is essential.

13
Goal of Problem Solving
  • Solve some real-world problem producing good
    quality software at a reasonable cost.
  • The real challenge is to find some method of
    solution or some way to approximate a solution to
    the problem at hand.

14
Problem Solving Process
  • Computer problem solving is a creative process
    in a simple manner, it involves
  • Describing the problem in a clear and unambiguous
    form
  • Finding a solution to the problem
  • Developing a computer implementation of the
    solution

15
Parts of a Problem
  • The given data
  • Required results
  • The necessary transformation to be carried out on
    the given data to produce the final results

16
Algorithm
  • The transformation on the data is described as a
    sequence of instructions that are to be carried
    out on the given data in order to produce the
    desired results.
  • Transformation is a clear, detailed, precise, and
    complete description of the sequence of
    operations.
  • The algorithm is a precise description of how to
    solve the problem.

17
Transformation Applied to the Input Data
18
A Program
  • A group of data descriptions and one or more
    sequences of instructions to the computer for
    producing correct results when given appropriate
    data.
  • Written in an appropriate programming language
    and it tells the computer how to transform the
    given data into correct results.

19
Software Development Process
  • A process for producing the software that
    implements the solution on a computer.
  • Guides the developer into a well-defined process
    to be carried out in a disciplined manner and to
    accomplish development of correct software.
  • The life cycle is used to organize and manage the
    software development process including the phases
    to maintain and retire the software.

20
Software Life Cycle
  • The entire development process consists of a
    sequence of activities or phases that are carried
    out by a team of developers.
  • These activities represent the complete life of
    the software from birth to retirement.

21
Understanding Life cycle
  • Software development, which includes all the
    phases necessary to carry out the initial
    development of the software product.
  • Using the developed software, this includes the
    activities that support the software in
    production.
  • Maintenance, which include the activities that
    report defects in the software and the subsequent
    fixes and releases of new versions of the
    software product.
  • Retirement, which takes the software off
    production when it can no longer be maintained.

22
Waterfall Model
  • One of the earliest and simplest models for the
    software life cycle is the waterfall model.
  • This model represents the sequence of activities
    to develop the software system up to installation
    for using the software.
  • The activity in a given stage or phase cannot be
    started until the activity of the previous phase
    has been completed.

23
The Waterfall Model of Development Process
24
Tasks in the Software Development Process
  • Analysis
  • Design
  • Implementation
  • Testing
  • Deployment

25
Analysis
  • Describes what the problem solution is supposed
    to accomplish. The outcomes of this phase are the
    various requirement documents, which include
    specifying the requirements of the problem in a
    more complete, precise, clear, and understandable
    form.
  • Entails a thorough understanding of the problem
    and describing the problem in a very precise
    manner and what is to be done.

26
Design
  • Describes the structure and behavior of the
    components of the system model. The outcome of
    this phase is a detailed description of the data
    structures and algorithms in each component of
    the model.
  • The decomposition of the software into smaller
    parts is usually part of the preliminary design.
    The rationale for this step is that it is much
    easier to manage small pieces of the software
    instead of the whole product.

27
Design (Cont.)
  • The detailed design may be the most
    intellectually challenging in program
    development.
  • In this phase, one or more solutions to the
    problem are investigated. The data structures and
    the algorithms are designed, written in some
    appropriate notation (i.e., pseudo-code and/or
    flowcharts), and documented.

28
Implementation
  • Includes the translation of the design solution
    into a programming language, followed by the
    compilation of the code written.
  • This is the actual construction of the program(s)
    for the application. The outcome of this phase is
    the set of programs constructed.

29
Testing
  • Verifies the program(s) that the program works
    according to requirements with appropriate data
    according to the set of examples provided.
  • This phase includes unit testing, which involves
    the testing of individual components (modules),
    and integration testing, which involves testing
    all the components together.
  • The outcome of this phase is the verified
    application software.

30
Limitation of the Waterfall Model
  • It is not iterative, which is extremely necessary
    in practice.
  • There are some variations proposed for the
    waterfall model. These include returning to the
    previous phase when necessary.
  • Recent trends in system development have
    emphasized the iterative approach. In this
    approach, previous stages can be revised and
    enhanced.

31
Other Life cycle Models
  • The spiral model of software development is a
    more complete model that incorporates the
    construction of prototypes in the early stages.
  • A prototype is an early version of the
    application that does not have all the final
    characteristics.
  • Other development approaches involve prototyping
    and rapid application development (RAD).
Write a Comment
User Comments (0)
About PowerShow.com