CSCI130 - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

CSCI130

Description:

Make us think at a higher-level of abstraction. No attention to technical and hardware details ... Tailor office applications. Visually oriented. Programs have ... – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 8
Provided by: imadr
Category:

less

Transcript and Presenter's Notes

Title: CSCI130


1
Lecture-10 (6.1-6.6)
  • CSCI130
  • Instructor Dr. Imad Rahal

2
Higher-level Programming Languages (PLs)
  • (1GL) Machine language programming
  • limited set of instructions
  • binary numbers opcodes, absolute memory
    addresses and data
  • Memory addresses
  • (2GL) Assembly language
  • English mnemonics for binary opcodes
  • Decimal data
  • Labels for memory addresses and variables
  • limited instruction set
  • Use human languages to program
  • Large vocabulary (space and time to search)
    opcode lookup
  • 500,000 words - 1,000,000 words (including
    scientific words)
  • Synonyms weather and whether
  • Homonyms ate and eight
  • Context
  • Slang

3
Higher-level Programming Languages
  • (3GL) High-level languages are in the middle
  • Use English-like phrases and mathematical
    notation
  • x x1
  • Do it in assembly?
  • A limited vocabulary with precise meaning
  • Make us think at a higher-level of abstraction
  • No attention to technical and hardware details
  • Like O.S.
  • Much larger instruction set for programmers
  • Multiplication

4
Computer Programming
  • Different types of high-level languages
  • The imperative programming paradigm
  • A program is a sequence of instructions
  • Machine language/assembly language
  • Object-oriented paradigm (just as we, humans,
    think)
  • Visual Basic or VB uses the OOP
  • Objects each having properties and actions
    Imagine a computer screen with several icons
  • Each is a icon is an object also desktop is an
    object
  • Each icon has its own attributes and actions
  • Properties Icon image/shape and color
  • Actions
  • Single-clicked ? Darken Color (affect itself)
  • Double-clicked ?
  • Run corresponding program (Program is another
    object)
  • Change desktop look (Desktop is another object)

5
Object-Oriented Programming
  • The program is collection of interacting objects
  • In VB, actions are triggered by events
  • Done by users (interactive) e.g. CLICK or
    DOUBLE_CLICK
  • Objects sharing properties/methods are grouped
    into classes
  • Class An Icon
  • Object My Documents, My Computer

6
Introduction
  • Basic is an imperative language developed in
    1960s
  • Visual Basic (VB) --- developed by Microsoft
  • OO version of Basic
  • Underlying ALL MS office programs
  • You could do a lot
  • Write your own programs
  • Tailor office applications
  • Visually oriented
  • Programs have a GUI for input/output
  • First thing to do to build a VB program is to
    design the interface
  • Intro to VB

7
Hungarian Notation
  • A must in this course
  • Every object used MUST be renamed including the
    form(s) using the following rules
  • Form ?frmFormName
  • E.g. frmTemperature
  • Also change caption
  • Textbox ? txtTextBoxName
  • E.g. txtInputBox
  • Also change Text (to empty)
  • Label ? lblLabelName
  • E.g. lblDescribeInput
  • Also change caption
  • Button ? cmdButtonName
  • E.g. cmdComputeButton
  • Also change caption
  • PictureBox ? picPictureBoxName
  • E.g. picOutputBox
Write a Comment
User Comments (0)
About PowerShow.com