Review Questions


1:

What is a major disadvantage of machine language?

A1:

A major disadvantage of machine language is that it is specific to the CPU for which it is written. The instruction set for one CPU is almost never the same as the instruction set of another CPU. Programs written in machine language cannot be run on a computer that is different from the one on which it was developed. Therefore, machine language programs are not portable.

2:

What is a mnemonic?

A2:

A mnemonic is a shorthand notation, or abbreviation, for a machine language instruction. For example, if the machine language instruction for a jump to a memory location is C3 (hex), the mnemonic might be JMP . The mnemonic is simply easier to remember than its numeric equivalent.

3:

What is source code?

A3:

Source code is the human-readable form of a program. For today's computers, any program ultimately resolves to binary digits. This means the program is a long sequence of 1s and 0s. It is the program source code that was translated into the binary code. The source code could be written in machine language or Visual Basic .NET, or anything in between.

4:

What is the difference between an interpreter and a compiler?

A4:

A compiler takes the source code of a program and converts it into binary code which is then saved as a program file. Therefore, when a compiled program is loaded into memory, it is ready to run because it is already in memory as binary instructions. An interpreted program is loaded into memory, but each program instruction must be converted into binary code by an interpreter. This means that both the program source code and the interpreter must be in memory at the same time. Because the interpreter must decode each instruction before the computer can execute it, interpreted programs run more slowly than compiled programs.

5:

What is a subroutine and why is it useful?

A5:

A subroutine is a piece of program code that is designed to perform a specific task. The advantage of a subroutine is that is can be used many times in a program and may be used in different programs. For example, if you write a subroutine that checks for valid phone numbers (that is, is there an area code and the proper number of digits), you can reuse that subroutine to check any phone number, be it a home, work, or cell phone. Without a subroutine, you would have to duplicate the code three times in the program to check the three types of phone numbers . Therefore, subroutines reduce the amount of code that must be written, tested , debugged , and maintained .

6:

What are the three cornerstones of OOP?

A6:

The three cornerstones of OOP are encapsulation, polymorphism, and inheritance.

7:

How would you fully qualify the Text property of a button control object named btnExit in a program that is placed on a form named frmTest ?

A7:

frmTest.btnExit.Text .



Visual Basic .NET. Primer Plus
Visual Basic .NET Primer Plus
ISBN: 0672324857
EAN: 2147483647
Year: 2003
Pages: 238
Authors: Jack Purdum

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net