Chapt. 10. What’s a Program? A set of instructions -- that lead to the accomplishment of an...
-
Upload
donna-shields -
Category
Documents
-
view
215 -
download
1
Transcript of Chapt. 10. What’s a Program? A set of instructions -- that lead to the accomplishment of an...
Chapt. 10
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
Language CategoriesLow-Level
Machine
Assembly
Problems?
FORTRAN
COBOL
C
BASIC
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); }}
Visual StudioMicrosoft
DelphiBorland
PowerBuilderSybase
Specialty Languages
RPG – Report Generator
Logo – Graphics and audio
Macros – Recorder or VBA
Web Development
Applets and ScriptHTML (DHTML, XMX, etc.)Java script, Perl, PHP, etc.
Servlet -
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
Program Design ToolsHierarchy Charts – module development and
process organizationControl structure – control the task sequence
Sequential – Selection –
if – else – binary selection case – multiple option selection
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
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
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
SummaryProgramCompiler vs. InterpreterProgramming Languages
Low-levelProceduralOOPWeb developmentSpecial use
Summary (part dux)Program Development Cycle
AnalysisDesignValidateImplementTest and ValidateDocument