1. Trang chủ
  2. » Công Nghệ Thông Tin

An overview of visual basic NET ppt

24 266 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 24
Dung lượng 176,5 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Machine Languages Within a computer, data are represented by microscopic electronic switches that can be either off or on  The off switch is designated by a 0  The on switch is desi

Trang 1

An Overview of Visual Basic NET

Trang 2

Overview Objectives

 This overview contains basic definitions and

background information, including:

 A brief history of programming languages

 An introduction to the terminology used in

object-oriented programming languages

 A Visual Basic demonstration

Trang 3

 Just as human beings communicate with each

other through the use of languages such as

English, Spanish, Hindi, and Chinese,

programmers use a variety of special languages, called programming languages , to communicate with the computer

Trang 4

Machine Languages

 Within a computer, data are represented by

microscopic electronic switches that can be either off

or on

 The off switch is designated by a 0

 The on switch is designated by a 1

 Instructions written in 0s and 1s are called machine language or machine code

 Each type of machine has its own language

Trang 5

Assembly Languages

• Slightly more advanced programming

languages are called assembly languages

• Assembly languages simplify the

programmer’s job by allowing the

programmer to use mnemonics in place of the 0s and 1s in the program

• Mnemonics are memory aids—in this case, alphabetic abbreviations for instructions

Trang 6

Assembly Languages

 For example, the mnemonic MOV is used to move data from

one area of the computer’s memory to another

 Programs written in an assembly language require an

assembler

 The assembler is also a program

 It converts the assembly instructions into machine code—the 0s and 1s the computer can understand

Trang 7

High-Level Languages

 High-level languages

 Allow the programmer to use instructions that more

closely resemble the English language

 Represent the next major development in programming

languages

 Programs written in a high-level language require either an

interpreter or a compiler to convert the English-like

instructions into the 0s and 1s the computer can

understand

Trang 8

High-Level Languages

 Like assemblers, both interpreters and compilers

are separate programs

 An interpreter translates the high-level

instructions into machine code, line by line, as the program is running

 A compiler translates the entire program into

machine code before running the program

Trang 9

Procedure-Oriented High-Level Languages

 In procedure-oriented high-level languages , the

emphasis of a program is on how to

accomplish a task

 The programmer must instruct the computer

every step of the way, from the start of the task

to its completion

 The programmer determines and controls the

order in which the computer processes the

instructions

Trang 10

Procedure-Oriented High-Level Languages

 Some of the procedure-oriented high-level languages

—for example, the BASIC language—do not require

Trang 11

The Introduction of Windows

 Windows software provides an easy-to-use

graphical user interface (GUI)

 The GUI is common to all applications written

for the Windows environment

 Although the standard interface found in all

Windows applications makes the user’s life much easier, it complicates the programmer’s life a great deal

Trang 12

The Introduction of Windows

 Programmers found themselves spending countless

hours writing instructions to create the buttons, scroll bars, dialog boxes, and menus needed in all Windows applications

 Tasks that used to take a few lines of program code

now needed pages

 Because programming Windows applications required

a great amount of expertise, it appeared that the

Trang 13

Object-Oriented/Event-Driven

High-Level Languages

 The object-oriented/event-driven high-level

languages simplified the task of programming

applications for Windows

 In object-oriented/event-driven languages , the

emphasis of a program is on the objects included

in the user interface (such as scroll bars and

buttons) and the events (such as scrolling and

clicking) that occur when those objects are used

 The object-oriented method allows the

programmer to use familiar objects to solve

problems

Trang 14

Object-Oriented/Event-Driven

High-Level Languages

 The ability to use objects that model things found in

the real world makes problem solving much easier

 Visual Basic NET is an object-oriented/event-driven

programming language that is easy enough for a

nonprogrammer to use, yet sophisticated enough to

be used by professional programmers

 With Visual Basic it takes just a few clicks of the

Trang 15

OOP Terminology

 OOP is an acronym for object-oriented

programming

 It means that you are using an object-oriented

language to create a program that contains one or more objects

 OOD is an acronym for object-oriented design

 Like top-down design, which is used to plan

procedure-oriented programs, OOD is also a

design methodology, but it is used to plan oriented programs

object- OOD divides a problem into one or more objects

Trang 16

OOP Terminology

 An object is anything that can be seen, touched,

or used

 The objects used in an object-oriented program

can take on many different forms

 Objects include menus, radio buttons, and buttons

included in most Windows programs

 An object also can represent something

Trang 17

An Object:

 Is Anything that can be seen or touched

 Has attributes that describe it

 Has behaviors that the object can either perform or have performed on it

Trang 18

OOP Terminology

 The attributes are the characteristics that

describe the object

 An object’s behaviors , on the other hand, are the operations (actions) that the object is capable of performing

 A class is a pattern or blueprint used to create an object

Trang 19

OOP Terminology

 A class contains—or, in OOP terms, it

encapsulates —all of the attributes and behaviors that describe the object the class creates

 Objects created from a class are referred to as

instances of the class, and are said to be

“instantiated” from the class

 Abstraction refers to the hiding of the internal

details of an object from the user

 Hiding the internal details helps prevent the user

from making inadvertent changes to the object

Trang 20

 Allows you to create one class from

another class

 The new class is called the derived class

 The original class is called the base class

Trang 21

 The new class, called the derived class, inherits

the attributes and behaviors of the original class, called the base class

 Polymorphism is the object-oriented feature that allows the same instruction to be carried out

differently depending on the object

Trang 22

Monthly Payment Application

Trang 23

Using the Tutorials Effectively

 The tutorials in this book will help you learn about

Microsoft Visual Basic NET, the newest version

of the Visual Basic programming language

 At the end of Lesson C in each tutorial you will

find one or more Debugging exercises

 In programming, the term debugging refers to the process of finding and fixing any errors in a

program

Trang 24

Using the Tutorials Effectively

 Hands-on at your computer

 Step-by-step approach

 Help? notes identify common problems and explain how to

get back on track

 Tip notes provide additional information about a procedure

 Each tutorial is divided into three lessons

 To review and reinforce a lesson’s concepts

 Summary

Ngày đăng: 24/10/2014, 10:04

TỪ KHÓA LIÊN QUAN

w