<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-259104587845316746</id><updated>2011-11-28T05:17:21.002+05:00</updated><category term='dit notes'/><category term='technical board peshawar'/><category term='diploma of Information Technology'/><category term='visual basic'/><title type='text'>DIT Notes For Deploma Of Computer Sciences</title><subtitle type='html'>Deploma Of Information Technology Notes, Peshawar Technical Board, Peshawar Universtiy, Peshawar Commerce COllege</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dit-notes.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/259104587845316746/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dit-notes.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>sokaniwaal</name><uri>http://www.blogger.com/profile/03036988373905460557</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_JPaQhocksZY/SDokYZasQ4I/AAAAAAAAAEY/rc9niNX3ne4/S220/green_eyes.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-259104587845316746.post-254800461993031103</id><published>2009-06-22T00:59:00.000+06:00</published><updated>2009-06-22T01:00:15.933+06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual basic'/><title type='text'>Visual Basic Notes</title><content type='html'>Introduction To Visual Basic&lt;br /&gt;Visual Basic:&lt;br /&gt;Visual Basic is a tool that allows you to develop windows (Graphical User Interface-GUI) applications. Visual Basic is event-driven language, which means that the code remains idle unless called upon to respond to some event (button pressing, menu selection, mouse clicking,………….). When an event is detected, the code corresponding to that event is executed.&lt;br /&gt;Features of Visual Basic (VB):&lt;br /&gt;Visual Basic provides the following powerful features.&lt;br /&gt;o Full of objects-----you draw on the application form&lt;br /&gt;o Response to mouse and keyboard actions&lt;br /&gt;o Lots of icons and pictures for your use in application.&lt;br /&gt;o Clip board and printer access&lt;br /&gt;o Full Array of mathematical, String handling, and graphics functions&lt;br /&gt;o  Can handle fixed and dynamic variable and control arrays&lt;br /&gt;o Sequential and random access file support&lt;br /&gt;o ActiveX support&lt;br /&gt;o Powerful database access tools&lt;br /&gt;o Useful debugger and error-handling facilities&lt;br /&gt;VB ENVIRONMENT &lt;br /&gt;IDE (Integrated Development Environment)&lt;br /&gt;The Visual Basic IDE is a complete application development environment. The IDE allows you to design, develop and edit an application, debug it for possible errors and the run it to see the output. All these facilities are available in the VB IDE.&lt;br /&gt;The VB IDE consists of the following commonly used components or tools.&lt;br /&gt;1. Title Bar&lt;br /&gt;2. Menu Bar&lt;br /&gt;3. Tool Bar&lt;br /&gt;4. Form Window&lt;br /&gt;5. Toolbox&lt;br /&gt;6. Properties Window&lt;br /&gt;7. Form Layout Window&lt;br /&gt;8. Project Explorer Window&lt;br /&gt;9. Immediate window&lt;br /&gt;Now we explain these components briefly.&lt;br /&gt;1.  Title Bar: &lt;br /&gt;The title bar indicates the project name, the current Visual Basic operating mode, and the current form. The title bar appears at the top most of VB IDE.&lt;br /&gt;ii) Menu Bar:&lt;br /&gt;The menu bar has drop-down menus from which you control the operation of the Visual Basic environment. The menu bar consists of menus like File, Edit, View, Project, Debug, and Run etc.&lt;br /&gt; iii) Tool Bar:&lt;br /&gt;The tool bar has buttons that provide shortcuts to some of the menu options like  Add Project, New Form, and  Save project etc.&lt;br /&gt;iv) Form Window:&lt;br /&gt;The Form Window is the central point to developing Visual Basic applications. It is the place where you draw you application.&lt;br /&gt; v) Tool Box:&lt;br /&gt;The Tool Box is the selection menu for controls used in your application. The Tool Box contains a set of controls like label, command buttons, text boxes, list boxes, option buttons and so on.&lt;br /&gt;vi) Properties Window:&lt;br /&gt;The Properties Window is a set of properties or characteristics that will be assigned to various control objects during designing. These properties include control object name, appearance, back color, caption, size of control and so on.&lt;br /&gt; vii) Form Layout Window:&lt;br /&gt;The Form Layout Window shows where your application form will be displayed relative to your monitor’s screen when the program is executed.&lt;br /&gt; viii) Project Window:&lt;br /&gt;The project window displays a list of all forms and modules. These forms and modules make a Visual Basic application. The project window also contains a view of the form or code windows containing the actual basic coding.&lt;br /&gt;ix) Immediate Window: &lt;br /&gt;The Immediate Window is a small output window. The immediate window allows you to check simple calculations easily and immediately.&lt;br /&gt;You can enable it by using the short cut key Ctrl+G. The immediate window is for testing simple calculations like print 2+3, the immediate window will display the output is 5.&lt;br /&gt;BASIC CONTROLS&lt;br /&gt;Some of the Visual Basic controls are:&lt;br /&gt;1. Check Boxes&lt;br /&gt;2. Option Buttons&lt;br /&gt;3. Frames&lt;br /&gt;4. Command Buttons&lt;br /&gt;5. Labels&lt;br /&gt;6. Text Boxes&lt;br /&gt;7. List Boxes&lt;br /&gt;8. Combo Boxes&lt;br /&gt;9. Picture Boxes&lt;br /&gt;10. Drive List Boxes&lt;br /&gt;11. Directory List Box&lt;br /&gt;12. File List Box&lt;br /&gt;Now we explain them one by one as follow&lt;br /&gt;i) Check Boxes:&lt;br /&gt;       Check Boxes provide a way to make choices from a list of values. Some, all, or none of the choices in a group may be selected.&lt;br /&gt;Check Box Properties:&lt;br /&gt; The following are the properties of Check Box&lt;br /&gt;Caption………. Identifying text next to box&lt;br /&gt;Font.  …………Sets font type, style, size&lt;br /&gt;Values…………Indicates if Unchecked (0, Vbunchecked), &lt;br /&gt;                        Checked (1, Vbchecked)&lt;br /&gt;Check Box Events:&lt;br /&gt;Click………Triggered when a box is clicked. Value property is  automatically changed by Visual Basic&lt;br /&gt;Option Buttons&lt;br /&gt; &lt;br /&gt;Option Buttons provide the capability to make a single choice from a list of values. Hence option buttons work as a group, only one of which can a have a True (or selected) value.&lt;br /&gt;Option Buttons Properties:&lt;br /&gt; The following are the properties of Check Box&lt;br /&gt;Caption………. Identifying text next to button&lt;br /&gt;Font.  …………Sets font type, style, size&lt;br /&gt;Values…………Indicates if selected (True),or not (False) One button in a group of &lt;br /&gt;       option buttons  should always be initialized to True at design time.&lt;br /&gt;Option Buttons Box Events:&lt;br /&gt;Click………Triggered when a button is clicked. Value property is  automatically changed by &lt;br /&gt;                      Visual Basic.&lt;br /&gt;Frames + Command Buttons &lt;br /&gt;Frames provide a way of grouping related controls on a form. To group controls in a frame, you first draw the frame. Then the associated controls must be drawn in the frame. This allows you to move the frame and controls together. And once a control is drawn within a frame, it can be copied and pasted to create a control array within the frame.&lt;br /&gt;FRAME PROPERTIES:&lt;br /&gt;Caption………. Title information at the top of frame&lt;br /&gt; Font.  …………Sets font type, style, size&lt;br /&gt;iv- Command Buttons: Command Button is the most widely used control of the  Control box.&lt;br /&gt;Command Button Properties:&lt;br /&gt; The following are the properties of Command button&lt;br /&gt;          Appearance……Selects 3-D or flat appearance&lt;br /&gt;Caption………. text to be displayed on button&lt;br /&gt;Font.  …………Sets font type, style, size&lt;br /&gt;Command Button Events:&lt;br /&gt;Click………Triggered when button is clicked.&lt;br /&gt;Label Box + Text Box &lt;br /&gt;v- Label Boxes:&lt;br /&gt;A label box is a control that you use to display a text that user  can’t enter directly.&lt;br /&gt; Label Properties:&lt;br /&gt; The following are the properties of Label box.&lt;br /&gt;           Alignment……… Aligns caption within the border.&lt;br /&gt;          Appearance……Selects 3-D or flat appearance&lt;br /&gt;Caption………. text to be displayed on button&lt;br /&gt;Font.  …………Sets font type, style, size&lt;br /&gt;Label box Events:&lt;br /&gt;Click………Triggered when  label is clicked.&lt;br /&gt;Dbclick…..Triggered when  label is double-clicked.&lt;br /&gt;vi- Text Box:&lt;br /&gt;      A Text Box is used to display information entered at design time, by a user at run time, or assigned within code. The displayed text may be edited.&lt;br /&gt;Text Box Properties:&lt;br /&gt; The following are the properties of text box.&lt;br /&gt;Appearance……Selects 3-D or flat appearance&lt;br /&gt;         Caption………. text to be displayed on button&lt;br /&gt;Font.  …………Sets font type, style, size&lt;br /&gt;Border Style……Determines type of border.&lt;br /&gt;MultiLine……..Specifies whether text box displays single &lt;br /&gt;     line or multiple lines.&lt;br /&gt;Text  box Events:&lt;br /&gt;Change………Triggered every time the text box  property changes.&lt;br /&gt; KeyPress…..Triggered when  a key is pressed.&lt;br /&gt;List Box + Combo Box &lt;br /&gt;List Boxes:&lt;br /&gt;        A List Box displays a list of items from which the user can select one or more items. &lt;br /&gt;  List Box Properties:&lt;br /&gt; The following are the properties of list box.&lt;br /&gt;Appearance……Selects 3-D or flat appearance&lt;br /&gt;          List………. Array of items in list box.&lt;br /&gt;Sorted.……True means items are selected, otherwise &lt;br /&gt;items appear as added.&lt;br /&gt;          ListCount…. Number of items in list.&lt;br /&gt;          Text……….Text of most recently selected items.&lt;br /&gt;List  box Events:&lt;br /&gt;Click……Triggered when an item in list is clicked.&lt;br /&gt;Dbclick…Triggered when an item in list is double- clicked.&lt;br /&gt;vii- Combo Box:&lt;br /&gt;The combo box is similar to the list box. The differences are a combo box includes a textbox on top of a list box and only allows selection of one item.&lt;br /&gt;Combo Box Properties:&lt;br /&gt; The following are the properties of Combo box.&lt;br /&gt;Appearance……Selects 3-D or flat appearance&lt;br /&gt;         List………. Array of items in list box portion.&lt;br /&gt;Sorted.……True means items are selected, otherwise &lt;br /&gt;items appear as added.&lt;br /&gt;          ListCount…. Number of items in list.&lt;br /&gt;          Text……….Text of most recently selected items.&lt;br /&gt;Combo box Events:&lt;br /&gt;Click……Triggered when an item in list is clicked.&lt;br /&gt;Dbclick…Triggered when an item in list is double- clicked.&lt;br /&gt;Picture Boxes&lt;br /&gt;The picture box allows you to place graphics information on a form. &lt;br /&gt;It is best suited for dynamic environments. For example, when doing animation.&lt;br /&gt;Picture box Properties:&lt;br /&gt;       The following are the properties of Picture box.&lt;br /&gt;          AutoSize……if True, box adjusts its size to fit the   displayed graphic.&lt;br /&gt;           Font……. Sets the font size, style, and size of picture.&lt;br /&gt;           Picture….. Sets the graphics file to display in the picture box.&lt;br /&gt;         Picture box Events:&lt;br /&gt;Click……Triggered when a picture box is clicked.&lt;br /&gt;Dbclick…Triggered when a picture box is double-clicked.&lt;br /&gt;Drive List Box + Directory List Box &lt;br /&gt;The Drive List Box control allows a user to select a valid disk drive at run-     time. It displays the available drives in a drop-down combo box. No code is needed to load a drive list box. &lt;br /&gt;         Drive List Properties:&lt;br /&gt;         Drive……..Contains the name of the currently selected drive.&lt;br /&gt;         Drive List Events:&lt;br /&gt;         Change……Triggered when the user/program changes the drive selection.&lt;br /&gt;xi- Directory List Box:&lt;br /&gt;The Directory List Box control displays an ordered, hierarchical list of user’s disk directories and sub directories. &lt;br /&gt;Directory List Box Properties:&lt;br /&gt;                         Path……..Contains the current directory path.&lt;br /&gt;         Directory List Box Events:&lt;br /&gt;      Change……Triggered when the directory selection is changed.&lt;br /&gt;xii- File List Box:&lt;br /&gt;The File List Box control locates and lists files in the directory specified by its path property at run-time.     &lt;br /&gt;File List Box Properties:&lt;br /&gt;            FileName……..Contains the  currently selected file name.&lt;br /&gt;        Path……….Contains the current directory path.      &lt;br /&gt; File List Box Events:&lt;br /&gt;            Dbclick…Triggered when an item in list is double-clicked.&lt;br /&gt;Basic Concepts of Visual Basic &lt;br /&gt;Variables &lt;br /&gt;Variables are used by Visual Basic to hold information needed by an application. A variable has to be declared before using it in an application.&lt;br /&gt;General syntax for declaring a variable is as follow&lt;br /&gt;Dim variblename As datatype&lt;br /&gt;Where variablename is any valid name of variable, and datatype show the type of the data that will be stored in the variblename. &lt;br /&gt;Variable Declaration&lt;br /&gt;There are 3 ways for a variable to be declared.&lt;br /&gt;1. Default.&lt;br /&gt;2. Implicit&lt;br /&gt;3. Explicit&lt;br /&gt;i.      Default Declaration&lt;br /&gt;If  variables are not implicitly or explicitly declared. They are assigned the variant type of default. The variant data type is a special type used by VB that may contain numeric, string or double/float data. &lt;br /&gt;        A variable can be declared using the default declaration as &lt;br /&gt;        Dim  Var1, Var2&lt;br /&gt;Var1=”Ali”&lt;br /&gt;        Var2=300&lt;br /&gt;Here Var1 &amp; Var2 are the variables of type varient. Var1 holds the string data &lt;br /&gt;“Ali” &amp; Var2 holds the numeric data 300.&lt;br /&gt;Note that in the default declaration the As datatype part is optional, the datatype is the variant by default.&lt;br /&gt;ii.     Implicit declaration&lt;br /&gt;        To implicitly declare a variable, use the corresponding suffix. For example &lt;br /&gt;        Name$=”Ali Khan” creates a sting variable&lt;br /&gt;        While &lt;br /&gt;        Marks%=300 creates a Integer variable&lt;br /&gt;Different variblenames have different suffix for datatypes as shown in the following table. &lt;br /&gt;Data Type               Suffix                   Example&lt;br /&gt;String                        $                        Name$=”Ali”&lt;br /&gt;Integer                       %                      Marks%= 300&lt;br /&gt;Long                          &amp;                       Distance&amp;=654&lt;br /&gt;String (Floating)        !                         Age!=20.5&lt;br /&gt;Double                       #                       Average# = 345.67435&lt;br /&gt;Currency                   @                      Price@ =$20&lt;br /&gt;Date                           None                 Dob=01-03-1976&lt;br /&gt;Object                        None                 Mybutton = Picture&lt;br /&gt;Name                          None                Var1=500&lt;br /&gt;iii.    Explicit Declaration&lt;br /&gt;            The general syntax for explicit declaration is as follow&lt;br /&gt;        Dim Variable as Data type&lt;br /&gt;e.g.  Dim myname  As String&lt;br /&gt;        Dim Marks As Integer&lt;br /&gt;        Dim Average As Double&lt;br /&gt;Now assigning values to these variables, we have  &lt;br /&gt;myname = “Ali”&lt;br /&gt;        Marks= “300”&lt;br /&gt;        Average= 35.667&lt;br /&gt;Rules for naming variables&lt;br /&gt;The following are the rules for naming variables.&lt;br /&gt;o A variable name must begin with letter.&lt;br /&gt;o A variable name must not exceed 40 characters.&lt;br /&gt;o A variable name must be unique in its scope.&lt;br /&gt;o Reserved words are not allowed.&lt;br /&gt;o No blank spaces are allowed in variable name.&lt;br /&gt;Types of Variables&lt;br /&gt;There are six main types of variables.&lt;br /&gt;1. Numeric      &lt;br /&gt;2. String&lt;br /&gt;3. Boolean&lt;br /&gt;4. Date&lt;br /&gt;5. Variant&lt;br /&gt;6. Object. &lt;br /&gt;Now we explain them one by one briefly as follow.&lt;br /&gt;1. Numeric&lt;br /&gt;Numeric variables are used to store numbers in Visual Basic. Numeric data types include:&lt;br /&gt;1. Integer Variable     &lt;br /&gt;It can be declared as follow&lt;br /&gt;Dim SNo As Integer. &lt;br /&gt;1. Long Integer    &lt;br /&gt;      It can be declared as follow&lt;br /&gt;Dim Distance as Long&lt;br /&gt;1. Double Variable&lt;br /&gt;      It can be declared as follow&lt;br /&gt;            Dim area as double&lt;br /&gt;1. Currency Variable&lt;br /&gt;      It can be declared as follow&lt;br /&gt;  &lt;br /&gt;Dim Price As currency&lt;br /&gt;1. String &lt;br /&gt;String Variables are used to store the string/text data e.g. a studentname or address&lt;br /&gt;It can be declared as follow&lt;br /&gt;Dim myname As String&lt;br /&gt; &lt;br /&gt;1. Boolean&lt;br /&gt;The Boolean variable store either true or false value. It can be declared as follow&lt;br /&gt;                Dim Check as Boolean&lt;br /&gt;To initialize the check             &lt;br /&gt;Check = True or Check = 5       &lt;br /&gt;Both hold true values in Check. &lt;br /&gt;1. Date &lt;br /&gt;The date variables are used to store both date and time. It can be declared as follow&lt;br /&gt;Dime DOB as Date&lt;br /&gt;To initialize it, we have &lt;br /&gt;e.g   DOB = “01-02-2000” &lt;br /&gt;       DOB =  “3:30:30 am”&lt;br /&gt;       v.            Variant     &lt;br /&gt;The variant variable is the most flexible data type of Visual Basic variables, &lt;br /&gt;because it can accommodate other date types. A variant variable can be &lt;br /&gt;declared as &lt;br /&gt;                Dim Var1 as Variant&lt;br /&gt;                Dim Var 2 as Variant&lt;br /&gt;                Var1 = “Ali”&lt;br /&gt;                Var2 = 300&lt;br /&gt;If variant variable holds string value, Visual Basic treats it as string. &lt;br /&gt;If variant variable holds Inter value VB treats it as Integer.&lt;br /&gt;Note: It is important to note that when a variable is used without declaring it, then the default type of that variable will be variant.&lt;br /&gt;e.g.  Dim Var1&lt;br /&gt;                        Dim Var2&lt;br /&gt;        Var1 = “Ali”&lt;br /&gt;        Var2 = 300&lt;br /&gt;                The Var1 &amp; Var2 are now considered by default as variant (as above) &lt;br /&gt;    vi.Object:&lt;br /&gt;An object type variable refers to any one of Visual Basic object controls in tool box. An Object variable can be declared as &lt;br /&gt;                Dim Var1 as command Button&lt;br /&gt;                To initialize it &lt;br /&gt;                        Set Var1=Command1&lt;br /&gt;                        Now the following have the same purpose&lt;br /&gt;                        Command1.caption = “Save”&lt;br /&gt;                        Or  Var1.caption.”Save”&lt;br /&gt;Scope(Visibility) And Life Time Of Variables&lt;br /&gt;To explicitly declare a variable, you first determine its scope. There are four levels of scope.&lt;br /&gt;1. Procedure Level&lt;br /&gt;2. Procedure Level, Static&lt;br /&gt;3. Form and module Level&lt;br /&gt;4. Global Level&lt;br /&gt;Now we explain each one of them briefly.&lt;br /&gt;1. PROCEDURE LEVEL:&lt;br /&gt;Within a procedure, variables are declared with the Dim statement as&lt;br /&gt;Dim mysno As Integer&lt;br /&gt;Dim myname As String&lt;br /&gt;Dim myage As Double&lt;br /&gt;Procedure level variables declared in this manner do not retain their values once a procedure terminates. So the scope and lifetime of a procedure level variable is limited to the lifetime of a procedure.&lt;br /&gt;II) PROCEDURE LEVEL, STATIC:&lt;br /&gt;To make a procedure level variable retains its value upon exiting the procedure, replace the Dim keyword with Static as follow&lt;br /&gt;Static mysno As Integer&lt;br /&gt;Static myname As String&lt;br /&gt;Static myage As Double&lt;br /&gt;III)FORM AND MODULE LEVEL&lt;br /&gt; Form level variables retain their values and are available to all the procedures within that form(module). Form level variables are declared in the declaration part of the general object in the form’s(module’s) code window. The Dim keyword is used as follow&lt;br /&gt;Dim mysno As Integer&lt;br /&gt;Dim myname As String&lt;br /&gt;Dim myage As Double&lt;br /&gt;IV) GLOBAL LEVEL:&lt;br /&gt;Global variables retain their values and are available to all the procedures within an application. Module level variables are declared in the declaration part of the general object of a module’s code window. The Global keyword is used as follow&lt;br /&gt;Global mysno As Integer&lt;br /&gt;Global myname As String&lt;br /&gt;Global myage As Double&lt;br /&gt;EXAMPLE OF VARIABLE SCOPE:&lt;br /&gt;             Module1&lt;br /&gt; &lt;br /&gt;Procedure Routine 1 has access to X, Y and A (does not retain values upon termination)&lt;br /&gt;Procedure Routine 2 has access to X, Y and B (retains values)&lt;br /&gt;Procedure Routine 3 has access to X, Z and A (does not retain values upon termination)&lt;br /&gt;Operators &lt;br /&gt;Operators are the words or symbols, which cause a program to perform some action on data.&lt;br /&gt;Types of Operators&lt;br /&gt; Visual Basic supports the following three types of operators.&lt;br /&gt;1. Arithmetic operators&lt;br /&gt;2. Relational operators&lt;br /&gt;3. Logical operators&lt;br /&gt;Now we explain them one by one briefly.&lt;br /&gt;1. Arithmetic operators. &lt;br /&gt;Visual Basic supports the following arithmetic operators.&lt;br /&gt;Operators        Purpose&lt;br /&gt; &lt;br /&gt;    +             To add numbers &lt;br /&gt;                _              To subtract numbers&lt;br /&gt;        *              To multiply numbers&lt;br /&gt;        /               To divide numbers (Real)&lt;br /&gt;        \               To divide numbers (integer)&lt;br /&gt;                ^              To find exponentiation of numbers&lt;br /&gt;      Mod          To find the remainder of numbers when divided        Program Example1:  Using the + operator       &lt;br /&gt;Option Explicit                      &lt;br /&gt;                                 Dim Number1 As  Integer&lt;br /&gt;                                  Dim Number2 As  Integer&lt;br /&gt;                                  Dim Result As  Integer&lt;br /&gt;                                &lt;br /&gt;                Sub         form1_activate( )&lt;br /&gt;                               Number1=10&lt;br /&gt;                               Number2=4&lt;br /&gt;                               Result=Number1+ Number2&lt;br /&gt;                                Print Result&lt;br /&gt;              End Sub &lt;br /&gt;           OUTPUT: 14&lt;br /&gt;Program Example2:  Using the - operator        &lt;br /&gt;Option Explicit                      &lt;br /&gt;                                  Dim Number1 As  Integer&lt;br /&gt;                                  Dim Number2 As  Integer&lt;br /&gt;                                  Dim Result As  Integer&lt;br /&gt;                        Sub         form1_activate( )&lt;br /&gt;                               Number1=10&lt;br /&gt;                               Number2=4&lt;br /&gt;                               Result=Number1- Number2&lt;br /&gt;                               Print Result&lt;br /&gt;                         End Sub &lt;br /&gt;      OUTPUT: 6 &lt;br /&gt;Program Example3:  Using the * operator&lt;br /&gt;                        &lt;br /&gt;Option Explicit                      &lt;br /&gt;                                  &lt;br /&gt;             Dim Number1 As  Integer&lt;br /&gt;                             Dim Number2 As  Integer&lt;br /&gt;                             Dim Result As  Integer&lt;br /&gt;                        &lt;br /&gt;                Sub         form1_activate( )&lt;br /&gt;                               Number1=10&lt;br /&gt;                               Number2=4&lt;br /&gt;                               Result=Number1* Number2&lt;br /&gt;                                Print Result&lt;br /&gt;                &lt;br /&gt;              End Sub &lt;br /&gt;           OUTPUT:40&lt;br /&gt;Program Example4:  Using the  / operator (Real Division)&lt;br /&gt;Option Explicit                      &lt;br /&gt;                                  &lt;br /&gt;             Dim Number1 As  Integer&lt;br /&gt;                                  Dim Number2 As  Integer&lt;br /&gt;                                  Dim Result As  Integer&lt;br /&gt;                                &lt;br /&gt;                Sub         form1_activate( )&lt;br /&gt;                               Number1=10&lt;br /&gt;                               Number2=4&lt;br /&gt;                               Result=Number1/ Number2&lt;br /&gt;                                Print Result&lt;br /&gt;                &lt;br /&gt;              End Sub &lt;br /&gt;           OUTPUT: 2.5&lt;br /&gt;Program Example5:  using the \ operator (Integer Division)&lt;br /&gt;                        &lt;br /&gt;Option Explicit                      &lt;br /&gt;                                  &lt;br /&gt;       Dim Number1 As  Integer&lt;br /&gt;                                  Dim Number2 As  Integer&lt;br /&gt;                                  Dim Result As  Integer&lt;br /&gt;                                &lt;br /&gt;                Sub         form1_activate( )&lt;br /&gt;                               Number1=10&lt;br /&gt;                               Number2=4&lt;br /&gt;                               Result=Number1\ Number2&lt;br /&gt;                                Print Result&lt;br /&gt;              End Sub &lt;br /&gt;           OUTPUT: 2 &lt;br /&gt;Program Example6:  Using the  ^ operator&lt;br /&gt;Option Explicit                      &lt;br /&gt;                                  Dim Number1 As  Integer&lt;br /&gt;                                  Dim Number2 As  Integer&lt;br /&gt;                                  Dim Result As  Integer&lt;br /&gt;                                &lt;br /&gt;                Sub         form1_activate( )&lt;br /&gt;                               Number1=2&lt;br /&gt;                               Number2=3&lt;br /&gt;                               Result=Number1^ Number2&lt;br /&gt;                                Print Result&lt;br /&gt;                End Sub&lt;br /&gt;           OUTPUT:( 2 ) 3= 8&lt;br /&gt; Program Example7:  Using the Mod operator&lt;br /&gt;                        &lt;br /&gt;Option Explicit                      &lt;br /&gt;                                  &lt;br /&gt;             Dim Number1 As  Integer&lt;br /&gt;                                  Dim Number2 As  Integer&lt;br /&gt;                                  Dim Result As  Integer&lt;br /&gt;                                &lt;br /&gt;                Sub         form1_activate( )&lt;br /&gt;                               Number1=5&lt;br /&gt;                               Number2=3&lt;br /&gt;                               Result=Number1 Mod Number2&lt;br /&gt;                                Print Result&lt;br /&gt;             End Sub &lt;br /&gt;           OUTPUT:  2 (Remaider, when divieded 5 by 3)&lt;br /&gt;OR&lt;br /&gt; A single Visual Basic Program that uses all the above Arithmetic  &lt;br /&gt;Operators.&lt;br /&gt;Program Example:  Using the +,-,*,/, \,^, and Mod operators&lt;br /&gt;                        &lt;br /&gt;Option Explicit                      &lt;br /&gt;                                  &lt;br /&gt;       Dim Number1 As  Integer&lt;br /&gt;                            Dim Number2 As  Integer&lt;br /&gt;                            Dim Add As  Integer&lt;br /&gt;                       Dim Sub As  Integer&lt;br /&gt;                       Dim Mul As  Integer&lt;br /&gt;                       Dim Div1 As  double&lt;br /&gt;                       Dim Div2 As  Integer&lt;br /&gt;       Dim Exp As  Integer&lt;br /&gt;                       Dim Rem As  Integer&lt;br /&gt;                                                &lt;br /&gt;                Sub         form1_activate( )&lt;br /&gt;                               Number1=5&lt;br /&gt;                               Number2=2&lt;br /&gt;                         Add=Number1+ Number2&lt;br /&gt;                     Sub= Number1- Number2&lt;br /&gt;                     Mul= Number1* Number2&lt;br /&gt;     Div1= Number1/ Number2&lt;br /&gt;                     Div2= Number1\ Number2&lt;br /&gt;             Exp= Number1^ Number2&lt;br /&gt;             Rem= Number1 Mod  Number2&lt;br /&gt;                                        &lt;br /&gt;                Print Add &lt;br /&gt;Print  Sub&lt;br /&gt;                Print  Mul&lt;br /&gt;Print Div1&lt;br /&gt;Print Div2&lt;br /&gt;                Print  Exp&lt;br /&gt;                Print  Rem&lt;br /&gt;              End Sub &lt;br /&gt;          OUTPUT: 7&lt;br /&gt;OUTPUT: 3&lt;br /&gt;OUTPUT: 10&lt;br /&gt;OUTPUT: 2.5&lt;br /&gt;OUTPUT: 2&lt;br /&gt;OUTPUT: 25&lt;br /&gt;OUTPUT: 1&lt;br /&gt;OR&lt;br /&gt;A VB program that contains a Form and three text boxes  and one command button Add, when the Add button is clicked the numbers in the  two text boxes is added and the result displays in the third text box Result.&lt;br /&gt;We write the following code in the click event of command button Add for the above  program.&lt;br /&gt;Sub command1_Click( )&lt;br /&gt;Text3.Text= Val (Text1.Text) +Val (Text2.Text)&lt;br /&gt;End Sub&lt;br /&gt;OR&lt;br /&gt;Write the above program using variables in the option explicit &lt;br /&gt;Option Explicit                      &lt;br /&gt;                                  &lt;br /&gt;       Dim Number1 As  Integer&lt;br /&gt;                       Dim Number2 As  Integer&lt;br /&gt;                       Dim Add As  Integer&lt;br /&gt;                       Dim Sub As  Integer&lt;br /&gt;                       Dim Mul As  Integer&lt;br /&gt;                       Dim Div1 As  double&lt;br /&gt;                       Dim Div2 As  Integer&lt;br /&gt;       Dim Exp As  Integer&lt;br /&gt;                       Dim Rem As  Integer&lt;br /&gt;                                                &lt;br /&gt;                Sub         form1_activate( )&lt;br /&gt;                               Number1=Val ( Text1.Text)&lt;br /&gt;                               Number2=Val (Text2.Text)&lt;br /&gt;                               Add=Number1+ Number2&lt;br /&gt;                     Sub= Number1- Number2&lt;br /&gt;                     Mul= Number1* Number2&lt;br /&gt;     Div1= Number1/ Number2&lt;br /&gt;                     Div2= Number1\ Number2&lt;br /&gt;             Exp= Number1^ Number2&lt;br /&gt;             Rem= Number1 Mod  Number2&lt;br /&gt;        &lt;br /&gt;                    Print   Add &lt;br /&gt;Print  Sub&lt;br /&gt;                Print  Mul&lt;br /&gt;Print  Div1&lt;br /&gt;Print  Div2&lt;br /&gt;                Print  Exp&lt;br /&gt;                Print  Rem&lt;br /&gt;   End Sub&lt;br /&gt;2- Relational Operators/ Comparison Operators&lt;br /&gt;Visual Basic   supports six comparison operators.&lt;br /&gt;Operator                  Purpose&lt;br /&gt;  &lt;                                Less than&lt;br /&gt;   &gt;                               Greater than&lt;br /&gt;  &lt; =                            Less than or Equal to&lt;br /&gt;  &gt; =                            Greater than or Equal to&lt;br /&gt;   =                              Equal to&lt;br /&gt;  &lt; &gt;                             Not Equal to&lt;br /&gt;3- Logical Operators&lt;br /&gt;     There are three logical operators used by Visual Basic.&lt;br /&gt;     They are as follow&lt;br /&gt;   Operator               Purpose&lt;br /&gt;  &lt;br /&gt; AND             The expression with AND operator returns &lt;br /&gt;True value if operators on both sides of AND   operator are true otherwise return false.&lt;br /&gt;  &lt;br /&gt; OR               The expression with OR operator returns &lt;br /&gt;True value if at least one operator on both sides of OR operator is true otherwise return false.&lt;br /&gt;        &lt;br /&gt;         NOT                 The NOT operator is used for negation purpose.&lt;br /&gt;COMMENTS (REMARKS)&lt;br /&gt;Remarks are used to make a program more readable and understandable.&lt;br /&gt;The remarks are ignored by compiler and interpreter.&lt;br /&gt;       &lt;br /&gt; HOW TO ADD REMARKS:&lt;br /&gt;If you place ‘ (single quote) at the start of a line or Rem keyword at the start of a Visual Basic statement, then the statement will become a remark and will ignored by the compiler.&lt;br /&gt;For Example:&lt;br /&gt;This is a simple program to test remarks.&lt;br /&gt;Rem This is a simple program to test remarks.&lt;br /&gt;         The above both the two lines are equivalent and represent remarks.&lt;br /&gt;Concatenation of Strings:&lt;br /&gt;For concatenation of strings Visual Basic use the &amp; symbol or + symbol.&lt;br /&gt;For Example: Suppose we have two strings s1, s2 to be concatenated &lt;br /&gt;        and assigned to a third string s3.&lt;br /&gt;                        S1=”Hello”&lt;br /&gt;                        S2=”Boys”&lt;br /&gt;                         S3=S1+S2&lt;br /&gt;Now s3 will have the value  ”Hello Boys”&lt;br /&gt;SELECTION STRUCTURE STATEMENTS&lt;br /&gt;Decision making statements of Visual Basic consists of the following:&lt;br /&gt;1. If-Then&lt;br /&gt;2. If-Then-Else&lt;br /&gt;3. Select statement&lt;br /&gt;Now we explain them one by one as follow&lt;br /&gt;1. If –Then:&lt;br /&gt;If-Then statement is used to perform an action if the condition is true, otherwise it skips the action.&lt;br /&gt;General Synatx:&lt;br /&gt;If condition   Then statement End if&lt;br /&gt;OR          If condition Then&lt;br /&gt;         Statement&lt;br /&gt;             End if&lt;br /&gt;Program Example1: &lt;br /&gt;Start Visual Basic with standard, Exe file, Place a command button on the form, and write the following code in click event.&lt;br /&gt;   Dim I As Integer&lt;br /&gt;Dim J As Integer&lt;br /&gt;I=20&lt;br /&gt;J=10&lt;br /&gt;If (I&gt;J) Then&lt;br /&gt;     Print “Large Number is=”,I&lt;br /&gt;End if&lt;br /&gt;OUTPUT: Large Number is=20&lt;br /&gt;Program Example2: Now we modify the above program.&lt;br /&gt;              Suppose now the if condition is false, so the it will display nothing.&lt;br /&gt;    Dim I As Integer&lt;br /&gt;Dim J As Integer&lt;br /&gt;I=10&lt;br /&gt;J=20&lt;br /&gt;If (I&gt;J) Then&lt;br /&gt;     Print “Large Number is=”,I&lt;br /&gt;End if&lt;br /&gt;OUTPUT:                (No output as the test condition is false now)&lt;br /&gt;Program Example 3: The above program that will check the condition on the data entered from keyboard by a user. &lt;br /&gt;    Dim I As Integer&lt;br /&gt;Dim J As Integer&lt;br /&gt;I=InputBox(“Enter a value for I”)&lt;br /&gt;J= InputBox(“Enter a value for J”)&lt;br /&gt;If (I&gt;J) Then&lt;br /&gt;     Print “Large Number is=”,I&lt;br /&gt;End if&lt;br /&gt;OUTPUT: …………&lt;br /&gt;               Here the output will depend on the values of I &lt;br /&gt; and j.&lt;br /&gt;1. If-Then-Else:&lt;br /&gt;If-Then-Else statement is used to perform one action if the condition is true, otherwise perform another action in case the condition is false.&lt;br /&gt;General Synatx:&lt;br /&gt;        &lt;br /&gt;          If condition Then&lt;br /&gt;                  Statement1&lt;br /&gt;          Else&lt;br /&gt;                   Statement 2    &lt;br /&gt;        End if&lt;br /&gt;EXPLAINATION: Here statement1 is executed if the condition is true, if the condition is false then the statement2 is executed. The following program will explain this statement.&lt;br /&gt;Program Example1: Start Visual Basic with standard Exe file, Place a command button on the form, and write the following code in click event.&lt;br /&gt;                   (This program finds the maximum value of two values)&lt;br /&gt; &lt;br /&gt;    Dim I As Integer&lt;br /&gt;Dim J As Integer&lt;br /&gt;I=10&lt;br /&gt;J=20&lt;br /&gt;If (I&gt;J) Then&lt;br /&gt;     Print “Larger Number is=”,I&lt;br /&gt;Else&lt;br /&gt;    Print “ Larger Number is=”, J&lt;br /&gt;End if&lt;br /&gt;OUTPUT: Larger Number is=20&lt;br /&gt;1. Nested If-Then-Else/ Nested Selection Structure:&lt;br /&gt;When one If-Then-Else statement is the part of another If-Then-Else statement, then it is called Nested If-Then-Else Statement.&lt;br /&gt;Nested If-Then-Else structure is used to handle multiple choices.&lt;br /&gt;General Synatx:&lt;br /&gt;        &lt;br /&gt;          If condition1 Then&lt;br /&gt;                    Statement1&lt;br /&gt;          Else&lt;br /&gt;    If condition2 Then&lt;br /&gt;                  Statement2&lt;br /&gt;         ………………………&lt;br /&gt;        ………………………   &lt;br /&gt;      Else&lt;br /&gt; If condition n Then&lt;br /&gt;               Statement n&lt;br /&gt;        &lt;br /&gt;End if&lt;br /&gt;         End if&lt;br /&gt;         End if          &lt;br /&gt;         &lt;br /&gt; &lt;br /&gt;Program Example: Start Visual Basic with standard Exe file, Place a command button on the form, and write the  following code in click event&lt;br /&gt;(This program finds the largest/maximum value of three values)&lt;br /&gt;    Dim I As Integer&lt;br /&gt;Dim J As Integer&lt;br /&gt;Dim K As Integer&lt;br /&gt;I=5&lt;br /&gt;J=6&lt;br /&gt;K=7&lt;br /&gt;If   I&gt;J AND I&gt;K  Then&lt;br /&gt;     Print “Largest Number is=”,I&lt;br /&gt;Else&lt;br /&gt;If   J&gt;I AND J&gt;K  Then&lt;br /&gt;     Print “Largest Number is=”,J&lt;br /&gt;Else&lt;br /&gt;If   K&gt;J AND K&gt;I  Then&lt;br /&gt;     Print “Largest Number is=”,K&lt;br /&gt;End if&lt;br /&gt;End if&lt;br /&gt;End if&lt;br /&gt;OUTPUT: Largest Number is=7&lt;br /&gt;SELECT CASE STATEMENT:&lt;br /&gt;Like Nested If-Then-Else structure, the select case statement is also multiple selection structure. But it can handle multiple choices more efficiently.&lt;br /&gt;General Syntax:&lt;br /&gt;         Select   case   Expression&lt;br /&gt;         Case       Expression1&lt;br /&gt;                          Statement1&lt;br /&gt;         Case       Expression2&lt;br /&gt;                          Statement2&lt;br /&gt;          ………………………&lt;br /&gt;          ………………………&lt;br /&gt;         Case       Expression n&lt;br /&gt;                          Statement n&lt;br /&gt;         Case       Else&lt;br /&gt;                      Statement&lt;br /&gt;         End Select&lt;br /&gt;Note: Here the expression may be numeric or string  expression.&lt;br /&gt;Program Example1: Start Visual Basic with standard   Exe file, Place a command button on the form, and write the following code in click event&lt;br /&gt;   Dim choice As Integer&lt;br /&gt;        Choice=InputBox(“Enter a number”)&lt;br /&gt;   Select   case   choice&lt;br /&gt;         Case       1,2,3&lt;br /&gt;                          Print “Choice is in the range of 1……3”&lt;br /&gt;         Case       4,5,6&lt;br /&gt;                          Print “Choice is in the range of 4…6”&lt;br /&gt;Case       7,9,10&lt;br /&gt;                          Print “Choice is in the range of 7…10”&lt;br /&gt;                  &lt;br /&gt;         Case       Else&lt;br /&gt;                       Print “ Invalid Choice”&lt;br /&gt;         End Select&lt;br /&gt;Program Example2: Start Visual Basic with standard &lt;br /&gt;  Exe file, Place a command button     &lt;br /&gt;  on the form, and write the     &lt;br /&gt;  following code in click event&lt;br /&gt;Dim month As string&lt;br /&gt;                month=InputBox(“Enter a month name of the year”)&lt;br /&gt;Select   case   month&lt;br /&gt;         Case       “March”, “April”, “May”&lt;br /&gt;                          Print “Pleasant Season”&lt;br /&gt;         Case       “June”, “July”, “August”&lt;br /&gt;                          Print “Very hot  Season”&lt;br /&gt;         Case       “September”, “October”,“November”&lt;br /&gt;                          Print “Normal Season”&lt;br /&gt;         Case       “December”, “January”, “February”&lt;br /&gt;                          Print “Very Cold Season”&lt;br /&gt;                         &lt;br /&gt;         Case       Else&lt;br /&gt;                       Print “ Invalid month of the year”&lt;br /&gt;         End Select&lt;br /&gt;LOOPS&lt;br /&gt;Loop: When a single statement or more statements are to be executed again and again, then we  &lt;br /&gt;           use loop.&lt;br /&gt;Types of Loops: Visual Basic supports three types of loops. They include&lt;br /&gt;1. For -Next Loop&lt;br /&gt;2. While-Wend Loop&lt;br /&gt;3. Do-Loop&lt;br /&gt;Now we explain them one by one as follow.&lt;br /&gt;1. For Next Loop: For-Next Loop is used in a situation where we know in advance how many times a loop body has to be executed. For-loop is used for repetition of the loop body for a fixed number of times.&lt;br /&gt; &lt;br /&gt;General Syntax:&lt;br /&gt;The general syntax used for the For-Loop is as  follow&lt;br /&gt;For counter variable=Start value to End value [step n]&lt;br /&gt;Loop body&lt;br /&gt;Next counter variable&lt;br /&gt;Where counter variable shows any numeric value. The startvalue represents the initial value of the countervarible. Endvalue represents the final value of the countervariable. The loop body consists of one or more statements that will be executed again and again.&lt;br /&gt;The step value shows the change in increment. By default, the increment of countervariable is 1. &lt;br /&gt;However, you can change it by change in stepvalue. &lt;br /&gt;The keyword Next followed by countervariable is there to compare the countervariable (after stepvalue) with the Endvalue. &lt;br /&gt;PROGRAM EXAMPLE-1: &lt;br /&gt;Open Visual Basic with a Standard Exe file with a command button and write the following code in the click event of the button. &lt;br /&gt;        (This program displays Numbers from 1 to 10)&lt;br /&gt;         Dim I as integer&lt;br /&gt;          &lt;br /&gt;         For I=1 To  10 &lt;br /&gt;                   Print I&lt;br /&gt;          Next I  &lt;br /&gt;To run this program, Press F5 and click the command button ,you will see the output as follow.&lt;br /&gt;OUTPUT:  1&lt;br /&gt;    2&lt;br /&gt;    3 &lt;br /&gt;    4 &lt;br /&gt;    5&lt;br /&gt;    6&lt;br /&gt;    7&lt;br /&gt;    8&lt;br /&gt;    9&lt;br /&gt;    10 &lt;br /&gt;PROGRAM EXAMPLE-2: &lt;br /&gt;Open Visual Basic with a Standard Exe file with a command button and write the following code in the click event of the button. &lt;br /&gt;        (This program displays Odd Numbers from 1 to 10)&lt;br /&gt;          Dim I as integer&lt;br /&gt;          For I=1 To 10 step 2 &lt;br /&gt;                   Print I&lt;br /&gt;          Next I  &lt;br /&gt;To run this program, Press F5 and click the command button , you will see the output as follow.       &lt;br /&gt;OUTPUT:  1&lt;br /&gt;    3&lt;br /&gt;    5 &lt;br /&gt;    7 &lt;br /&gt;    9&lt;br /&gt;PROGRAM EXAMPLE-3: &lt;br /&gt;Open Visual Basic with a Standard Exe file with a command button and write the following code in the click event of the button. (This program displays Numbers from 1 to 10 in descending order)&lt;br /&gt;          Dim I as integer&lt;br /&gt;        &lt;br /&gt;           For I=10 To 1 step -1&lt;br /&gt;                   Print I&lt;br /&gt;           Next I  &lt;br /&gt;To run this program, Press F5 and click the command button ,you will see the output as follow.        &lt;br /&gt;OUTPUT:  10&lt;br /&gt;    9&lt;br /&gt;    8 &lt;br /&gt;    7 &lt;br /&gt;    6&lt;br /&gt;    5&lt;br /&gt;    4&lt;br /&gt;    3&lt;br /&gt;    2&lt;br /&gt;    1 &lt;br /&gt;   2- WHILE-WEND Loop.&lt;br /&gt;The while wend loop is used in a situation where we do not know in advance how many times the loop body has to be executed.&lt;br /&gt;General syntax &lt;br /&gt;While  codition&lt;br /&gt;Loop body&lt;br /&gt;Wend&lt;br /&gt;Explaination: The While-wend loop starts with the keyword while followed by a test Condition. If the test condition is  true, the loop body will be executed otherwise not. The loop body consists of statements that will be executed again and again. Then there is the keywords   wend which finalizes the while wends statement.&lt;br /&gt;PROGRAM EXAMPLE-1: &lt;br /&gt;Open Visual Basic with a Standard Exe file with a command button and write the following code in the click event of the button. &lt;br /&gt;      (This program displays Numbers from 1 to 10)&lt;br /&gt;          &lt;br /&gt;Dim I as integer&lt;br /&gt;             I=1&lt;br /&gt;         While I &lt;= 10 &lt;br /&gt;                   Print I&lt;br /&gt;                   I=I+1  &lt;br /&gt;         Wend&lt;br /&gt;To run this program, Press F5 and click the command button , you will see the output as follow.&lt;br /&gt;OUTPUT:  1&lt;br /&gt;    2&lt;br /&gt;    3 &lt;br /&gt;    4 &lt;br /&gt;    5&lt;br /&gt;    6&lt;br /&gt;    7&lt;br /&gt;    8&lt;br /&gt;    9&lt;br /&gt;   10 &lt;br /&gt;PROGRAM EXAMPLE-2: &lt;br /&gt;Open Visual Basic with a Standard Exe file with a command button and write the following code in the click event of the button. &lt;br /&gt;     (This program displays Odd Numbers from 1 to 10)&lt;br /&gt;          Dim I as integer&lt;br /&gt;            I=1&lt;br /&gt;          While I&lt;=10 &lt;br /&gt;                   Print I&lt;br /&gt;                   I=I+2&lt;br /&gt;          Wend  &lt;br /&gt;To run this program, Press F5 and click the command button, you will see the output as follow.&lt;br /&gt;OUTPUT:  1&lt;br /&gt;    3&lt;br /&gt;    5 &lt;br /&gt;    7 &lt;br /&gt;    9&lt;br /&gt;PROGRAM EXAMPLE-3: &lt;br /&gt;Open Visual Basic with a Standard Exe file with a command button and write the following code in the click event of the button. &lt;br /&gt;(This program displays Numbers from 1 to 10 in   &lt;br /&gt;       descending order)&lt;br /&gt;          Dim I as integer&lt;br /&gt;                  I=10&lt;br /&gt;          While I &gt;=1 &lt;br /&gt;                   Print I&lt;br /&gt;                   I=I-1&lt;br /&gt;          Wend              To run this program, Press F5 and click the command button , you will see the output as follow.&lt;br /&gt; OUTPUT: 10&lt;br /&gt;    9&lt;br /&gt;    8 &lt;br /&gt;    7 &lt;br /&gt;    6&lt;br /&gt;    5&lt;br /&gt;    4&lt;br /&gt;    3&lt;br /&gt;    2&lt;br /&gt;    1 &lt;br /&gt;3-Do-Loop&lt;br /&gt;Do-Loop is another type of loop. It is like while wend loop which is used to execute the loop body for an undermined number of times. It is  post-test loop unlike the for-next and do while loops which are pre-test loops. Here the loop body must be executed at least once before the test condition is checked. If  the test condition is true, the loop body will be executed for the next time otherwise not. &lt;br /&gt;General  Syntax&lt;br /&gt;Do &lt;br /&gt;Loop body&lt;br /&gt;Loop   While  testcondition&lt;br /&gt;OR&lt;br /&gt; &lt;br /&gt;Do [{While |until} condition ] &lt;br /&gt;Loop body&lt;br /&gt;Loop&lt;br /&gt;PROGRAM EXAMPLE-1: &lt;br /&gt;Open Visual Basic with a Standard Exe file with a command button and write the following code in the click event of the button. &lt;br /&gt;      (This program displays Numbers from 1 to 10)&lt;br /&gt;          Dim I as integer&lt;br /&gt;                  I=1    &lt;br /&gt;       Do&lt;br /&gt;                   Print I&lt;br /&gt;                   I=I+1  &lt;br /&gt;                   Loop While I &lt;= 10 &lt;br /&gt;         &lt;br /&gt;To run this program, Press F5 and you will see the output as follow.&lt;br /&gt;         &lt;br /&gt;OUTPUT:  1&lt;br /&gt;    2&lt;br /&gt;    3 &lt;br /&gt;    4 &lt;br /&gt;    5&lt;br /&gt;    6&lt;br /&gt;    7&lt;br /&gt;    8&lt;br /&gt;    9&lt;br /&gt;   10 &lt;br /&gt;PROGRAM EXAMPLE-2: &lt;br /&gt;Open Visual Basic with a Standard Exe file with a command button and write the following code in the click event of the button. &lt;br /&gt;(This program displays Odd Numbers from 1 to 10)&lt;br /&gt;          Dim I as integer&lt;br /&gt;               I=1          &lt;br /&gt;     Do          &lt;br /&gt;Print I&lt;br /&gt;I=I+2&lt;br /&gt;    Loop While I&lt;=10 &lt;br /&gt;  To run this program, Press F5 and click the command button ,you will see the output as follow.      &lt;br /&gt;OUTPUT:  1&lt;br /&gt;    3&lt;br /&gt;    5 &lt;br /&gt;    7 &lt;br /&gt;    9&lt;br /&gt;PROGRAM EXAMPLE-3: &lt;br /&gt;Open Visual Basic with a Standard Exe file with a command button and write the following code in the click event of the button. &lt;br /&gt;(This program displays Numbers from 1 to 10 in descending order)&lt;br /&gt;          Dim I as integer&lt;br /&gt;          &lt;br /&gt;           I=10&lt;br /&gt;                   Do          &lt;br /&gt;                   Print I&lt;br /&gt;                   I=I-1&lt;br /&gt;                   Loop While I &gt;=1 &lt;br /&gt;To run this program, Press F5 and you will see the output as follow.&lt;br /&gt;OUTPUT:  10&lt;br /&gt;    9&lt;br /&gt;    8 &lt;br /&gt;    7 &lt;br /&gt;    6&lt;br /&gt;    5&lt;br /&gt;    4&lt;br /&gt;    3&lt;br /&gt;    2&lt;br /&gt;    1  &lt;br /&gt;NESTED LOOP:&lt;br /&gt;When one loop statement (For-Next, While-Wend or Do-Loop) is used within the body of another loop statement, then it is called nested loop.&lt;br /&gt;In Visual Basic Nesting process can be done at many levels (For within For, For within Do-Loop or While wend loop).&lt;br /&gt;PROGRAM EXAMPLE-1: &lt;br /&gt;Open Visual Basic with a Standard Exe file with a command button and write the following code in the click event of the button. &lt;br /&gt;          Dim I as integer&lt;br /&gt;          Dim j as integer&lt;br /&gt;          Print   “ I  “, “ j “ &lt;br /&gt;         For I=1 To 3&lt;br /&gt;                 For j=1 To 3 &lt;br /&gt;                   Print I, J&lt;br /&gt;          Next I, J  &lt;br /&gt;To run this program, Press F5 and click the command button , you will see the output as follow.&lt;br /&gt;OUTPUT:  I               J&lt;br /&gt;    1               1 &lt;br /&gt;    1               2&lt;br /&gt;    1               3 &lt;br /&gt;    2               1&lt;br /&gt;    2               2&lt;br /&gt;    2               3&lt;br /&gt;    3               1&lt;br /&gt;    3               2&lt;br /&gt;    3               3&lt;br /&gt;PROGRAM EXAMPLE-2: &lt;br /&gt;Open Visual Basic with a Standard Exe file with a command button and write the following code in the click event of the button. &lt;br /&gt;          Dim I as integer&lt;br /&gt;          Dim j as integer&lt;br /&gt;          Print   “ I  “, “ j “ &lt;br /&gt;          For I=1 To 3&lt;br /&gt;                  j=1 &lt;br /&gt;      Do while j&lt;=3                   &lt;br /&gt;      Print I, J&lt;br /&gt;                  J=j+1&lt;br /&gt;                  Loop&lt;br /&gt;                  i=i+1    &lt;br /&gt;Next  I  &lt;br /&gt;To run this program, Press F5 and click the command button , you will see the output as follow.&lt;br /&gt;         &lt;br /&gt;OUTPUT:  I                J&lt;br /&gt;                    &lt;br /&gt;    1                1 &lt;br /&gt;    1                2&lt;br /&gt;    1                3 &lt;br /&gt;    2                1&lt;br /&gt;    2                2&lt;br /&gt;    2                3&lt;br /&gt;    3                1&lt;br /&gt;    3                2&lt;br /&gt;    3                3&lt;br /&gt;   Difference among For-next, While-wend &amp; Do-loop?&lt;br /&gt;The For-Next Loop and While Wend loop are pre-test loops which means that in these loops first of all the test condition is checked if it is true, the loop body is executed otherwise not.&lt;br /&gt;On the other hand, the do-loop is post-test loop in which the loop body is executed at least once after that the test condition is checked if it is true the loop body is executed for the next time.&lt;br /&gt;Which loop is much better? &lt;br /&gt;In real world most of the applications require the use of For-Next loop where we know in advance how many times a loop body has to be executed.. However, there are some situations where one does not know in advance that how many times a loop body has to executed like a hospital system where one does not know in the start of the day how many patients will be treated in the hospital to day.&lt;br /&gt;OR&lt;br /&gt;An air reservation system, where one does not know how many passengers will travel to day by a particular air reservation system to Dubai or London.&lt;br /&gt;For these situations we either use While-wend loop or Do-loop.&lt;br /&gt;Still it is a matter of taste, which loop you like you can use it.&lt;br /&gt;Arrays&lt;br /&gt;An array is a group of variables, which can store a group of homogeneous data items. An array is used to store multiple values. &lt;br /&gt;Types of Array&lt;br /&gt;        There are mainly two types of Arrays.&lt;br /&gt;1. One Dimensional Array.&lt;br /&gt;2. Multi dimensional Array/Two dimensional Array. &lt;br /&gt;Now we explain each one in more detail with examples.&lt;br /&gt;i.      One Dimensional Array&lt;br /&gt;        &lt;br /&gt;A one-Dimensional Array is used to store the data in vector from or list. For one- dimensional Array a single subscript (index) is used. &lt;br /&gt;        We use for-next loop to access each element of one-dimensional array. &lt;br /&gt;Declaration of one dimensional array. &lt;br /&gt;An array must be declared before using it in the program. The following syntax is used for declaration of one-dimensional array.&lt;br /&gt;Dim    ArrayName (Size) as Data type&lt;br /&gt;e.g   Dim a(3) as integer&lt;br /&gt;Where a is the name of array, and 3 is the size of A i.e. the number of elements. Hence the above array will store four elements starting for index 0 to 3&lt;br /&gt;The memory representation of the above array “a” is as follow.&lt;br /&gt;       &lt;br /&gt;             0           1            2          3&lt;br /&gt;In visual Basic, the index number of the first element may be other than zero.&lt;br /&gt;e.g. Dim   b(-2 to 2) as Integer &lt;br /&gt;         &lt;br /&gt;        -2          -1        0            1           2&lt;br /&gt;Program Example: Start Visual Basic with New Standard Exe Project.Place a command button on the from &amp; Write the following  code for the click event.&lt;br /&gt;Dim  a(4) as Integer&lt;br /&gt;Dim  I as Integer&lt;br /&gt;For I=0 to 4&lt;br /&gt;A (I)= InputBox(“Enter elements to array”)&lt;br /&gt;Next I&lt;br /&gt;Print “The array elements are”&lt;br /&gt;For I = 0 to 4&lt;br /&gt;Print  A(I)&lt;br /&gt;Next I&lt;br /&gt;( ii ) Two Dimensional Array&lt;br /&gt;A two dimensional Array is used to represent the data in a matrix form or tabular from.&lt;br /&gt;For two-dimensional array, two sub scripts are used i.e. one is to generate the rows &amp; the other to generate the columns. &lt;br /&gt;We use nested for-next loop for the two dimensional array. &lt;br /&gt;Declaration of Two-Dimensional Array&lt;br /&gt;        &lt;br /&gt;                The general syntax is as follow &lt;br /&gt;Dim Array name (Size, Size) as datatype&lt;br /&gt;e.g.  Dim a(2,2) As Integer&lt;br /&gt;This declaration of two-dimensional Array “a” has three row and three columns &lt;br /&gt;Program Example:- Start visual Basic with Standard Exe Project. Place a command button on the form and write the  following code for its click events. &lt;br /&gt;Dim   a (2,2) As Integer&lt;br /&gt;Dim  r As Integer &lt;br /&gt;Dim C as Integer&lt;br /&gt;For C = 0 to 2&lt;br /&gt;A (r , c) = Inputbox (“Enter Array elements”)&lt;br /&gt;Next  c,r&lt;br /&gt;Print “The Array Elements are”&lt;br /&gt;For  r = 0  to 2&lt;br /&gt;For   c =0 to 2&lt;br /&gt;Print a (r, c)&lt;br /&gt;Next c, r&lt;br /&gt;        &lt;br /&gt;OUTPUT: &lt;br /&gt;Now Press F5 to run the project and click the button. All values of the    dimensional array will be displayed on the form. &lt;br /&gt;Other types of array &lt;br /&gt;Besides the one-dimensional and two-dimensional arrays, there are also other types of arrays which include:&lt;br /&gt;(i) Variant Array&lt;br /&gt;        (ii) Dynamic Array&lt;br /&gt;        (iii) Control Array&lt;br /&gt;Now we explain each one briefly as follow&lt;br /&gt;i.      Variant Array&lt;br /&gt;It the type of Array is not defined at the time of declaration, then the default type will be variant. Such type of Array is called variant Array. &lt;br /&gt;Declaration of variant Array&lt;br /&gt;A variant Array can be declared as &lt;br /&gt;Dim ArrayName (Size)&lt;br /&gt;e.g.  Dim b (4)&lt;br /&gt;Here b is a variant Array of five elements&lt;br /&gt;ii. Dynamic Array: &lt;br /&gt;An array whose size can be changed is called dynamic array.&lt;br /&gt;Declaration of Dynamic Array&lt;br /&gt;A dynamic array can be declared as follow&lt;br /&gt;Dim C ( ) as Integer&lt;br /&gt;Before using array C, you must define its  scope by using Redim statement as &lt;br /&gt;Redim C (4)&lt;br /&gt;Redim is also used to change the size of array. &lt;br /&gt;e.g.    Redim C (10)&lt;br /&gt;When Redim statement is used with dynamic array then the previous stored data is lost (Redim resets all values as empty or Zero).&lt;br /&gt;To stop the loss of data, the keyword preserve is used with Redim Statement as follow&lt;br /&gt;          Redim Preserve C(10)&lt;br /&gt;Program Example:- Start visual Basic with Standard Exe Project. Place a command button on the form and write the  following code for its click events. &lt;br /&gt;Dim C ( ) as Integer&lt;br /&gt;Redim C (4) as Integer, I as Integer&lt;br /&gt; For I = 0 to 4&lt;br /&gt;C (I) = InputBox ( “Enter the numbers”)&lt;br /&gt;Next I&lt;br /&gt;For I = 0 to 4&lt;br /&gt;Print   C (I)&lt;br /&gt;Next I &lt;br /&gt;Control Array &lt;br /&gt;(iii) Control Array &lt;br /&gt;When a visual basic application requires a group of option buttons or check boxes on the form, it is a good idea to use the control array. A control array is a group of controls that all have the same name. All controls in an array must be of the same class. An advantage of using a control array, rather then independent controls, is that the controls share one click event, you can use a case structure to determine which button or box is selected. The number inside the parentheses is called index and is used to refer to the specific control within the array. All subsequent controls given the same name will automatically have an index attached. &lt;br /&gt;COLLECTION:&lt;br /&gt;A collection is an alternate form of the array. The elements of array are accessed by using index number, but the elements of a collection are accessed by using key (unique for each element) as well as index number.&lt;br /&gt;Declaration of Collection&lt;br /&gt;A collection must be declared before using it in the program&lt;br /&gt;General syntax for Collection Declaration is as follow&lt;br /&gt;              Dim  Collectionname AS New Collection&lt;br /&gt; e.g.        Dim  CityName  AS New Collection&lt;br /&gt;Methods of Collection:&lt;br /&gt;         A collection has the following four methods used &lt;br /&gt;1. Add&lt;br /&gt;2. Remove&lt;br /&gt;3. Item&lt;br /&gt;4. Count&lt;br /&gt;Now we explain these methods as follow&lt;br /&gt;1. Add( ):&lt;br /&gt;The Add( ) method is used to add new elements into the collection.&lt;br /&gt;The general syntax of Add ( ) method is as follow&lt;br /&gt;Collectionname.Add value, key, Beforekey, Afterkey&lt;br /&gt;   e.g.             CityName.Add “Peshawar”, “Key2”, “Key1”&lt;br /&gt;              Here the key2 is the key, and key1 is the beforekey.&lt;br /&gt;              You can use either the Before key or Afterkey.&lt;br /&gt;ii)          Remove ( ):&lt;br /&gt;The Remove( ) method is used to remove or delete an element from the      &lt;br /&gt;collection.&lt;br /&gt;The general syntax of Remove ( ) method is as follow&lt;br /&gt;Collectionname.Remove(index)&lt;br /&gt;Collectionname.Remove(key)&lt;br /&gt;   e.g.       CityName.Remove(2)&lt;br /&gt;                  CityName.Remove(“key2”)&lt;br /&gt;1. Item( ):&lt;br /&gt;The Item( ) method is used to view/display the elements of a collection.&lt;br /&gt;The general syntax of Remove ( ) method is as follow&lt;br /&gt;Collectionname.Item (index)&lt;br /&gt;Collectionname.Item (key)&lt;br /&gt;       e.g.     CityName.Item(1)&lt;br /&gt;                  CityName.Item(“key2”)&lt;br /&gt;1. Count:&lt;br /&gt;The count method is used to return the total number of elements in the collection.The general syntax of Remove ( ) method is as follow&lt;br /&gt;Collectionname.count&lt;br /&gt;        e.g.       CityName.count&lt;br /&gt;Program Example: Start Visual Basic with standard Exe file, place six command buttons on the form and set the properties for these controls as follow.&lt;br /&gt;Control name   Property                  Value&lt;br /&gt;Form               Window state      2-maximized&lt;br /&gt;Command1    Caption           Enter CityName in Collection&lt;br /&gt;Command2     Caption          Count Total elements in Collection&lt;br /&gt;Command3     Caption          Remove an item in Collection&lt;br /&gt;Command4     Caption          View an item of Collection &lt;br /&gt;Command5     Caption          View all elements of  Collection&lt;br /&gt;Command6      Caption         View elements of collection using key    &lt;br /&gt;‘General Section&lt;br /&gt;        Dim CityName As New Collection&lt;br /&gt;        Dim C As Integer&lt;br /&gt;Sub Form1_load ( )&lt;br /&gt;        C=0&lt;br /&gt;End Sub&lt;br /&gt;Sub command1_click ( )&lt;br /&gt;        Dim Cname As String&lt;br /&gt;        Cname=InputBox(“Enter new collection”)&lt;br /&gt;        CityName.Add Cname,”Key”+Cstr( C )&lt;br /&gt;C=C+1&lt;br /&gt;        End Sub&lt;br /&gt;Sub command2_click ( )&lt;br /&gt;        Print “Total Elements in Cityname=”CityName.Count   &lt;br /&gt;        End Sub&lt;br /&gt;Sub command3_click ( )&lt;br /&gt;        On Error Resume Next&lt;br /&gt;Dim index as string&lt;br /&gt;Index=InputBox (“Enter index to delete element”)&lt;br /&gt;If  index&lt;1 or index&gt;cityname.count then&lt;br /&gt;        MsgBox(“Invlaid Index number”)&lt;br /&gt;        Else&lt;br /&gt;        CityName.Remove(Val(index))&lt;br /&gt;        End if&lt;br /&gt;        End Sub&lt;br /&gt;Sub command4_click ( )&lt;br /&gt;On Error Resume Next&lt;br /&gt;Dim index as string&lt;br /&gt;        Index=InputBox(“Enter index to delete element”)&lt;br /&gt;        If index= “ “ Then &lt;br /&gt;       Exit sub&lt;br /&gt;                End if&lt;br /&gt;        If index&lt;1 or index&gt;cityname.count then&lt;br /&gt;                                MsgBox(“Invlaid Index number”)&lt;br /&gt;                Else&lt;br /&gt;                                CityName.Item(Val(index))&lt;br /&gt;                End if&lt;br /&gt; End Sub&lt;br /&gt;Sub command5_click ( )&lt;br /&gt;        For each Cname in CityName&lt;br /&gt;                Print Cname&lt;br /&gt;        Next &lt;br /&gt;        End Sub&lt;br /&gt;Sub command6_click ( )&lt;br /&gt;                On Error Goto Lab1&lt;br /&gt;        Dim key as string&lt;br /&gt;                key=InputBox(“Enter key to delete element”)&lt;br /&gt;        If  key= “ “ Then &lt;br /&gt;           Exit sub&lt;br /&gt;           End if&lt;br /&gt;                If  (CityName.count&gt;1) then&lt;br /&gt;                Print CityName.Item(Key)&lt;br /&gt;        Else&lt;br /&gt;                        Print “No Element Exists”&lt;br /&gt;                End if&lt;br /&gt;             Exit sub&lt;br /&gt;Lab1:&lt;br /&gt;                         MsgBox (“Key invalid”)&lt;br /&gt;         End Sub&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/259104587845316746-254800461993031103?l=dit-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/259104587845316746/posts/default/254800461993031103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/259104587845316746/posts/default/254800461993031103'/><link rel='alternate' type='text/html' href='http://dit-notes.blogspot.com/2009/06/visual-basic-notes.html' title='Visual Basic Notes'/><author><name>sokaniwaal</name><uri>http://www.blogger.com/profile/03036988373905460557</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_JPaQhocksZY/SDokYZasQ4I/AAAAAAAAAEY/rc9niNX3ne4/S220/green_eyes.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-259104587845316746.post-6766282642847015963</id><published>2009-06-22T00:43:00.001+06:00</published><updated>2009-06-22T00:45:22.483+06:00</updated><title type='text'>Information Technology</title><content type='html'>What is Data? Explain different types of data and what is information?&lt;br /&gt;Data is a plural form of the Latin word Datum. The collection of fact and figure is called Data OR any thing in raw form e.g.  Name, Address, Number, Phone Number, Roll No etc.&lt;br /&gt;      &lt;br /&gt;    Types of data&lt;br /&gt;          There are three types of data&lt;br /&gt;          i.        Alphabetic data type:-      It consist letter from A-Z capital or &lt;br /&gt;                                                              from a-z small letter. e.g Abid, Peshawar, &lt;br /&gt;Pakistan, Khan&lt;br /&gt;          ii.       Numeric data type;-         It consist of digit from 0-9 e.g 123, 567 etc   &lt;br /&gt;          iii.      Alphanumeric data type:- It consist alphabetic letter as well as &lt;br /&gt;                                                              numeric digit. Street no A/10 etc&lt;br /&gt;          &lt;br /&gt;Q.      What is Information?&lt;br /&gt;A.      To organize the Data in meaningful upon which people can take necessary decision is called Information. e.g. 2,1,5,4 when sorted it become 1,2,4,5 which is information. Information is the meaningful, processed data, which is relevant and accurate and there by can be used in decision-making. Examples are voucher, bills, fee registration cards or library cards.&lt;br /&gt;Q.        Compare Data and Information.&lt;br /&gt;A.      Data vs. Information.&lt;br /&gt;We most frequently use the word data and information interchangeably, but still there is big difference between these two terms. The word Data is the plural of Datum and has been taken from Latin language. But it is always used both in plural and singular meanings.&lt;br /&gt;Data is defined as the collection of facts and figures like numbers, characters, letters etc. that is always in a raw form and cannot be used directly for any decision-making. However, it can be used for any decision-making. and action taking if processed usefully. It is fact that one-person data may be another person information and vice versa. e.g. 123, ABC, Akbar, Marks etc are example of data. Similarly 12 &amp; 34 is data and if it is processed (i.e. added), it becomes 46. So data can be processed either manually by human or by an electronic machine like computers to get useful information. Data may be numeric, alphabetic or alphanumeric. For example 300 is numeric data Asad Ali is alphabetic and  House # 12/A is an example of alphanumeric.&lt;br /&gt;By information we mean the organization of data in meaningful form that is data processed usefully and meaning fully and is ready for decision making and taking actions becomes information. So we say that if data is processed by certain data processing procedures it is transformed into useful data.                             &lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;e.g.              2,1,5,9,7                        Sorted                                  1,2,5,7,9&lt;br /&gt;Remember that computer is one of the information systems that convert raw data into useful information.&lt;br /&gt;What is Information Technology? Discuss element of IT/ ELEMENTS OF DATA PROCESSING SYSTEM&lt;br /&gt;The merging of computer and communication is called Information Technology. IT is a technology that merges computing with high-speed communication links carrying data, sound, image, graph, and video. Computer and communication are the parents of the information age. &lt;br /&gt;It manages a network of computer. Creating WEB Pages, producing video, selling, buying, and perform any type of business activity on the Internet. &lt;br /&gt;For example telephone, radio equipment and switches used for voice communication. Managing video conferencing etc.&lt;br /&gt;Through Internet, you can communicate with any computer user having an internet connection any where in the world. You can exchange message with him, you can talk to him through computer or phone, you can send any file to him, you can receive any file from him and you can have on-line conversation with him through typing from keyboard. A computer and communication system is made up six elements. &lt;br /&gt;1) People  2) Procedure 3) Data/Information 4) Hardware  5) Software&lt;br /&gt;6) Communication&lt;br /&gt;1-Peoples &lt;br /&gt;It means the users or people who runs and execute the entire data processing task and computer installations or the people who works in the data processing environment. The personnel include System Analysts, Programmers, Data entry operators, and Data processing officers.  &lt;br /&gt;2-Procedure  &lt;br /&gt;Procedures are rules, policies, and methods for operating computers. The operation of a data processing system requires procedures for use in obtaining and preparing data in order to operate the computer and for distributing the output from the computer. This procedure includes control steps such as actions to be taken to show errors in the data and malfunctioning of the equipment etc.&lt;br /&gt;3-Data&lt;br /&gt;Fact and figure is called data. Data is raw material of IS. Data can take many forms, including Text data, Audio data, video data, voice data graphics and image data.&lt;br /&gt;4-Hardware&lt;br /&gt;Physical parts of computer system. For example input devices, output devices and CPU such as keyboard, Mouse, Memory, mother board, CD-ROM etc.&lt;br /&gt;5-Software&lt;br /&gt;The Software consists of programs whose purpose is to communicate with computer. The Software includes operating system i.e. MS-DOS,PC-DOS,UNIX,,XENIX, and Linux etc. General purpose programs i.e. database packages like FoxPro, Dbase, Java etc. &lt;br /&gt;6-Communication&lt;br /&gt;Data Communication/Telecommunication technologies and network like the internet which is necessary for all types of organization and their computer-based data processing. Telecommunication network consist of computers, communications processor and other device interconnected by communication media and control by communication soft ware. &lt;br /&gt;Data processing system:- &lt;br /&gt;The system that process data and produce information is called Data processing system or Information processing system. The diagrammatic representation of DPS is given below.&lt;br /&gt;  &lt;br /&gt;          * MODEL OF DATA PROCESSING SYSTEM *&lt;br /&gt;EXPLAIN MANUAL AND ELECTRONIC DATA PROCESSING SYSTEM. WHAT IS THE DIFFERENCE BETWEEN THESE TWO?&lt;br /&gt;Conventional Data Processing(CDP)/Manual Data Processing:- &lt;br /&gt;The Conventional Data Processing/Traditional Data Processing system is the manual method of transforming data into information. The human beings themselves collect data, classify and arrange the data, perform manual calculation and hence produce the required output result. It is very simple and inexpensive.  Upto the 20th century almost all data processing was done manually. Clerical persons used paper, pen, and pencil to maintain records in offices. Such data processing caused frequently clerical mistakes and hence due to these miss-recorded transactions, the Company record was to be misrepresented. Information was often received too late to serve the organization purposes.&lt;br /&gt; &lt;br /&gt;Electronic Data Processing (Computer Based data Processing System)&lt;br /&gt;An Information System that uses Computer and their hardware and software is called Electronic data processing, Computer-Based Data processing or Computer Based Information System. Electronic Data Processing or Computer Based Information System uses Computer hardware and software, the internet and other telecommunication system, network, Computer based data resource management technique and many other information technologies to transform data resources into information products for consumers and business professionals. &lt;br /&gt;&lt;br /&gt;Electronic computers complete all data manipulation and file updating electronically rather than mechanically. This increased data processing productivity and reduced its cost. The speed, accuracy and reliability of computers are more than Traditional data processing. &lt;br /&gt;History of Computers: -&lt;br /&gt;The history of Computer is very old, i.e. it goes back to some 500 years BC. The first computing machine was used by the Chinese before 15th century. The name of this machine was Abacus. &lt;br /&gt;However in 1812 an English mathematician from Cambridge University, Mr. Charles Babbage designed a machine called DIFFERENCE ENGINE. This machine was capable of calculating powers of numbers. Babbage also gave the idea of an ANALYTICAL ENGINE, which was supported to be general-purpose machine having the ability to calculate various arithmetic and/or algebraic formulas, store data and print results. He died soon and never converted his dreams into reality. &lt;br /&gt;The analytical engine was not a successful machine but it gave birth to the research in the field of computers.&lt;br /&gt;In 1946, John Mauchly and J.P. Eckert developed an Electronic, Numerical Integrator and Computer (ENIAC) at the Moore school of Engineering and Technology, Pennsylvania USA. This was the first truly successful computer after Mark-I and Mark-II developed at Manchester University. There were three main drawbacks in the ENIAC as follows:&lt;br /&gt;1. It used serial lines for processing.&lt;br /&gt;2. No storage facility was available.&lt;br /&gt;3. It used decimal numbers instead of binary number system.&lt;br /&gt;These problems were successfully overcome with the development of John Von Neumann’s Electronic Discrete Variable Automatic Computer (EDVAC) developed in 1950. It was the first computer capable of doing non-scientific work. Besides, most of today’s computers are based on the working of EDVAC. The development of these machines materialized the existence of computers and they became a commercial entity used in many government organizations. As EDVAC was the first machine that was used by the people for solving their problems, but still it was not a useful machine because it could not solve all the problems of that time.  Therefore, efforts were made to develop such a machine, which can solve all our problems. In this connection, the scientists make developments from time to time and improve the previous machine into a latest one. Due to these improvements, we have now Computers, which can solve all types of problems.&lt;br /&gt;different Types of Computer &lt;br /&gt;There are three type of Computer &lt;br /&gt;a) Digital Computers. b) Analog Computers.  c) Hybrid Computers.&lt;br /&gt;a) Digital Computers: - &lt;br /&gt;In these Computers, information is represented by variables which having discrete values, i.e. it operates on the inputs that are ON-OFF switching. Digital computers process data, which is in the form of digits. In these Computers all operations take place at a very high speed and produce very accurate and precise results, e.g. Digital computer, Calculators, Digital Watches, etc.     &lt;br /&gt;b) Analog Computers: -&lt;br /&gt;These machines process information, which is of, continues nature and which is not discrete or separate. An Analog computer is used for measurement. The speed of analog is fast but not so accurate. Analog computer measure Temperature, Pressure, Current Voltage and Depth etc. These quantities continue in nature and have millions of varieties. OR in other words we can say that in these Computers, information is represented in continues form, e.g.. Automobile Speed Meter, Current, Analog watch, etc.&lt;br /&gt;Differentiate Between Analog and Digital Computers: - &lt;br /&gt;Analog Computers measure while Digital Computers count. Analog Computers are fast but not so accurate, while Digital Computers are fast as well as more accurate.  &lt;br /&gt;c) Hybrid Computers: -&lt;br /&gt;Hybrid Computers combine the properties of both Digital Computers and Analog Computers for solving the problems e.g. Hybrid Computers have the speed of Analog Computers and accuracy of Digital Computers. These Computers are used in some specialized applications. e.g. Flight Radar System, National Defense, Hybrid Watches, digital petrol pumps etc.&lt;br /&gt;Explain or discuss Classification of Computer (w.r.t size)&lt;br /&gt;a) Micro Computers. b) Mini Computers.  c) Mainframe Computers. d) Super Computers.&lt;br /&gt;a) Mainframe Computers: - &lt;br /&gt;These are the most expensive, largest and fastest Computers, used in large Organizations. Mainframes have the facilities to communicate with large amount of data and support several input and output devices. The cost of typical mainframe is in million rupees and can serve as much as 150 users.  &lt;br /&gt;These Computers have Memory of several hundred Mbs, and operate at a speed of measure in nanoseconds. e.g.   IBM/360, IBM/3090, etc.&lt;br /&gt;b) Mini Computers: -&lt;br /&gt;These Computers are larger than PCs, both in size and other facilities such as speed, storage capacity, etc. These Computers have the capabilities to serve many Users at one time. They are costly as compared to PCs.  Their speeds are rated between 1 and 50 MIPS.  E.g. Vax/11730, IBM/8370, etc.&lt;br /&gt;c) Micro Computers&lt;br /&gt;These are also called Personal Computers (PC). These are the most popular digital Computers used in all fields of life. These are small in memory and have less processing capability. These are also called Chip Computers, because its entire circuitry is fabricated on a single chip. The microcomputer of today is equivalent to the main frame of tomorrow.  e.g IBM-PC, XT, AT, Compatibles, 286, 386,486, 586, P-I, P-II,  P-III, P-IV etc.&lt;br /&gt;d) Super Computers: -&lt;br /&gt;Super Computers are also called “Number Crunchers”, because they are specialized Computers for dealing with numbers, i.e. they are capable of performing over 10 Mega flops (i.e millions floating point operations per second).  These Computers are very much expansive. Two families of commercially available Super Computers are the GRAY-1 and Cyber205 built by Illiac-iv. These are specially used in Atomic reactor, defense system of NASA. (USA)&lt;br /&gt;Explain or discuss Classification of Computer w.r.t purpose&lt;br /&gt;We can divide the Computers into the following two types.&lt;br /&gt;a) General Purpose Computers.   b) Special purpose Computers.  &lt;br /&gt;General Purpose Computers: - &lt;br /&gt;These Computers are used for solving a wide variety of problems in many areas such as Business, Education, Science, etc. General-purpose computers can store large amount of data and that is why most business enterprises use them. These Computers are used for multipurpose. For example,  P.C, etc.      .&lt;br /&gt;Special purpose Computers: -&lt;br /&gt; These computers support highly specialized data processing activity. These Computers are used for solving problems of some special types. i.e these Computers are used to perform  a single and special task e.g. Computers used in the Atomic Energy Commission, Computer used for eye sight etc.&lt;br /&gt;Different generation of computer &lt;br /&gt;Generations of  Computers:&lt;br /&gt;Although, the development of Computers is a continuous process, however, it can be categorized into the following generations based on the technology used for the Computer systems.&lt;br /&gt;1.First Generation (1945-1950):- &lt;br /&gt;All the Computers developed in this generation were based on Vacuum-Tubes technology. For example, ENIAC (Electronic Numerical Integrator And Computer), Mark-I, Mark-II   etc. The Computers of this generation were very slow, large, and expansive.&lt;br /&gt;2. Second Generation (1950-1959):- &lt;br /&gt;The Computers of this generation were based on Transistor technology(Vacuum tube replace by transistor) and they opened the gateway to the commercial development for sale of computers. The transistors were small in size, fast in operation and less expansive than vacuum tubes. Hence the Computers of this generation were small and less costly.  Also the speed of these Computers was high. e.g. , EDVAC, IBM-1401.&lt;br /&gt;3.Third Generation(1960-1969)&lt;br /&gt;The Computers of this generation were based on integrated circuits (ICs) technology (transistor replace by ICs). In early 1960 the electronic technology of solid-state was introduced. The development of integrated circuits (ICs) is called solid-state technology or Small Scale Integration (SSI). The integrated circuits (ICs) are the collection of many electronic devices like transistors on a single chip of silicon. This technology enabled the computers to enter into electronic revolution. Also the Computers of this generation were high in speed, accuracy and less in price. e.g.  IBM-360  etc. &lt;br /&gt;4. Fourth Generation(1970-1980)&lt;br /&gt;The Computers of this generation were based on Large Scale Integration (LSI ) (ICs replace by LSI ). In 1970 the technology was enhanced sufficiently to integrate all main functions of a computer using LSI on a single chip called Microprocessor. In this generation Microprocessor was introduced, due to which microcomputers were made. For example, IBM-PC etc.&lt;br /&gt;1. Fifth Generation(AI)(1980-1990)&lt;br /&gt;The rapid progress in computer technology is still continued and active research is going on in different fields of computer technology but there is no well-defined categorization after fourth generation. The reason may be that now the developments are taking place in a variety of fields of computer hardware and software as compared to the previous developments, which mostly took place in the fields of electronics. As a result of that further grouping of computer developments is difficult. However in the field of software a new era has started called AI (artificial intelligence), which is the main field of study including ROBOTICS, COMPUTER VISION, COMPUTER LEARNING etc. Hence the Computers of this generation were based on the principles of AI and also in this generation, Software development was give more importance than Hardware, as a result of which Artificial Intelligence was introduced. e.g.  Robotics, Computer Vision etc.&lt;br /&gt;6.Sixth Generation(ANN’S)(Since 1990):-&lt;br /&gt;The Computers of this generation are based on the  principles of Artificial Neural Network System (ANNS). As a result, now the Computers can think and decide for solving different problems. e.g. Character recognition etc. &lt;br /&gt;Computer and Its components &lt;br /&gt;Computer is an electronic device, which can accept the data, process the data, and gives the result/information of the process data according to instruction.&lt;br /&gt;          A computer is an interrelated combination of components that performs the basic function of input, processing, output, storage, and controlling, thus providing end users with a powerful information-processing tool &lt;br /&gt;Different components of Computer (Input, CPU, Output)? &lt;br /&gt;Main Components of Computer:&lt;br /&gt;There are three basic elements of a computer.&lt;br /&gt;1. Input Unit    2-Processing Unit (CPU) 3-Output Unit&lt;br /&gt;2. Input Unit&lt;br /&gt;The devices through which we enter the data and instructions (Programs) into the computer are called input devices. (e.g. keyboard, Mouse, Scanner etc)&lt;br /&gt;1. Central Processing Unit (CPU)&lt;br /&gt;Central Processing Unit (CPU) is the administrator section of computer. CPU is connected to all input, output and storage devices and controls all the functions of these devices. CPU receives the data from input device; perform processing on data; and then sends the result of the process data to output devices. &lt;br /&gt;The CPU is the collection of three units.&lt;br /&gt;          i) Control Unit (CU)&lt;br /&gt;Control Unit is the nerve center of the computer. The control unit direct and coordinate the entire Computer System in carrying out Program instruction. It accept data from input device and send it to the memory. From the memory the data are then transferred to ALU and send the result to the output unit.&lt;br /&gt;            ii) Arithmetic and Logic Unit (ALU)&lt;br /&gt;This is the calculation section of Computer. All arithmetic operation like addition subtraction, multiplication and division as well as some logical operation are performed in this section.&lt;br /&gt; iii) Storage Unit (Memory)&lt;br /&gt;The memory of CPU is the place where the computer program and data are stored during processing. The storage unit is often called either main storage or internal storage or primary storage. There are usually two types primary storage.&lt;br /&gt;                    a)RAM:- &lt;br /&gt;It stands for Random-Access-Memory or read/write Memory because information can either be read from or written to the RAM. This is the memory whose information can be erased or changed. It is temporary memory. Any thing stored in RAM is lost when Computer is switched off.&lt;br /&gt;                   b)ROM&lt;br /&gt;It stand for Read-Only-Memory. Information can be read from ROM but we can not write information to it. This is the memory whose information can be not changed. The information stored in it can not be lost if we turn off the Computer. ROM is used to store permanent program. This information is available on small pieces of the memory called chips.&lt;br /&gt;3. Output Unit &lt;br /&gt;The devices through which the process information comes to outside world is  called output devices. An output device can be used to store, display or print the information. (e.g. monitor, printer, floppy Disks, hard Disks etc&lt;br /&gt; &lt;br /&gt;Input &amp; output devices&lt;br /&gt;The device through which we enter the data into the computer is called input device. There are many devices for input. These devices of a digital Computer are responsible for accepting programs and data from the outside world, feeding it to the Computer, and storing it into the Computer memory. These devices work under the control of Microprocessor. Some of the famous Input devices are as below Keyboards, mouse, scanners, microphone, video camera, touch screen, and optical scanning.&lt;br /&gt;1-KEYBOARD:- &lt;br /&gt;It is a very common input device that helps in keying-in the required information into the Computer. Keyboard can be used effectively to Communicate with the Computers but it is very slow input device. The keyboard is just like a typical typewriter in shape but enhanced than that. It consists of normal Alphabetic, numeric, functions, and other special characters or control keys, which are not available in a typewriter.&lt;br /&gt;2-MOUSE:-&lt;br /&gt;A Mouse is a quick input device and is very small in size. Its shape likes to a mouse and is moving very fast on flate surface that is why it is called Mouse. It usually rolls on a small bearing and has two or three buttons on its head. When the User rolls the mouse on a flat surface called mouse pad, the movement guides a pointer on the screen called cursor. As it moves the system recognize that some information are coming in.&lt;br /&gt;3.  SCANNER&lt;br /&gt;Scanner is Optical character recognition equipment that can read special-purpose characters and codes. Scanner provides a method of direct input of data from sources documents into a computer system. There are many type of optical reader, but they all use photoelectric devices to scan the characters being read. Reflected light pattern of the data are converted into electronic impulses, which are then accepted as input into the computer system. OCR-based optical scanning systems are used extensively in the credit card billing operations of credit card companies, bank, and oil companies. &lt;br /&gt;4-The Microphone&lt;br /&gt;It is an input device that is used for the input of voice in place of using the keyboard and mouse. Special software is used to convert voice into text. This requires fast processing and a lot of memory and will become more common as the technology improves. The microphone converts audio signals into digital form. &lt;br /&gt;5-Video Cameras&lt;br /&gt;Video cameras is an input device, that is able to capture images of any type data. Most scanners incorporate a special sort of camera made up of Charged-Coupled Devices (CCDs). Each CCD receives light from the image and the light generates an electrical charge. This means that light areas or dots of the image are represented by charged cells and dark areas by uncharged cells. &lt;br /&gt;6-Digital video Camera:     &lt;br /&gt;When you take a picture with a digital camera, a digitized image goes straight to a floppy disk, CD-R, or other memory. Once on disk or in memory, it can be loaded to a computer and manipulated. Light received through the lens is converted to digital signals by sensors, rather than stored by chemical change on a film as in a normal camera. The resulting “photograph” can then be stored on a computer and used just like any clipart files. So digital camera is a camera that stores images digitally, rather than recording them on film. Once a picture has been taken, it can be downloading to a computer system, and then manipulated with a graphic program and printed. &lt;br /&gt;Disadvantage :- Digital photos are limited by the amount of memory in the camera.&lt;br /&gt;Advantage:- The big advantage of digital cameras is that making photos is both inexpensive and fast because there is no film processing. Most digital camera used CCDs to capture image, though some of the newer less expensive camera use CMOS chips instead. &lt;br /&gt;OUTPUT DEVICES&lt;br /&gt;The device through which the process information comes to outside world is called output devices. An output device can be used to store, display or print the information. (e.g. monitor, printer, floppy Disks, hard Disks, CD-ROM, SPEAKER etc)&lt;br /&gt;1-Monitors&lt;br /&gt;A TV-like device that is used by the Computer for displaying the information to the outside world is known as CRT or VDU or more simply a Computer Screen.  The PCs generates text and/or graphs on the Screen using two components called the Monitor and the Video Adopter Card. The Monitor mainly consists of glass cone, which uses special electron guns to hit the Screen from back towards the cone and thus producing text or graphs with various colors. The Monitor is used how to control the coming rays and the Video Adopter card is used what to display i.e. either text or pictures. Monitors/Screens can be selected on the basis of user requirements. However , Monitor makers provides us with many types in terms of Black &amp; White/Color, Interlaced / Non-Interlaced , High-resolution/Low-resolution, Dot-pitch, Digital or Analog Monitors. Their costs , sizes and video modes also vary with their internal differences.&lt;br /&gt;TYPES OF MONITORS:- There are different types of Monitors that are matched to the different video display mode available for PCs (text, Lo/HI-resolution, graphics etc) . Some of the low-cost Monitors are built specially to work with one or two of the popular video modes while others are more expansive and can support almost anything thrown by the Computer. Since Monitors are available in terms of many aspects. i.e. Interlaced or Non-interlaced, Low resolution or High –resolution etc, therefore especially it  is difficult to count and show its types. However keeping all these features in view some of the popular types of Monitors are discuss below.&lt;br /&gt;MONOCHROME MONITOR:-Normally Monochrome is any Monitor that can not display colors. They can be black and white type but they are often available in green colors because green color is easier to eyes. A Monochrome Monitor usually cannot display graphics. But later on some techniques were developed to have the graphics capability in the Monitors, e.g. Hercules Graphics Card (HGC).&lt;br /&gt;Analog Color Monitor:- The Color Monitors with an analog interface are called as ANALOG Color Monitors. The first Color Monitors were introduced with the development of IBM’s Color graphics Adopter (CGA) card. These screen were generally called RGB(Read, Green, and Blue) pixels as they supported these three Colors. The CGA board could create a 320 x 200-pixel display in four Colors. But they were low-resolutions Monitors because the text or graphics were not so much attractive as can be. But they were still popular because they use a digital interface between the CGA display adopter and the Monitor. That is why these are called as Digital Color Monitors.&lt;br /&gt;Digital Color Monitor:- The Color Monitors with digital interface are called as Digital Color Monitors. Its newest versions are VGA (Video graphic Array), EGA(Enhanced Graphic Array) and SVGA (supper VGA) which have more high-resolution and  are more enhanced.&lt;br /&gt;Besides all these types there are specialized Monitors for some specific purpose such as Paper-white Displays and Portrait Displays, which are, used for text and word processing purposes only.&lt;br /&gt;2-PRINTERS&lt;br /&gt;Another output device that converts the coded information from the processor into a readable form on paper called HARDCOPY. There are many types of Printers varying in speed and quality.  These  may be serial Printers, Parallel Printers or Page Printers. Also these may be Solid-font or Dot-matrix Printers. Anyhow the quality of printers depends upon the User requirements. Following are the main types available in market.&lt;br /&gt;1. DOT-MATRIX PRINTER&lt;br /&gt;A dot-matrix printer makes a good low cost general-purpose printout for most of the user needs. They are neither very slow nor very expansive. Although the quality of print is not so best but is sufficient for many purposes. Like other printers, dot matrix also prints one Character at a time from left to right. When it finishes the line, it rolls the paper up one row and starts printing the next row. It just makes lines of dots to make a character.&lt;br /&gt;1. IMPACT PRINTERS&lt;br /&gt;The second most popular printer is the impact printer. They are also called DAISY-WHEEL PRINTER. They produce rather excellent letter-quality printout as compared the dot-matrix printer. They work  just     like the typewriter and uses a hammer and a wheel to print something on paper. But they are very much noisy and hence are not so popular. Printers other than Impact are called Non-Impact Printers.&lt;br /&gt;c. LASER PRINTERS&lt;br /&gt;The most expansive and quality –bearer printers are the Laser printers, which produce high-quality printout  and so are used for desktop publishing and graphics. A Laser printer works on the principles of a Photocopier. Simply a metal drum called TONER is filled with special ink which just sprinkle ink onto the paper and thus prints the character. They are very fast and uses multiple fonts for text and graphics.&lt;br /&gt;Besides them now there are color printers available in both dot matrix as well as Laser printers and all others as well.&lt;br /&gt;3-PLOTTERS&lt;br /&gt;Plotters are an alternative to printers for drafting applications because they are specialized and unbeatable for certain kinds of works. A Plotter is basically a mechanical hand holding a pen. They are mostly used for Engineering and Maps drawing purposes. They curves lines, graphs and making Maps just as the humans do but are more clear , understandable and attractive than hand-made things.&lt;br /&gt;4-SPEAKER&lt;br /&gt;Speaker is an output device. It produce softcopy output. This gives us output in the form of sound. We use speaker to hear any type of sound. &lt;br /&gt;STORAGE DEVICES&lt;br /&gt;Main or Primary Memory or Internal Memory&lt;br /&gt;The Main memory (Primary Memory) of CPU is the place where the computer program and data are stored during processing. This storage unit is often called either main storage or internal storage or primary storage.&lt;br /&gt; There is usually two types primary storage.&lt;br /&gt;                     a) RAM:- &lt;br /&gt;It stands for Random-Access-Memory or read/write Memory because information can either be read from or written to the RAM. This is the memory whose information can be erased or changed. It is temporary memory. Any thing stored in RAM is lost when computer is switched off.&lt;br /&gt;                   b) ROM:-&lt;br /&gt;It stands for Read-Only-Memory. Information can be read from ROM but we can’t write information to it. This is the memory whose information cannot be changed. The information stored in it can’t be lost if we turn off the Computer. ROM is used to store permanent program. This information is available on small pieces of the memory called chips.&lt;br /&gt;Secondary or Auxiliary or External Memory (Storage)&lt;br /&gt;The devices of a computer that store information such as software and data permanently are called secondary storage. Disk is a secondary storage device where we can store a large amount of data and from where it can be retrieved. It has different types e.g. Hard Disk, Floppy Disk, CD-ROM, Magnetic Tape, Magnetic Drum&lt;br /&gt;Q.      Explain different types of secondary storage devices?&lt;br /&gt;Ans.  Types of Secondary Storage Devices:&lt;br /&gt;          Following are secondary storage devices.&lt;br /&gt;1-Magnetic Disk&lt;br /&gt;The magnetic Disk is made up of one or more rotating platters, on which data is stored magnetically. It is made up of plastic, coated on both sides with a special magnetic object that is iron oxide. There are two main types of magnetic Disks. i.e. Floppy Disk  and Hard Disk.&lt;br /&gt;a-Hard Disk&lt;br /&gt;It made up of one or more rotating Platter, which is encoded with magnetically object that is iron oxide. It is circular metallic plate comparatively thick in size and permanently sealed in completely enclosed. Data are recorded on magnetic disk as a series of magnetic patterns.  This is also called fixed disk and use for more storage. It can store a huge amount of data and faster access speeds than floppy diskettes.&lt;br /&gt;b-Floppy Disk&lt;br /&gt;It is a removable plastic Disk. It is not fixed in the computer. It is encoded with magnetically object that is iron oxide. It has less storage capacity than a hard disk. To use a floppy Disk you must have a floppy Disk drive. Letter used for floppy Disk drives are A &amp; B. &lt;br /&gt;&lt;br /&gt;Size  Density Capacity&lt;br /&gt;5.25 “ Double 360 Kilobytes&lt;br /&gt;5.25 “ High 1.22 Megabytes&lt;br /&gt;3.5 “ Double 720 Kilobytes&lt;br /&gt;3.5 “ High 1.44Megabytes&lt;br /&gt;2-CD-ROM&lt;br /&gt;CD-ROM stands for Compact Disk Read Only Memory. CD-ROM technology uses 12-centmeter (4.7 inch) compact disk similar to those used in stereo music systems. It is the latest invention. It is so called CD-ROM because information can be read only from it but not written to it. A CD-ROM can store up to 840 megabytes of data. Letter CD is usually used for CD-ROM drive. To use a CD-ROM disk you must have a CD-ROM drive.&lt;br /&gt;3-Magnetic Tape&lt;br /&gt;Magnetic tape is a flexible plastic tape, coated on one side with magnetic iron oxide material. It is used when large amount of data are to be processed sequentially. An advantage of magnetic tape is that it is very cheap and economical storage medium but very slow in processing. &lt;br /&gt;4-Magnetic Drum&lt;br /&gt;It is a rotatable cylinder whose surface is coated with a magnetically sensitive iron oxide compound. The surface is divided into a number of tracks, each track having one or more fixed reading and recording heads. Magnetic Drums are commonly used when very fast access and transfer speeds are required. They have one disadvantage that is  they cannot be removed from a unit. &lt;br /&gt;Introduction to Software&lt;br /&gt;Software is defined as a written computer program or series of instruction. Software is the name given to the actual program that allows the hardware to perform a useful work. With out software hardware is quite useless. Software is the communication between user and computer. Software is needed to accomplish the input, processing, output, and storage and control activity of Information System. There are two type of Soft ware 1) System software 2) Application Soft ware.&lt;br /&gt;1-System Software&lt;br /&gt;System Software is a group of program that controls all the operation of computer. System Software consists of programs that manage and support a computer system. System software is the type of software relating to the system, which make better &amp; effective utilization of the entire Computing system. It controls all the operations of computer system. It is mostly provided by the manufacturers.  The person preparing system software is called System Programmer &amp; the process is called System Programming. For example the development of COMPILER, O.S, and High-level languages come under this category.&lt;br /&gt;For example, Operating System and network management programs. System Software serve as  interface between systems network and hardware and the application programs of end users.&lt;br /&gt;There are three types of System Software &lt;br /&gt;1:-System Management programs  2: System Support program  3:-System development programs.&lt;br /&gt;a:- System Management programs: &lt;br /&gt;It manages the hardware, software, networks and data resources of a computer system. Examples of system management programs are operating system, network management program, database management system.&lt;br /&gt;b:-System Support Program:&lt;br /&gt; It supports the operations, management, and users of computer system by providing a variety of support services. For example system utilities, performances monitor. &lt;br /&gt;c:- System Development program:&lt;br /&gt;Program that helps users develop information processing programs and procedures and prepare users programs for computer processing. For example language translator, programming editor, and debuggers, code generator and CASE tools.&lt;br /&gt;2-Application Software:- &lt;br /&gt;Application software is that type of computer software, which is, writes for a specific task, which specifies the user requirement. Or it is program, which is a certain problem oriented and not so general. The person preparing application software is called application programmer.&lt;br /&gt;For example software developed for the PAYROLL of employees and accounts in an organization come under this category.  &lt;br /&gt;There are two type application Software &lt;br /&gt;a- General Purpose Software&lt;br /&gt;b- Application Specific Software&lt;br /&gt;a) General-Purpose:-&lt;br /&gt;General Purpose Program is application program that perform common job for end user. For example, word processing programs, spreadsheet programs, database management programs (Ms-Access, Oracle), and graphics programs.. &lt;br /&gt;2) Specific Application Program:-&lt;br /&gt;Specific application program is used to support specific application. This type of software perform specific task. Some major categories are &lt;br /&gt;i-Business application program are program  that are develop for important business functions or industry requirements. For example program for accounting, marketing, finance, and employee benefits program.&lt;br /&gt;ii-Scientific application programs are program that are develop for scientific and engineering purpose. For example program for scientific analysis, engineering design, and monitor of experiment.&lt;br /&gt;iii-Other application program  are other than business and scientific. For example computer application in education, entertainment, music, art, law, and medicine etc.  Example are video-game program, entertainment program, etc.&lt;br /&gt;PROGRAM TOOLS&lt;br /&gt;Following are the programming tools for the programmer with the help of which the programmer can write a perfect program. These are&lt;br /&gt;          1- Algorithm          2- Flow Chart&lt;br /&gt;ALGORITHM &lt;br /&gt;An algorithm is a finite set of instructions, which accomplishes a particular task.&lt;br /&gt;An algorithm is a finite step-by-step list of well-defined instructions for solving a particular problem.&lt;br /&gt;ALGORITHM NOTATION&lt;br /&gt;The algorithm is a base of not only effective data structure but it is also the base of good programming. Therefore, it is necessary that each algorithm should be written clearly. A complete algorithmic notation is given below.&lt;br /&gt;1)    Name of algorithm:&lt;br /&gt;Every algorithm is given a name, written in capital letters.&lt;br /&gt;1. Introductory Comments.&lt;br /&gt;The algorithm name is followed by a brief description of the tasks the algorithm performs. This description gives the name and types of variables used in the algorithm.&lt;br /&gt;1. Steps:    &lt;br /&gt;The algorithm is made of a sequence of numbered steps. Each beginning with a phrase enclosed in square brackets which gives an abbreviated description of that step. Following this phrase is an ordered sequence of statements which describe the actions to be executed or tasks to be performed.&lt;br /&gt;1. Comments: &lt;br /&gt;An algorithm step may terminate with a comment enclosed in round parenthesis, which is used to help the reader better understand that step. Comments specify no action and are enclosed only for clarity.&lt;br /&gt;Example of an algorithm: &lt;br /&gt;Algorithm GRADES(M1,M2, M3,M4,Average)&lt;br /&gt;This algorithm reads four marks denoted by M1, M2, M3, M4 and compute the average grade.  All variables are assumed to be real]&lt;br /&gt;&lt;br /&gt;(l)    [Input individual marks]&lt;br /&gt;             Read (Ml,M2,M3,M4)&lt;br /&gt;2)    [Compute average grade]&lt;br /&gt;                         Average= (M 1+M2+M3+M4)/4&lt;br /&gt;3)     [ Output Result]&lt;br /&gt;                        Write ("Final grade is" , average)&lt;br /&gt; (4)    [Finish]                                              &lt;br /&gt;                         Exit&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Flow Chart&lt;br /&gt;Charting:&lt;br /&gt;Charting is a graphical or pictorial means of presenting data. Charting takes the flow of work and makes a picture of it. Charts can be used to illustrate statistical data, locations of desks or equipment, relationships between people and jobs, sequences of events, work flow, organizational structure and planning or implementation schedules.&lt;br /&gt;The primary use of charting is for communication and documentation of the system. Charting is also used during feasibility studies, problems definition understanding the existing system, defining new systems requirements, design, cost comparisons, final report, and implementation.&lt;br /&gt;For example Flow chart, Bubble chart or data flow diagram, Grind chart etc.&lt;br /&gt;Flow charts&lt;br /&gt;A flowchart is a pictorial/graphical presentation of flow of data to solving the problem. A flowchart is a diagrammatic representation of the logic or sequence of steps that solve a problem. Flowchart is tools for the programmer to analyze, organize, and solve a problem.  A number of pictorial figures are used to help draw the flow charts. Finally the instructions are coded in one of the programming languages, called a program. The person who writes program are called programmer.&lt;br /&gt;When developing a flow chart the systems analyst (or programmer) should observe the following guidelines:&lt;br /&gt;Flow charts are drawn from the top of a page to the bottom and from left to right.&lt;br /&gt;The activity being flow-charted should be carefully defined and this definition made clear to the reader. Where the activity starts and where it end, should be determined.&lt;br /&gt;Each step of the activity should be describes one-verb descriptions, e.g. prepare statement or file customer statement.&lt;br /&gt;Each step of the activity should keep in its proper sequence.&lt;br /&gt;The scope or range of the activity being flowcharted should be carefully observed. Any branches that leave the activity being charted should not be drawn on that flow chart. A connection symbol should be used and that branched put on separate pages or omitted entirely if it does not pertain to the system.&lt;br /&gt;Use the standard flow-charting symbols.&lt;br /&gt;Type of flowcharts:&lt;br /&gt; &lt;br /&gt;A system flow chart show the overall work flow of the system. It is a pictorial description of the sequence of the combined procedures that makes up the system. A system flowchart shows the sequence of physical devices used to solve that problem. &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Program Flowchart&lt;br /&gt;This is the pictorial representation of the logic of the program, showing different steps to solve a problem.&lt;br /&gt;Program flowchart symbols&lt;br /&gt; &lt;br /&gt;The XYZ Company has found t&lt;br /&gt;hat it can purchase a raw material at a cost of $40.00 per order. The company has a 10% carrying charge on average inventory. They expect to use $20,000 of the raw material within the next year. To determine the economic order quantity (EOQ) by using the formula:   EOQ = 2AP/RC Where: A=Annual Cost  P=Annual Usage  R=Price per order    C= Carriage Charges&lt;br /&gt;Draw its system Flowchart and program flowchart.&lt;br /&gt;Two very simple program flowcharts are shown in below figure. The one on the left is program flow chart prepared by a systems analyst to show the detail of procedural operation. The one on ht eight is a programmer to show details of computer program operation. It is noted that the systems analyst into a program flowchart as in below left side figures further expands the systems flowchart in above example. Programmer when expands the detail into  program flowchart shown in the below right size figure.&lt;br /&gt;Systems flowchart                              Program flowchart&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/259104587845316746-6766282642847015963?l=dit-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/259104587845316746/posts/default/6766282642847015963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/259104587845316746/posts/default/6766282642847015963'/><link rel='alternate' type='text/html' href='http://dit-notes.blogspot.com/2009/06/information-technology.html' title='Information Technology'/><author><name>sokaniwaal</name><uri>http://www.blogger.com/profile/03036988373905460557</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_JPaQhocksZY/SDokYZasQ4I/AAAAAAAAAEY/rc9niNX3ne4/S220/green_eyes.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-259104587845316746.post-5668325507623024071</id><published>2009-03-02T11:19:00.001+05:00</published><updated>2009-03-02T11:29:56.286+05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dit notes'/><category scheme='http://www.blogger.com/atom/ns#' term='technical board peshawar'/><category scheme='http://www.blogger.com/atom/ns#' term='diploma of Information Technology'/><title type='text'>Diploma Of Information Technology Notes</title><content type='html'>Welcome To DIT-Notes Blog, here you can find a veriety notes about DIT subjects, course outline, previous paper and also online result. This blog is basically created for student to reasearch and increase the idea of IT on biggner lavel to advance, here we host a forum for student to discuss their problem and achievments. For any idea or suggestion for the improvement of this blog, feel free to share with us on our email address. &lt;br /&gt;&lt;br /&gt;Site Admin&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/259104587845316746-5668325507623024071?l=dit-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/259104587845316746/posts/default/5668325507623024071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/259104587845316746/posts/default/5668325507623024071'/><link rel='alternate' type='text/html' href='http://dit-notes.blogspot.com/2009/03/diploma-of-information-technology-notes.html' title='Diploma Of Information Technology Notes'/><author><name>sokaniwaal</name><uri>http://www.blogger.com/profile/03036988373905460557</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_JPaQhocksZY/SDokYZasQ4I/AAAAAAAAAEY/rc9niNX3ne4/S220/green_eyes.jpg'/></author></entry></feed>
