Tuesday, July 1, 2008

COMPUTER III 1st Qtr July 1, 2008

TC Program
> DOS (Disk Operating System) Base Program

PROMPT
-> directory
-> program files, accessories

[A, C, D, E, F]
> File Allocation Drive

Turbo C - symbols

Visual Basic - words

====================================================================
====================================================================
~~**~~**~~**~~**~~**~~**~~**~~**~~**~~**~~**~~**~~**~~**~~**~~**~~**~~**~~*

" A good programmer is a good planner"
=> knows how to organize

PROGRAM => the instruction, output, presentation

PROGRAMMING => process

3 WAYS IN CREATING A PROGRAM

Algorithm - logical procedure ( logical)
Pseudocode - outline form (textual)
Flowchart - graphical representation, graphical of algorithm (Data Flow Diagram, Blueprint of the Program)

Fundamentals of Programming
(Data Handling in Programming)

DATA TYPES:
Type of Information
> numeric (integer, float/double)
> alphanumeric data (number, character, string)
> date & time (day, month, year, hour, etc.)
> logical data (true, false)

NUMERIC
> numbers, whole, real

integer - whole numbers

float & double - numbers with fractional parts

ALPHANUMERIC
> numbers, alphabets, special characters

Number - numbers that can't be used in operations

Character - a single variable

String - combination of variables

DATE & TIME
> holds the day, month, year (date), hour, minute, and second (time)

LOGICAL DATA
2 values : TRUE (any value), FALSE (zero 0)

VARIABLE
> name chosen to represent an item/value
e.g. x = :P

CONSTANT
> never changes. DEFINITE
e.g. x = 5, formula, pi=3.1416
> identifiers

OPERATORS
> symbols that indicate the operation to be performed on the data

-> Arithmetic -> Relational -> Logical
UPEMDAS

U - Unary (+/-)
P - parenthesis
E - exponents (^ is caret)
M - multiplication
D - divide
A - addition
S - subtraction

- comparing 2 values
!=, <>

- determine if a condition is satisfied

AND - BOTH = TRUE
OR - 1/BOTH = TRUE
NOT - TRUE = FALSE, NOT - FALSE = TRUE


====================================================================
====================================================================
~~**~~**~~**~~**~~**~~**~~**~~**~~**~~**~~**~~**~~**~~**~~**~~**~~**~~**~~*

INTRODUCTION TO VISUAL BASIC

categories of programming language

-> MACHINE LANGUAGE
natural language of the computer that generally consists of strings of numbers
(binary numbers -> 1,0 & bits)

-> ASSEMBLY LANGUAGE
programming language which uses mnemonic codes or abbreviations (a+b)

-> MIDDLE LEVEL LANGUAGE
uses instructions that are expressed in a slightly more readable form (getch, printf, scanf)

-> HIGH LEVEL LANGUAGE
uses English-like words/human-readable language (%-mod)

TRANSLATORS


> COMPILER
translates the whole program into machine language before executing the program, regardless of the syntax error (e.g. TC)

>INTERPRETER
translates a program, line by line into machine language and stops once an error has been encountered (e.g. VB)

Visual Basic
> high-level program language
> interpreter
> creates applications for WINDOWS
> introduces windows-based programming

VB Structure
> Programming in VB is done in a graphical environment
> Contains tools for testing and creating VB programs (Integrated Development Environment)
> event-driven Programming Language
> an operation is executed as the result of some kind of event
>Object - oriented
> application programs are created using different objects (pro-choice)
>Well-defined structure
>utilizes a form module to create objects (no form, no interface)

A VB Programming Object has:

-Properties
> characteristics of an object
Methods
> functions of an object that can be manipulated
Controls
> objects that can be placed on a form

No comments: