©2011 mobisoft

  • Upload
    ofchima

  • View
    217

  • Download
    0

Embed Size (px)

Citation preview

  • 8/6/2019 2011 mobisoft

    1/39

    A TECHNICAL REPORT

    ON

    STUDENTS INDUSTRIAL WORK EXPERIENCESCHEME

    UNDERTAKEN AT NO. 14 OBY OKOLI AVENUE

    UNIZIK TEMP SITE AWKA, ANAMBRA STATE

    PRESENTED BY

    OKAFOR JACINTA

    2007224

    IN PARTIAL FULFILLMENT OF THE REQUIREMENTSFOR THE AWARD

    OF BSc. DEGREE IN COMPUTER SCIENCE

    ANAMBRA STATE UNIVERSITY ULI.

    NOVEMBER 2010

  • 8/6/2019 2011 mobisoft

    2/39

    DEDICATION

    This work is dedicated to the almighty for the help and protection He hadrendered to me.

  • 8/6/2019 2011 mobisoft

    3/39

    ACKNOWLEDGEMENT

  • 8/6/2019 2011 mobisoft

    4/39

    TABLE OF CONTENTS

  • 8/6/2019 2011 mobisoft

    5/39

    INTRODUCTION

    The Student Industrial Work Experience Scheme (SIWES) is anappreciable skills training programme which form part of the minimum

    academics standard in Nigerian universities.The scheme is a participatoryprogramme, involving Universities, Polytechnics and Technical Collegesstudents of various institutions in Nigeria. It is run jointly with the IndustrialTraining Fund (ITF), which serves as the regulating body.

    Objective Of Siwes

    Specifically, the objectives of the Students Industrial Work ExperienceScheme are to:

    i. Provide an avenue for students in Nigerian university to acquireindustrial skills and experience in their course of study;

    ii. Prepare student for work situation they are likely to meet after graduation.

    iii. Provide students with an opportunity to apply their theoreticalknowledge in real work situation, thereby bridging the gap between andactual practice;

    iv. Make the transition from school to the world of work easier, andenhance students contacts for later job placement;

    v. Enlist and strengthen employers, involvement in the entireeducational process and prepare students for employment in Industry andCommerce.

  • 8/6/2019 2011 mobisoft

    6/39

    BODIES INVOLVED IN THE MANAGEMENT OF SIWES PROGRAMMEAND ROLES

    The Federal Government, the Industrial Training Fund (ITF), theSupervising Agencies

    National Universities Commission (NUC), the National Board for TechnicalEducation

    (NBTE), National Commission for Colleges of Education (NCCE),Employers of Labor

    and Institutions have specific roles assigned to them in the management of the SIWES

    Programme. The roles are as follows: -

    Operators - The ITF, the coordinating agencies (NUC, NCCE, NBTE),employers of labor and the institution.

    Funding - The Federal Government of Nigeria

    Beneficiaries - Undergraduate students of the following: Agriculture,Engineering, Technology, Environmental, Science, Education, MedicalScience and Pure and Applied Sciences.

    Duration - Four months for Polytechnics and Colleges of Education, andSix months for the Universities.

    The Federal Government

    The federal government is to:

  • 8/6/2019 2011 mobisoft

    7/39

    i. Make adequate funds available to the federal ministry of industry tofund the scheme;

    ii. Makes it mandatory for all ministries, companies and government

    parastatals, to offer attachment places to student;iii. Make it a policy to include a clause in every major contact lastingover six to nine months begin awarded for contractors to take students inattachment

    The Industrial Training Fund (ITF)

    The industrial training fund is to:

    i. Provides logistic material needed to administer the scheme;

    ii. Compile list of employers and available training places for industrialattachment and forward such lists to the coordinating agencies (i.e.NUC,NBTE,NCCE);

    iii. Organize bi-ennial conferences and seminars on SIWES.

    The Supervising Agencies (Nuc, Nbte And Ncce)

    These Agencies are to:

    i. Ensure the establishment and accreditation of SIWES Units ininstitutions under their jurisdiction;

    ii. Direct for the appointment of full-time SIWES Co-ordinators;

  • 8/6/2019 2011 mobisoft

    8/39

    iii. Ensure adequate funding of the SIWES units in all the institutions.

    iv. Continuously monitor and review the job specifications of all thecourses;

    The Institutions

    The Institutions are to:

    i. Establish SIWES co-ordinating Units with a Separate Account,adequately staffed and funded to ensure effective operation of the Scheme.The Unit must meet the following minimum requirement

    ii. Appoint SIWES co-ordinators, and supporting staff.

    iii. Prepare and submit six copies of Master Lists not later than 31stMarch and six

    copies of Placement lists not later than 31st May of each SIWESyear to the ITF.

    iv Identify placement opportunities for students attachment withEmployers;

  • 8/6/2019 2011 mobisoft

    9/39

    v Supervise students at their places of attachment and sign their log-books;

    vi Organize orientation courses in collaboration with the ITF for their students;

    The Employers

    The employers are to:

    i. Accept students and assign them to relevant on the job training;

    ii. Attach experienced staff to students for effective training andsupervision. Supervision should not handle more than ten students at atime;

    iii. Control and discipline students like permanent staff;

    The Students

    The students are to:

  • 8/6/2019 2011 mobisoft

    10/39

    i. To attend institutions SIWES orientation programmer before going onattachment.

    ii. To be obedient to constituted authorities and adhere strictly to all

    rules and regulations of the Organization where the student is attached.iii. To be regular and punctual at respective places of attachment.

    iv. To avoid change of place of attachment, except in specialcircumstances which must be determined and approved by their institutions supervisor, the employer and the ITF?

    v. To complete SPE 1 form and get it endorsed by their employerswho will forward same to the ITF;

    vi. To record all training activities and other assignments in the log-bookand complete ITF Form-8 to ensure proper assessments.

    vii. To be diligent, honest, conscientious, take pride in the protection of employers property throughout the attachment period.

    Supervision Of Students

    Students on attachment are to be supervised by Supervisors from their institutions, professional staff of the 7ITF; Institutions Supervisors are tovisit students at least two times during the attachment.

    Log-Books

    The Log-books issued to students on attachment by Institutions must be

    checked and signedby Institution/Industry- based supervisors and the ITF during supervision.

  • 8/6/2019 2011 mobisoft

    11/39

    CHAPTER ONE

    THE FIRM

    I had no vivid knowledge about this until after the orientation. SIWES was

    meant to enlighten me and the rest of the students. So I put up a strenous

    effort to get placed in a firm that will really do just that. As a computer

    science student, I discern that the best firm for me is an information and

    communication technology (ICT) organization. My effort resulted in my

    placement at Infotech and Hi-tech computer. This is where I hoped to get

    the necessary ideas on computer science. So I wish to use this write up to

    report on the firm and what I learnt there in.

    THE FIRM: INFOTECH AND HI-TECH COMPUTER

    The company Infotech and Hi-tech computer was incorporated with the aim

    of providing ICT solution to individuals, organization and institution in

    Nigeria. Infotech and Hi-tech computer is fully owned and managed by

    professionals with distinct knowledge. The company currently operates

    Kwara and Lagos states.

    Mission Of Infotech and Hi-tech computer

    Our mission is to empower people with ICT skills and providing solutions to

    the unsolved ICT Challenges.

    Vission Of Infotech and Hi-tech computer

    Our vision is to have a world in which there are no stresses as a result of

    the level of ICT solution we have provided.

  • 8/6/2019 2011 mobisoft

    12/39

    Values Of Infotech and Hi-tech computer

    We value integrity, sincerity, personal excellence, commitment, continualself-improvement, and humility. Our pride is in the numerous ICT

    challenges we have solved.

    Infotech and Hi-tech computer Services

    We are committed to service delivery with emphasis on customer

    satisfaction. Infotech and Hi-tech computer provides the following services:

    Training Networking Laptop repairs Software development

    Digital elect. Intercom installation Data recovery Sales / accessories Web development ConsultancyInfotech and Hi-tech computer organogram

  • 8/6/2019 2011 mobisoft

    13/39

    Departments And Functions In K Infotech And Hi-Tech Computer

    Training Department

    This department deals with impacting of knowledge on individuals who

    wants to advance in ICT as ICT advances with time. This department

    ensures that the training infrastructures are properly kept and organized for

    easy learning.

    Marketing Department

    This department advertises the company profiles and service rendered in

    the company to prospective client. They ensure that services are being

    delivered to their clients full satisfactory.

    Consult Department

    The consult department renders consultancy service to their numerous

    clients. Due to the dynamic nature of IT, clients need to be fed and updated

    with the current technological development.

    Business Department

    The department is in charge of typing, photocopy, scanning etc of various

    clients documents and folders. It is a major economic booster to the

    company as clients most especially students patronize their services.Engineering Department

    This arm of Infotech is the hardware and repair section of the company.

    They offer services ranging from computer system repair, assembling and

  • 8/6/2019 2011 mobisoft

    14/39

    maintenance of system, sales of computer accessories etc. clients

    patronize them due to their excellent services delivered.

    Digital and Electronic Department

    This department deals with development of solar energy used in various

    places like houses, offices, church etc. this solar energy can also be called

    inverter.

    Infotech has different departments. During my Industrial Training period,

    I was attached to Training Department. This department ensures that all

    students are given quality knowledge they require to portrait their futurecareer. I was privileged to be in vb.net classes. It was there that I learnt my

    codes yes vb.6.0. Also I took part in web design development team. I also

    participated in the companies seminar held for all the IT students, I

    presented a topic Data Technology using power point. This made me to

    be competent with power point presentation.

    Nonetheless I will narrow my report down to visual basic 6.0. Thesubsequent pages contains my knowledge on visual basic 6.0

  • 8/6/2019 2011 mobisoft

    15/39

    CHAPTER TWO

    PROGRAMMING WITH VISUAL BASIC 6.0

    To program means to design or write instructions in a computer programming language with the purpose of instructing the computer onhow to accomplish a specific task. However for a program to be writtensuccessfully, some steps need to be taken.

    2.1 Programming steps

    1. Problem identification: in computing, problen can be referred to ascomputer task that needs to be accomplished. In other words a user may need to get a particular thing done but has no application

    designed to do just that. Identifying the problem means to know whatthe application needs to do.

    2. Solution design: for object oriented programming language thisimplies the conception of how the program will look like ie the user interface, the object properties and the codes that will make theapplication have the desired result.

    3. Coding: this involves writing the real-time instruction in a computer language.

    4. Testing: this is the activity of evaluating the capability of a programand determining if it meet the required results. 5. Debugging: this involves isolating and fixing the problem detected

    during the testing phase. 6. Documentation: this is the act of providing a written text that

    accompanies a computer software with the purpose of providing anexplaination of how the program operates and how to use it.

    7. Maintenance: this is the modification of a computer program with thepurpose of correctimg faults, improving performance or other attributes.

    During my stay at Infotech, I programmed with visual basic 6.0. thesubsequent pages contains the things I learnt about visual basic during myindustrial training.

  • 8/6/2019 2011 mobisoft

    16/39

    2.2 Visual Basic 6.0

    Visual Basic was derived from BASIC and enables the rapid applicationdevelopment of graphical user interface (GUI) applications, access to

    databases using Data Access Objects, Remote Data Objects, or ActiveXData Objects, and creation of ActiveX controls and objects. Scriptinglanguages such as VBA and VBScript are syntactically similar to VisualBasic, but perform differently.

    visual Basic can be defined as the third-generation event-drivenprogramming language and integrated development environment (IDE)from Microsoft for its COM programming model.

    2.3 Features of the language

    The language not only allows programmers to create simple GUIapplications, but can also develop complex applications.

    Programming in VB is a combination of visually arranging components or controls on a form, specifying attributes and actions of those components,and writing additional lines of code for more functionality.

    Since default attributes and actions are defined for the components, a

    simple program can be created without the programmer having to writemany lines of code. Performance problems were experienced by earlier versions, but with faster computers and native code compilation this hasbecome less of an issue.

    Forms are created using drag-and-drop techniques. A tool is used to placecontrols (e.g., text boxes, buttons, etc.) on the form (window). Controlshave attributes and event handlers associated with them. Default valuesare provided when the control is created, but may be changed by the

    programmer. Many attribute values can be modified during run time basedon user actions or changes in the environment, providing a dynamicapplication even prevent certain characters from being inserted.

  • 8/6/2019 2011 mobisoft

    17/39

    Visual Basic can create executables (EXE files), ActiveX controls, or DLLfiles, but is primarily used to develop Windows applications and to interfacedatabase systems.

    Dialog boxes with less functionality can be used to provide pop-upcapabilities. Controls provide the basic functionality of the application, whileprogrammers can insert additional logic within the appropriate eventhandlers.

    Visual Basic is generally not case sensitive, although it will transformkeywords into a standard case configuration and force the case of variablenames to conform to the case of the entry within the symbol table. Stringcomparisons are case sensitive by default, but can be made case

    insensitive if so desired.Multiple assignment available in C language is not possible.

    Logical and bitwise operators are unified.

    Variable array base. Arrays are declared by specifying the upper and lower bounds.

    It is also possible to use the Option Base statement to set the default lower

    bound.Integers are automatically promoted to reals in expressions involving thenormal division operator (/) so that division of one integer by another produces the intuitively correct result.

    2.3 The integrated development environment

    The Visual Basic IDE is made up of a number of components illustratedbelow.

  • 8/6/2019 2011 mobisoft

    18/39

    2.4 Brief overview of the IDE

    In Visual Basic 6.0, the IDE is in a Multiple Document Interface (MDI)format. In this format, the windows associated with the project will staywithin a single container known as the parent. Code and form-basedwindows will stay within the main container form. Some components of the

    IDE cannot be ignored.

    Menu Bar

    This Menu Bar displays the commands that are required to build anapplication. The main menu items have sub menu items that can bechosen when needed. The toolbars in the menu bar provide quick

  • 8/6/2019 2011 mobisoft

    19/39

    access to the commonly used commands and a button in the toolbar isclicked once to carry out the action represented by it.

    Toolbox

    The Toolbox contains a set of controls that are used to place on aForm at design time thereby creating the user interface area.

    Additional controls can be included in the toolbox by using theComponents menu item on the Project menu. A Toolbox isrepresented in figure 2 shown below.

    The toolbox contains some controls as follows

    Pointer: Provides a way to move and resize the controls form

    PictureBox: Displays icons/bitmaps and metafiles. It displays text or acts as a visual container for other controls.

    TextBox: Used to display message and enter text.

    Frame: Serves as a visual and functional container for controls

    CommandButton: Used to carry out the specified action when the user chooses it.

    CheckBox: Displays a True/False or Yes/No option.

    OptionButton: OptionButton control which is a part of an option groupallows the user to select only one option even it displays mulitiplechoices.

    ListBox: Displays a list of items from which a user can select one.

    ComboBox: Contains a TextBox and a ListBox. This allows the user to

    select an ietm from the dropdown ListBox, or to type in a selection inthe TextBox.

    HScrollBar and VScrollBar: These controls allow the user to select avalue within the specified range of values

    Timer: Executes the timer events at specified intervals of time

  • 8/6/2019 2011 mobisoft

    20/39

    DriveListBox: Displays the valid disk drives and allows the user toselect one of them.

    DirListBox: Allows the user to select the directories and paths, which

    are displayed.FileListBox: Displays a set of files from which a user can select thedesired one.

    Shape : Used to add shape (rectangle, square or circle) to a Form

    Line: Used to draw straight line to the Form

    Image: used to display images such as icons, bitmaps and metafiles.But less capability than the PictureBox

    Data: Enables the use to connect to an existing database and displayinformation from it.

    OLE: Used to link or embed an object, display and manipulate datafrom other windows based applications.

    Label: Displays a text that the user cannot modify or interact with.

    Project Explorer: Docked on the right side of the screen, just under thetollbar, is the Project Explorer window. The Project Explorer as shownin in figure servres as a quick reference to the various elements of aproject namely form, classes and modules. All of the object that makeup the application are packed in a project. A simple project will typicallycontain one form, which is a window that is designed as part of aprogram's interface. It is possible to develop any number of forms for use in a program, although a program may consist of a single form. Inaddition to forms, the Project Explorer window also lists code modulesand classes.

    Properties Window

    The Properties Window is docked under the Project Explorer window.The Properties Window exposes the various characteristics of selectedobjects. Each and every form in an application is considered an object.

  • 8/6/2019 2011 mobisoft

    21/39

  • 8/6/2019 2011 mobisoft

    22/39

    Store integer values in the range of 0 - 255

    Integer

    Store integer values in the range of (-32,768) - (+ 32,767)

    Long

    Store integer values in the range of (- 2,147,483,468) - (+2,147,483,468)

    Single

    Store floating point value in the range of (-3.4x10-38) - (+ 3.4x1038)

    DoubleStore large floating value which exceeding the single data type value

    Currency

    store monetary values. It supports 4 digits to the right of decimal pointand 15 digits to the left

    2. String

    Use to store alphanumeric values. A variable length string can storeapproximately 4 billion characters

    3. Date

    Use to store date and time values. A variable declared as date typecan store both date and time values and it can store date values01/01/0100 up to 12/31/9999

    4. Boolean

    Boolean data types hold either a true or false value. These are notstored as numeric values and cannot be used as such. Values areinternally stored as -1 (True) and 0 (False) and any non-zero value isconsidered as true.

  • 8/6/2019 2011 mobisoft

    23/39

    5. Variant

    Stores any type of data and is the default Visual Basic data type. InVisual Basic if we declare a variable without any data type by default

    the data type is assigned as default.Operators in Visual Basic

    Arithmetical Operators

    Add

    Substract

    Divide

    Integer Division

    Multiply

    Exponent (power of)

    Mod

    Relational Operators

    Greater than

    Less than

    False

    Greater than or equal to

    True

    Less than or equal to

    Not Equal to

    True

    Equal to

  • 8/6/2019 2011 mobisoft

    24/39

    Logical Operators

    AND

    In some programs there are need to structure and control cde flow, thenext chapter eill deliberate on programming structures and flow control.

  • 8/6/2019 2011 mobisoft

    25/39

  • 8/6/2019 2011 mobisoft

    26/39

    3.1 Variables in Visual Basic 6

    Variables are the memory locations which are used to store valuestemporarily. A defined naming strategy has to be followed while naming a

    variable. A variable name must begin with an alphabet letter and should notexceed 255 characters. It must be unique within the same scope. It shouldnot contain any special character like %, &, !, #, @ or $.

    Declaring a variable tells Visual Basic to reserve space in memory. It is notmust that a variable should be declared before using it. Automaticallywhenever Visual Basic encounters a new variable, it assigns the defaultvariable type and value. This is called implicit declaration. Though this typeof declaration is easier for the user, to have more control over the

    variables, it is advisable to declare them explicitly. The variables aredeclared with a Dim statement to name the variable and its type. The Astype clause in the Dim statement allows to define the data type or objecttype of the variable. This is called explicit declaration.

    Syntax

    Dim variable [As Type]

    3.1.1 Scope of variables

    A variable is scoped to a procedure-level (local) or module-level variabledepending on how it is declared. The scope of a variable, procedure or object determines which part of the code in our application are aware of thevariable's existence. A variable is declared in general declaration section of e Form, and hence is available to all the procedures. Local variables arerecognized only in the procedure in which they are declared. They can bedeclared with Dim and Static keywords. If we want a variable to beavailable to all of the procedures within the same module, or to all theprocedures in an application, a variable is declared with broader scope.

    Local Variables

    Static Variables

    Module Levele Variables

  • 8/6/2019 2011 mobisoft

    27/39

    3.2 Control Structures in Visual Basic 6.0

    Control Statements are used to control the flow of program's execution.Visual Basic supports control structures such as if... Then, if...Then ...Else,Select...Case, and Loop structures such as Do While...Loop, While...Wend,For...Next etc method.

    3.2.1 If...Then selection structure

    The If...Then selection structure performs an indicated action onlywhen the condition is True; otherwise the action is skipped.

    Syntax of the If...Then selection

    If Then

    statement

    End If

    e.g.: If average>75 Then

    txtGrade.Text = "A"

    End If

    3.2.2 If...Then...Else selection structure

    The If...Then...Else selection structure allows the programmer tospecify that a different action is to be performed when the condition isTrue than when the condition is False.

    Syntax of the If...Then...Else selection

    If Then

    statements

    Else

    statements

  • 8/6/2019 2011 mobisoft

    28/39

    End If

    e.g.: If average>50 Then

    txtGrade.Text = "Pass"

    Else

    txtGrade.Text = "Fail"

    End If

    3.2.3 Nested If...Then...Else selection structure

    Nested If...Then...Else selection structures test for multiple cases by

    placing If...Then...Else selection structures inside If...Then...Elsestructures.

    Syntax of the Nested If...Then...Else selection structure

    3.2.4 Select...Case selection structure

    Select...Case structure is an alternative to If...Then...ElseIf for selectively executing a single block of statements from among multipleblock of statements. Select...case is more convenient to use than theIf...Else...End If. The following program block illustrate the working of Select...Case.

    Syntax of the Select...Case selection structure

    Select Case Index

    Case 0

    Statements

    Case 1

    Statements

    End Select

  • 8/6/2019 2011 mobisoft

    29/39

    e.g.: Assume you have to find the grade using select...case anddisplay in the text box

    Dim average as Integer

    average = txtAverage.Text

    Select Case average

    Case 100 To 75

    txtGrade.Text ="A"Case 74 To 65

    txtGrade.Text ="B"

    Case 64 To 55

    txtGrade.Text ="C"

    Case 54 To 45

    txtGrade.Text ="S"

    Case 44 To 0

    txtGrade.Text ="F"

    Case Else

    MsgBox "Invalid average marks"

    End Select

    Note: In this example I have used a message box function. In later lessons you will learn how to use message box functions.

    Loops (Repetition Structures) in Visual Basic 6

  • 8/6/2019 2011 mobisoft

    30/39

    A repetition structure allows the programmer to that an action is to berepeated until given condition is true.

    Do While... Loop Statement

    The Do While...Loop is used to execute statements until a certaincondition is met. The following Do Loop counts from 1 to 100.

    Dim number As Integer

    number = 1

    Do While number

  • 8/6/2019 2011 mobisoft

    31/39

    The Do...Loop While statement first executes the statements and thentest the condition after each execution. The following program blockillustrates the structure:

    Dim number As Longnumber = 0

    Do

    number = number + 1

    Loop While number < 201

    The programs executes the statements between Do and Loop While

    structure in any case. Then it determines whether the counter is lessthan 501. If so, the program again executes the statements betweenDo and Loop While else exits the Loop.

    Do Until...Loop Statement

    Unlike the Do While...Loop and While...Wend repetition structures, theDo Until... Loop structure tests a condition for falsity. Statements in thebody of a Do Until...Loop are executed repeatedly as long as the loop-

    continuation test evaluates to False. An example for Do

    Do Until...Loop Statement

    Unlike the Do While...Loop and While...Wend repetition structures, theDo Until... Loop structure tests a condition for falsity. Statements in thebody of a Do Until...Loop are executed repeatedly as long as the loop-continuation test evaluates to False.

    An example for Do Until...Loop statement. The coding is typed insidethe click event of the command button

    Dim number As Long

    number=0

  • 8/6/2019 2011 mobisoft

    32/39

    Do Until number > 1000

    number = number + 1

    Print number

    Loop

    Numbers between 1 to 1000 will be displayed on the form as soon asyou click on the command button.

    The For...Next Loop

    The For...Next Loop is another way to make loops in Visual Basic.For...Next repetition structure handles all the details of counter-

    controlled repetition. The following loop counts the numbers from 1 to100:

    Dim x As Integer

    For x = 1 To 50

    Print x

    Next

    In order to count the numbers from 1 yo 50 in steps of 2, the followingloop can be used

    For x = 1 To 50 Step 2

    Print x

    Next

    The following loop counts numbers as 1, 3, 5, 7..etc

    The above coding will display numbers vertically on the form. In order to display numbers horizontally the following method can be used.

    For x = 1 To 50

  • 8/6/2019 2011 mobisoft

    33/39

    Print x & Space$ (2);

    Next

    To increase the space between the numbers increase the value insidethe brackets after the & Space$.

    Following example is a For...Next repetition structure which is with theIf condition used.

    Dim number As Integer

    For number = 1 To 10

    If number = 4 Then

    Print "This is number 4"

    Else

    Print number

    End If

    Next

    In the output instead of number 4 you will get the "This is number 4".

    3.3 Working with controls in Visual Basic 6

    This lesson concentrates on Visual Basic controls and the ways of creatingand implementing the. It also helps us to understand the concept of Control

    Arrays. Controls are used to recieve user input and display output and hasits own set of properties, methods and events. Let us discuss few of thesecontrols in this lesson.

    3.3.1 Creating and Using Controls

    A control is an object that can be drawn on a Form object to enable or enhance user interaction with an application. Controls have properties thatdefine aspects their appearance, such as position, size and colour, andaspects of their behavior, such as their response to the user input. They

  • 8/6/2019 2011 mobisoft

    34/39

    can respond to events initiated by the user or set off by the system. For instance, a code could be written in a CommandButton control's click eventprocedure that would load a file or display a result.

    In addition to properties and events, methods can also be used tomanipulate controls from code. For instance, the move method can beused with some controls to change their location and size.

    Most of the controls provide choices to users that can be in the form of OptionButton or CheckBox controls, ListBox entries or ScrollBars to selecta value. Let us discuss these controls by means of a few simpleapplications in the following lessons.

    3.4 Working with Forms in Visual Basic 6

    The Appearance of Forms

    The main characteristic of a Form is the title bar on which the Form'scaption is displayed. On the left end of the title bar is the Control Menuicon. Clicking this icon opens the Control Menu. Maximize, Minimize andClose buttons can be found on the right side of the Form. Clicking on thesebuttons performs the associated function.

    3.5 Working with Menus in Visual Basic 6.0Windows applications provide groups of related commands in Menus.These commands depends on the application, but some-such as Open andSave are frequently found in applications. Menus are intrinsic controls, andas such they deserve a place in this chapter. On the other hand, menusbehave differently from other controls. For example, you don't drop menuitems on a form from the Toolbox; rather, you design them in the MenuEditor window, as you can see in the figur below. You invoke this tool from

    the Menu Editor button on the standard toolbar or by pressing the Ctrl+Eshortcut key. There's also a Menu Editor command in the Tools menu, butyou probably won't use it often.

    Visual Basic provides an easy way to create menus with the modal MenuEditor dialog. The below dialog is displayed when the Menu Editor is

  • 8/6/2019 2011 mobisoft

    35/39

    selected in the Tool Menu. The Menu Editor command is grayed unless theform is visible. And also you can display the Menu Editor window by rightclicking on the Form and selecting Menu Editor.

    3.6 The Multiple Document Interface (MDI) in Visual Basic 6The Multiple Document Interface (MDI) was designed to simplify theexchange of information among documents, all under the same roof. Withthe main application, you can maintain multiple open windows, but notmultiple copies of the application. Data exchange is easier when you canview and compare many documents simultaneously.

    You almost certainly use Windows applications that can open multipledocuments at the same time and allow the user to switch among them witha mouse-click. Multiple Word is a typical example, although most peopleuse it in single document mode. Each document is displayed in its ownwindow, and all document windows have the same behavior. The mainForm, or MDI Form, isn't duplicated, but it acts as a container for all thewindows, and it is called the parent window. The windows in which theindividual documents are displayed are called Child windows.

    3.7 Visual Basic 6 -Error handling and Debugging and File

    Input/OutputError Handling enables programmers to write clearer, more robust, more

    fault-tolerant programs. Error handling enables the programmer to attemptto recover (i.e., continue executing) from infrequent fatal errors rather thanletting them occur and suffering the consequences (such as loss of application data). If an error is severe and recovery is not possible, theprogram can be exited "gracefully"-all files can be closed and notificationcan be given that the program is terminating. The recovery code is called

    an error handler.

    Error handling is designed for dealing with synchronous errors such as anattempt to divide by 0 (that occurs as the program executes the divideinstruction). Other common examples of synchronous errors are memoryexhaustion, an out-of-bound array index, and arithmetic overflow. Error

  • 8/6/2019 2011 mobisoft

    36/39

    handling provides the programmer with a disciplined set of capabilities for dealing with these types of errors.

    Error-handling code varies in nature and amount among software systems

    depending on the application and whether or not the software is a productfor release. Products tend to contain much more error-handling code thanis contained in "casual" software.

    Usually, error-handling code is interspersed throughout a program's code.Errors are dealt with the places in the code where errors are likely to occur.The advantage of this approach is that a programmer reading the code cansee the error handling in the immediate vicinity of the code and determine if the proper error handling has been implemented.

    The problem with the scheme is that code in a sense becomes "polluted"with error handling. It becomes difficult for a programmer concerned withthe application itself to read the code and determine if the code is workingis correctly. Error handling often makes the code more difficult tounderstand and maintain.

  • 8/6/2019 2011 mobisoft

    37/39

    CHAPTER FOUR

    4.0 INDUSTRIAL TRAINING IMPACT

    The industrial training provided me with work methods, basic computer knowledge, programming concept and practical aspects of some theoreticalknowledge I had before. The industrial training enlightened me in thefollowing areas.

    4.1 Office conduct: It is a good practice to be punctual at work every dayand sign in. Grooming also matters. It is ice to dress decently. Due honor should be accorded to business clients so that the firm would not lose their patronage. Assigned duties should be completed promptly.

    4.2 Basic computer knowledge: I learnt many things about windows, howto respond to dialogs, setting up some preferences in the control panel,installation of software and so many more.

    4.3 Programming: Through examples I witnessed firsthand, I learnt howprojects are created. The programmer observes some steps to get thisdone.

    4.3.1 The three-step process

    Planning

    1. Designing the user interface . You first draw a sketch of the screens theuser will see when running your project. On your sketch, show theforms and all the controls that you will plan to use. Indicate the namesthat you plan the forms and each object on the form. Before youproceed to next step, consult you user and make sure that both of agree on the look.

    2. Plan the properties. For each object, write down the properties youplan to set or change during the design of the form.

    3. Plan the basic code . In this step, you plan the classes and proceduresthat will be execute when your project runs. You will determine whichevent requires action to be taken and then make a step-by-step plan

  • 8/6/2019 2011 mobisoft

    38/39

    for those actions. The next thing is write pseudo code, which is Englishexpression or comment that describes the action. For example, youmust plan for event that occurs when the user clicks on the Exit button.The pseudocode for the event could be Terminate the project or Quit.

    Programming

    After you have completed the planning steps and have approved fromyour user, you are ready to begin the actual construction of the project.Use the same three-step process that you used for planning.

    1. Define the user interface . When you define the user interface, youcreate the forms and controls that you designed in the planning stage.

    2. Set the properties . When you set the properties of the object, you giveeach object a name and define such attributes as the content of thelabel, the size of the text, and the word that appears on top of thecontrol and in the forms title bar.

    3. Write the basic code . You will use basic programming statements(called Basic Code) to carry out the actions needed by your program.

    An example below illustrates the steps I discussed above.

  • 8/6/2019 2011 mobisoft

    39/39

    CHAPTER FIVE

    5.0 Conclusion

    Over the years SIWES has contributed immensely to the academic and

    practical welfare of graduating students to the extent that its impact can

    never be termed insignificant. The aim of this scheme is to join theory and

    practice of Science, Engineering, Medical, Agriculture and other

    Educational professional programs in Nigerian Universities. It is inclined at

    exposing students to professional work, Machines, Equipments, ways of

    safe-guarding the work areas and works in Industries and other

    organization so that when a student graduates, he becomes self dependent. In effect this reduces the rate of unemployment.

    It is important at this point to thank all those who in various ways have

    contributed to making SIWES a success. I also want to beg the further

    cooperation of all interest group in SIWES, the universities, industries and

    ITF to cooperate in ensuring the proper placement and training of students.