JK VB NET 1 Introduction To Visual Basic NET Background and Perspective
JK VB NET 1 Introduction To Visual Basic NET Background and Perspective
2
Objectives (continued)
• Identify basic object-oriented programming
concepts
3
Understanding Basic Computer
Terminology And Component
Architecture
• Understand basic computer terms
• Computer requires:
• Hardware
• Software
4
Understanding Basic Computer
Terminology And Component
Architecture (continued)
• Hardware
• Architecture
5
Computer Systems: Computer Hardware and Software
Hardware
Central
Processing
Unit
Input Output
Device Device
Main
Memory
Secondary
Storage
Software
What is a program?
Machine Languages
Assembly Languages
ADD bx, ax
High-level program languages more resemble English language than low-level languages. Examples:
• Visual Basic • C#
• Python • C
• Javascript • C++
• Java • PHP
19
High-level Languages (continued)
• Source code refers to the program written in a high-level
language.
20
21
Learning a Programming Language
• Understand basic vocabulary
• Keywords
– Words built into language
– Also called reserved words
• Statements
– Consist of:
• Keywords- Words with special meaning to Visual Basic (e.g.,
Private, Sub
• Identifiers - Names created by the programmer (e.g.,
sngGrossPay, btnClose)
• Operators: Special symbols to perform common operations
(e.g., +, -, *, and /)
• Comments - Remarks: Comments inserted by the programmer – these
are ignored when the program runs (e.g., any text preceded by a single
quote)
22
Learning a Programming
Language (continued)
• Procedures
– One or more related statements
– Work together to perform specific task
• Modules
– Self-sufficient group of related procedures
– Can combine with other modules to create
applications
23
Learning a Programming
Language (continued)
• Syntax
– Rules of language
– Includes:
• Spelling
• Punctuation
• Grammar
– Each programming language has own unique
syntax and structure
24
Learning a Programming
Language (continued)
• Syntax error
– Mistake in program
25
Learning a Programming
Language
• Logic error
– Mistake in program
26
Solving Problems and
Developing Algorithms
• Computer programming is problem solving
• Problems solved by programs
– Require inputs
– Produce outputs
• Algorithm
– Sequence of steps used to transform input(s) into
desired output(s)
27
28
Programming Models
31
Identifying Basic
Object-oriented Programming
Concepts (continued)
• Attributes
– Characteristics of an object
• Methods
– Behaviors of an object
• Problem domain objects
– Objects specific to problem being solved
32
33
Identifying Basic
Object-oriented Programming
Concepts (continued)
• Message
– Asks object to invoke one of its methods
• Encapsulation
– Attributes and methods of object are packaged into
single unit
– Do not need to know internal structure of object to
send messages to it
34
Identifying Basic
Object-oriented Programming
Concepts (continued)
• Class
– Defines what all objects of group have in common
• Instance
– Specific member of group
– Example:
• WeaverBird is an instance of the Bird class
35
Identifying Basic
Object-oriented Programming
Concepts (continued)
• Inheritance
– Subclasses
– Superclass
36
37
Identifying Basic
Object-oriented Programming
Concepts (continued)
• Polymorphism
38
Examining the Benefits of the
Object-oriented Approach
• Advantages:
– Naturalness
– Reusability
39
Summary
• Computer consists of:
– Hardware
– Software
• Programming languages:
– Machine language
– Assembly language
– High-level languages
40
Summary (continued)
• Object-oriented programming
– Defines a collection of objects that work together
to solve a problem
41