Chapt. 10. What’s a Program? A set of instructions -- that lead to the accomplishment of an...

16
Chapt. 10

Transcript of Chapt. 10. What’s a Program? A set of instructions -- that lead to the accomplishment of an...

Page 1: Chapt. 10. What’s a Program? A set of instructions -- that lead to the accomplishment of an objective.

Chapt. 10

Page 2: Chapt. 10. What’s a Program? A set of instructions -- that lead to the accomplishment of an objective.

A set of instructions --that lead to the accomplishment of an objective.

Page 3: Chapt. 10. What’s a Program? A set of instructions -- that lead to the accomplishment of an objective.

CompilerConverts entire program into object code prior to Execution.

InterpreterConverts small program units (lines of code) into object code then executes them individually

Page 4: Chapt. 10. What’s a Program? A set of instructions -- that lead to the accomplishment of an objective.

Language CategoriesLow-Level

Machine

Assembly

Problems?

Page 5: Chapt. 10. What’s a Program? A set of instructions -- that lead to the accomplishment of an objective.

FORTRAN

COBOL

C

BASIC

Page 6: Chapt. 10. What’s a Program? A set of instructions -- that lead to the accomplishment of an objective.

Object-Oriented Programming (OOP) LanguagesC++

#include "stdafx.h"#include <iostream>

using namespace std;

int main( ) {

     cout << "Hello World“<<endl;

     return 0;

}

Javapublic class TextDemo {         public static void main(String[] args)       { System.out.println("Hello, Welcome to Java

programming") }}

OR

import javax.swing.JOptionPane;  //for the GUI definitions

public class WelcomeMessageDialogBox{    public static void main(String[] args)    {        JOptionPane.showMessageDialog(null, "Hello, Welcome to Java programming","GUI Programming Sample",            JOptionPane.INFORMATION_MESSAGE);    }}

Page 7: Chapt. 10. What’s a Program? A set of instructions -- that lead to the accomplishment of an objective.

Visual StudioMicrosoft

DelphiBorland

PowerBuilderSybase

Page 8: Chapt. 10. What’s a Program? A set of instructions -- that lead to the accomplishment of an objective.

Specialty Languages

RPG – Report Generator

Logo – Graphics and audio

Macros – Recorder or VBA

Page 9: Chapt. 10. What’s a Program? A set of instructions -- that lead to the accomplishment of an objective.

Web Development

Applets and ScriptHTML (DHTML, XMX, etc.)Java script, Perl, PHP, etc.

Servlet -

Page 10: Chapt. 10. What’s a Program? A set of instructions -- that lead to the accomplishment of an objective.

Program Development Cycle

1. Analysis – “can we get there from here?” (feasibility study)

2. Design – “how do we get there from here?” Structured design vs. object design

IPO Hierarchy charts Flowcharts and pseudocode

Page 11: Chapt. 10. What’s a Program? A set of instructions -- that lead to the accomplishment of an objective.

Program Design ToolsHierarchy Charts – module development and

process organizationControl structure – control the task sequence

Sequential – Selection –

if – else – binary selection case – multiple option selection

Page 12: Chapt. 10. What’s a Program? A set of instructions -- that lead to the accomplishment of an objective.

Program Design Tools (cont’d)Repetition Control

do – while – the condition is before the action do – until - the condition is after the action

Flow chart – symbols represent actions Rectangle – a general process Parallelogram – input and output Diamond - decision Arrows – data or process flow Oval – terminal – the end (beginning) of a program

sequence

Sample flowchart

Page 13: Chapt. 10. What’s a Program? A set of instructions -- that lead to the accomplishment of an objective.

Development Cycle (contd.)3. Validate – “are you sure that is the best way

to go?” Desk Check

4. Implement – “take the trip.” Create the code

Page 14: Chapt. 10. What’s a Program? A set of instructions -- that lead to the accomplishment of an objective.

Development Cycle (contd.)5. Test and Validate – “are we there yet?”

Check results against known values Parallel processing

6. Document – “take the pictures and write the post cards!!”

Internal documentation External documentation

Page 15: Chapt. 10. What’s a Program? A set of instructions -- that lead to the accomplishment of an objective.

SummaryProgramCompiler vs. InterpreterProgramming Languages

Low-levelProceduralOOPWeb developmentSpecial use

Page 16: Chapt. 10. What’s a Program? A set of instructions -- that lead to the accomplishment of an objective.

Summary (part dux)Program Development Cycle

AnalysisDesignValidateImplementTest and ValidateDocument