You are on page 1of 5

Computer Science 1 // 1st Quarter

SY 2011 - 2012

Computer - programmable machine which can receive, store and process data

last to terminate (shutting down)

Program - series of instructions Arithmetic Logic Fetch Data Send Data

Classified according to: Size Processing power Cost Usage

Data Raw (unprocessed) Information

Classifications: Supercomputer

Governments Meteorology Hollywood Banking


INPUT Processor Main

Programming Language

High-level Language C++

Mainframe

OUTPU T

Java Python PHP Java Script Ruby COBOL (Common Business Oriented Language)

Big hospitals

Memory

Security Systems Internet Servers Mid-range Computers Microcomputers

Main Components

Low-Level Languages Machine Language (Binary Number System)

o
Software

Assembly Language

Operating System manages computer s resources to the programs running - first to run (booting),

Program Design Process

PAT RIVERA

Computer Science 1 // 1st Quarter


SY 2011 - 2012

0, 1, 2, 3, 4, 5, 6, 7, 8, 9

o
PROBLEM Start

Hexadecimal (Base 16)


IMPLEMENTATION

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Encoding to C++ Testing/Debuggin Working Program

Problem Definition Algorithm Design

Preparing a C++ Program for Running

Memory Size Desktop

o o

Binary digit = 1 bit 8 bits = 1 Byte (minimum number

Source Code of bits to represent Compiler Object Code for C++

all characters on a keyboard) b = bit/s B Linker = Byte/s


Object Code for Other

1024 Bytes = 1 KB

o Complete Machine 1024 KB = 1 MB o


1024 MB = 1 GB

Number Systems - collection of numbers to represent quantity with a defined set of equations

Algorithm - Solution - Systematic procedure that produces - in a finite number of steps - the answer to a question or the solution of a problem Systematic

o o o

Rational Roman Complex

Base Systems - way to represent larger numbers

Procedure - step by step Finite Number of Steps - will terminate eventually - Problem-solving tool

Binary (Base 2) 0,1

Octal (Base 8) 0, 1, 2, 3, 4, 5, 6, 7

Decimal (Base 10)

Concatenation - combining (adding) using +

PAT RIVERA

Computer Science 1 // 1st Quarter


SY 2011 - 2012

Pseudocode - textual representation

Comments - Used to give to additional informati on to I/O, Process or Conditions

Flowchart - visual representation of data flow and processing, used prior to coding Terminal - Beginning/End

Flow Line - Indicates which step is next

of an Algorithm

o
Initialization - Declaring & Initializing Variable; Allocating Memory Space

Rules: Terminal & Connector: 1 Flow Line entering; 1 Flow Line Leaving I/O, Process, Conditions: 1 Flow Line Entering I/O & Process: 1 Flow Line

Process/Computation/Operatio n - To show processing or mathematical computations

Leaving Conditions: 2 Flow Lines Leaving

Advantages: Easier Analysis

Input/Output - Put data from/to the user

Documentation Helps in Coding & Debugging International, Different

Condition - Decision Making; Answerable by Yes or No only

Fields

Disadvantages: Difficult to Represent Complex Logic

[
Connector (On-Page & Off-Page) - Connect different parts of the program

Alteration and Reproduction is tedious & messy

Systems/Software Development Life Cycle

PAT RIVERA

Compute
SDLC - A ac us by

ie

e 2

st

uarter

profess onal soft are developers for understanding t e problem to be solved

and for creating and effective, appropriate soft are solution - Scientific met od o Models Waterfall Spiral Fountain Prototyping
Data

Incremental etc.
COMPU Output

Progra

Waterfall

implementations

Spiral
Development & 2. Identify and Design

Documentation

1. Determine Objectives Resolve Ris s 3. Development and testing

Request for a Program

TIME Plan t e next iteration

Simple

ie

of

O M NT

unning a

rogram
Coding Designs Analysis

A program needs data to manipulate or work in order to produce an output.


TIME



H SES OF

    

SY 2

-2

Advantages Bugs found in earlier stages are c eaper to fix Eac step s ould be 100% Perfect Strict and Orderly Met od Disadvantages Soft are is rarely 100% perfect during requirements Inflexible to future
OGRAM
Maintenance

ROGRAM IFE O M T

STAGES SIGN

Program no Longer Used

ND DESIGN

Testing

Computer Science 1 // 1st Quarter


SY 2011 - 2012

y Data can be a: 1 Literal Constant

Boolean Data

 OPC! C++ is a casesensitive language.

Actual values, whether number or characters, used in a program 2 Named Constant

Label or identifier associated with a fixed value; Values never change during program execution 3 Variable

Named memory locations that assume different numeric and alphanumeric values; Values stored may change or vary * Identifier - Name of a Variable

Rules for giving names (identifiers) to computer memory locations: 1 2 Use meaningful names Should begin with either a letter or an underscore symbol and all the rest of the characters must be letters, digits, or the underscore symbol 3 No keywords or reserved words

C++ Elementary Data Type: y y y Integer Values Floating-point Numbers Character Values

PAT RIVERA

You might also like