[go: up one dir, main page]

0% found this document useful (0 votes)
19 views6 pages

Visual Basic Theory Notes

The document discusses programming languages, their levels, and advantages, highlighting high-level languages like Visual Basic for ease of use, assembly languages for speed and control, and machine languages for efficiency. It covers the programming process, including development steps, algorithms, types of errors, and object-oriented programming concepts such as encapsulation and inheritance. Additionally, it emphasizes the benefits of Visual Basic programming, including rapid application development and community support.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views6 pages

Visual Basic Theory Notes

The document discusses programming languages, their levels, and advantages, highlighting high-level languages like Visual Basic for ease of use, assembly languages for speed and control, and machine languages for efficiency. It covers the programming process, including development steps, algorithms, types of errors, and object-oriented programming concepts such as encapsulation and inheritance. Additionally, it emphasizes the benefits of Visual Basic programming, including rapid application development and community support.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 6

Program and Programming Languages:

A program is a set of instructions that a computer follows to perform a specific task.

A programming language is a formal language used to write computer programs. It consists of a set of rules,
symbols, and commands that the computer can understand and execute.

Levels of Programming Languages:

There are three levels of programming languages: high-level languages, assembly languages, and machine
languages.

High-level languages are the most human-readable and abstract, making them easier to write and
understand. Examples include Visual Basic, Java, and Python.

Advantages:

Easier to learn and use: High-level programming languages like VB have a syntax that is easier to read and
write than low-level languages. This makes it easier for developers to learn and use the language.

Faster development: High-level programming languages like VB have built-in libraries and tools that simplify
the development process. Developers can use pre-built components and functions to create complex
applications faster than with low-level languages.

Portability: High-level programming languages like VB are typically designed to be portable, which means they
can be used on multiple platforms without modification. This makes it easier to create applications that can
run on different operating systems and devices.

Higher productivity: High-level programming languages like VB can help developers be more productive
because they can focus on solving problems instead of worrying about low-level details like memory
management and hardware constraints.

Better code readability: High-level programming languages like VB have syntax that is easier to read and
understand than low-level languages. This makes it easier for developers to work on code written by others
and to collaborate on projects.

Assembly languages Assembly language is a low-level programming language that is used to write programs
that directly control computer hardware. They are more difficult to write and understand than high-level
languages.

Advantages

Speed: Assembly language programs can execute much faster than programs written in high-level languages
like VB. This is because assembly language provides direct access to the computer's hardware, allowing for
fine-tuned control over the execution of code.

Low-level control: Assembly language allows developers to have a high degree of control over the computer's
hardware, which can be important for certain types of applications, such as those that require direct access
to hardware resources like I/O ports or interrupts.
Efficient use of resources: Assembly language programs can be more efficient in their use of system resources
like memory and CPU cycles. This can be particularly important in embedded systems or other resource-
constrained environments.

Access to system functions: Assembly language allows developers to directly access system functions and
libraries that may not be available in high-level languages like VB. This can be useful for developing system-
level applications, device drivers, or other low-level software.

Interfacing with hardware: Assembly language can be useful for interfacing with hardware devices or writing
drivers for hardware components. It allows developers to write code that can interact with the hardware
directly, which can be necessary for some types of applications.

Machine languages are the lowest level of programming languages and are written in binary code (1s and 0s)
that can be directly executed by the computer.

Advantages.

Speed: Machine language programs execute faster than programs written in higher-level languages like VB, as
there is no need for an interpreter or compiler to translate the code into machine-readable instructions.

Direct control over hardware: Machine language allows developers to directly control the computer's
hardware, which can be necessary for certain types of applications, such as those that require low-level
access to memory or I/O devices.

Smaller program size: Programs written in machine language tend to be smaller than those written in higher-
level languages like VB, as there is no need for additional libraries or runtime environments.

Efficient use of resources: Machine language programs are highly efficient in their use of system resources
like memory and CPU cycles, making them well-suited for applications with strict performance requirements.

Access to low-level functionality: Machine language allows developers to directly access low-level system
functions and interrupts that may not be available in higher-level languages like VB. This can be useful for
developing system-level applications, device drivers, or other low-level software.

Translators, Compilers, and Interpreters:

Translators are programs that convert one programming language into another. For example, a program
written in Visual Basic can be translated into machine language.

