Vbp-Unit 2
Vbp-Unit 2
Vbp-Unit 2
PROGRAMMING ESSENTIALS
UNIT 2: PROGRAMMING
FUNDAMENTALS
Unit Objectives
• Review the basic concepts of programming
• Create program design using flowchart and
pseudocode
• Explore the Integrated Development
Environment of Visual Studio .Net
• Create a simple Visual Basic .Net Project
Lesson Topic
259-260
SKILLS PRACTICE
261
END OF LESSON
DISCUSSION
LESSON 4: PSEUSODECODE AND
FLOWCHART
Lesson Topic
• What is Algorithm?
• What is Pseudocode?
• What is Flowchart?
What is Algorithm?
• An algorithm is a sequence of methods that
is performed by a computer to solve a
specific problem.
• It is formally a type of effective method in
which a list of well-defined instructions for
completing a task will, when given an initial
state, proceed through a well-defined series
of successive states, eventually terminating
in an end-state.
What is Algorithm?
Some properties of the algorithm are:
• Finiteness
• Absence of Ambiguity
• Sequence of Execution
• Input and Output
• Effectiveness
• Scope of Definition
What is Pseudocode?
• A PSEUDOCODE specifies the steps of
algorithm using language of control structure.
• It is a compact and informal high-level
description of a computer programming
algorithm that uses the structural conventions
of some programming language, but is
intended for human-reading rather than
machine-reading.
What is Pseudocode?
Example:
What is Pseudocode?
Here is another example of a pseudocode that
initializes two variables.
What is Flowchart?
• A FLOWCHART is a graphical
representation of the algorithm of the
program. It was introduced by Frank Gilberth
in 1921, and they were called “Process Flow
Chart”.
• A FLOWCHART should be used to see how a
whole process works. Flowchart identifies also
the critical points, bottlenecks, or problem
areas in the process.
What is Flowchart?
Types of Flowcharts
Flowcharts can be categorized into four main
types.
1. Document flowchart- showing controls
over a document-flow through a system,
such as payroll information, internal
memos, and office mail.
What is Flowchart?
2. System flowchart- showing controls on how
the entire system works by demonstrating
how data flows and what decisions are made
to control.
3. Data flowchart-showing controls over a
data-flow in a system.
4. Program flowchart-showing controls over
how program works within a system.
What is Flowchart?
The Flowchart Symbols
What is Flowchart?
What is Flowchart?
What is Flowchart?
What is Flowchart?
Flowcharting Guidelines
1. Flowcharts should be read from top to
bottom and left to right—the same way
you read a page in a book.
2. Avoid intersecting flow lines.
3. Use meaningful description in the symbol.
What is Flowchart?
4. Flowcharts should have plenty of “white
space.”
5. Flowcharts should have a title. A bunch of
symbols on a page can be confusing to read
and evaluate if you don’t know what
they’re trying to present.
6. Flowcharts can be designed using a variety
of tools, both high-tech and low-tech.
What is Flowchart?
Here is the flowchart equivalent of the previous
example for:
What is Flowchart?
Start
Enter Display
Student “Failed”
Grade
No
A
Is grade >= 60
Yes
Display
“Passed” Stop
What is Flowchart?
Start
Example 2
The flowchart Read m , n
given illustrates a
program that Yes m= m + n
accepts an integer
(m, n) and adds
them. If the sum Is m>10
illustrates a
Read
program that a,b,c Yes
accepts integers
a, b, c five times Sum=a+b+c
Count=count+1
and displays its
total sum. Is
count<=5 Display
No Stop
sum
What is Flowchart?
Example 4. Start
Print “average
is”, avg
End
What is Flowchart?
Now, let see what the process behind the
Average module is the following:
Average
Begin Average (a,b,c)
sum = a+b+c
avg = sum /3.0
sum = a + b + c return avg
avg = sum /3 End
Exit
TEST YOURSELF
262-263
SKILLS PRACTICE
264-265
END OF LESSON
DISCUSSION
LESSON 5 : INTRODUCTION TO
VISUAL STUDIO.NET AND VB.NET
Lesson Topic
• Visual Studio Solution: From 6.0 to .Net
Version
• Basic .Net Fundamentals
• Understanding VB.Net Programming
Concepts
• Exploring the Integrated Development
Environment
• Creating a Simple Visual Basic.Net Project
Visual Studio Solution: From 6.0 to .Net Version
Some of it is:
1. Process Dialog
In order to debug your DLL projects (a
Microsoft.Net component), you need to
launch an EXE that loads your
component
Visual Studio Solution: From 6.0 to .Net Version
3. Project References
To add an assembly reference to your
project, right click on the referencing
project in the Solution Explorer and choose
Add Reference.
4. Class View
The class view allows you to see the
metadata for the types in your project.
Visual Studio Solution: From 6.0 to .Net Version
5. Command Window
The command window has the ability to set
and get values from a stopped program just
like the immediate windows you used on
earlier IDE.
6. Designer-Friendly Custom Controls
You can create your own custom controls
with the designer attributes.
Visual Studio Solution: From 6.0 to .Net Version
7. Macros
A macro is a series of commands and
instructions that you group together as a
single command to accomplish a task.
8. Custom Add-ins
This allows programmers to add unlimited
numbers of features and functionalities
written in Visual Basic, C, C++, C#, or
any .Net Compliant language.
Visual Studio Solution: From 6.0 to .Net Version
9. Custom Tools
A Single-File Generator or a Custom Tool is
a COM extension for Visual Studio that
takes a project file as input, and produce
code.
10. Custom Wizards
These wizards are not called from a dialog
box. Instead, they are called directly from
add-ins, macros, or other types of code.
Basic .Net Fundamentals
The .NET Framework
The Microsoft Visual Basic programming
environment became very popular for its
ease of use and it was a candidate for
serious productive applications
Understanding VB.Net Programming Concepts
2 5
Exploring the Integrated Development
Environment
System
Tool bar Menu Bar
Tool
Title Bar
Solution
Explore
r
Toolbox Form
Properties
Server Explorer
Exploring the Integrated Development
Environment
266-267
SKILLS PRACTICE
268
END OF LESSON
DISCUSSION