Posts

Showing posts from September, 2020

Control and Loop Structures in VB 6.0

  CONTROL STRUCTURES IN VB 6.0 Control Statements are used to control the flow of program's execution. Visual Basic supports control structures such as If... Then, If...Then ...Else, NestedIf...Then...Else and Select...Case   i. If...Then selection structure The If...Then selection structure performs an indicated action only when the condition is True; otherwise the action is skipped. Syntax of the If...Then selection If <condition> Then statement End If Example If average>75 Then txtGrade.Text = "A" End If   ii. If...Then...Else selection structure The If...Then...Else selection structure allows the programmer to specify that a different action is to be performed when the condition is True than when the condition is False. Syntax of the If...Then...Else selection If <condition > Then statements Else statements End If Example If average>50 Then txtGrade.Text = "Pass" Else txtGrade....

GRAPH THEORY

Image
  GRAPH THEORY DEFINITION A graph G = (V, E) consists of a non-empty set V, called the set of vertices (points, nodes) and a set  of ordered or unordered pairs of elements of V, called the edges E set (links), such that there is a mapping from the set E to the set of ordered or unordered pairs of elements of V. Example In the first graph, V = { A , B , C , D } E = {(A,B) , (A,C) , (A,D), (B,C), (B,D) , (C,D)} In the second graph, V = { E, F, G } E = {(F,E) , (E,G) , (G,F)} If an edge e ∈ E is associated with an ordered pair (u,v) or an unordered pair (u,v), where u,v ∈ V, then e is said to connect or join the nodes u and v.  The edge e that connects the nodes u and v is said to be incident on each of the nodes.  The pair of each node that is connected by an edge is called adjacent nodes . Isolated Nodes If any node has no edges connected with any other node then its degree will be zero(0) and it will be called as isolated node. Adjacent Nodes Her...