Compilers are a type of translator that convert entire programs into machine code. This process is done
before the program is run.

Interpreters are another type of translator that convert code line-by-line at runtime.

Program Development Steps:


•Data Structures: defining the format and type of data the program will use.
•User Interface: the design of the screen the user will see and use to enter data or display data.
•Inputs: defining the kind of data to enter into the program.
4. Outputs: the possible data displayed from the system. Algorithms: the methods of calculating outputs
depending on the inputs.

Programming, a good programmer will consider;

4. Future Maintenance: any code that may be modified in future and should be allowed for when
writing the code.
5. Code Readability: this enables programmers to identify areas of code quickly and easily.
6. Documentation: a document showing how the program works.
7. Debug, virtually all programs have defects in them called 'bugs' and these need to be eliminated.
Special programming tools assist the programmer in finding and correcting bugs….debuggers. Some
bugs are difficult to locate and fixing them is like solving a complex puzzle.

Alpha Test, This is a small scale trial of the program. The application is given to a few experts to use and
assess whether it is going to meet their needs and that the user interface is suitable.

Beta Test, This is where the application is given to a selection of users with different levels of experience.
Deliver the software, the completed software is packaged with full documentation and delivered to
the end users. Software Maintenance, Upgrading and Debugging

Algorithms:

An algorithm is a set of steps that solve a problem or perform a specific task.

When writing a program, algorithms are used to plan and organize the code to ensure that it is efficient
and effective.

Algorithms can be represented using pseudo code or flowcharts.

Pseudo Code:

Pseudo code is a notation used to describe a program algorithm in plain English.

It is not an actual programming language, but rather a way to plan and organize code before it is written
in a programming language.

Pseudo code uses simple English phrases to describe program logic and structure.

Flow Charts:

A flow chart is a diagram that represents a program algorithm using symbols and arrows.

Flow charts are used to plan and organize code before it is written in a programming language. Symbols

used in flow charts include start and end symbols, decision symbols, and process symbols.
Types of errors

Compile time error, these are errors identified by the compiler when it is compiling your program.

Logical error, these come up when the program compiles and runs normally but it produces wrong results.

Runtime errors: These occur when the program is running and encounters a problem, such as trying to divide
by zero or access a file that does not exist. The program will usually display an error message and stop
running.

Object Oriented Programming Concepts


Encapsulation:

Encapsulation is the process of hiding the internal details of an object from the outside world. Inheritance
means that a new class can be created based on an existing class. By using encapsulation, you can protect the
object's data from unauthorized access or modification, and also improve code maintainability and
reusability.

Inheritance:

Inheritance is the process of creating new classes from existing ones, where the new classes inherit the
properties and behavior of the base class. By using inheritance, you can reduce code duplication, improve
code organization, and make your code more extensible and scalable.

Abstraction:

Abstraction is the process of identifying essential features of an object and ignoring the non-essential ones.
By using abstraction, you can simplify the complexity of your code and focus on what the object does,
rather than how it does it.

Polymorphism:

Polymorphism is the ability of an object to take on many forms, i.e., to behave differently in different
contexts.

By using polymorphism, you can create flexible and adaptable code that can work with different types of
objects without knowing their specific types in advance.
Benefits of Visual Basic Programming.

Easy to learn and use: VB has a user-friendly syntax that is easy to


understand and learn. It has a drag-and-drop interface for building
user interfaces and a large library of pre-built controls that can be
easily added to forms.

Rapid application development (RAD): VB provides a fast and


efficient way to develop applications, thanks to its RAD
capabilities. It has a large collection of pre-built components,
controls, and libraries that can be used to quickly create complex
applications.

Versatility: VB can be used to create a wide range of applications,


including desktop applications, web applications, and mobile
applications. It also integrates well with other Microsoft products,
such as Excel, Access, and SQL Server.

Object-oriented programming (OOP): VB supports OOP concepts,


such as encapsulation, inheritance, and polymorphism, which
makes it easier to create complex applications and maintain code.

Integration with .NET Framework: VB is part of the .NET


Framework, which provides a common set of libraries and tools
for building applications. This makes it easier to create
applications that can work together seamlessly.
Community support: VB has a large community of developers who
share their knowledge and expertise online. There are many
resources available, including tutorials, forums, and code
examples, which can be helpful for beginners and experienced
developers alike.

You might also like