dalson vb

6
HOHAI UNIVERSITY MODULUS: METHODS OF PROGRAMMING MODULUS: VISUAL BASIC TWECAN Dalson , M2014042 12/17/2014 Design a project about your research field, To solve a problem. My project is ( DESIGN A PROGRAM THAT WILL DETERMINE THE ANNULLY TOTAL AND AVERAGE SEEDS USED BY THE FORMER TASK MANAGER.)

Upload: karen-johnson

Post on 10-Nov-2015

214 views

Category:

Documents


0 download

DESCRIPTION

programming

TRANSCRIPT

  • HOHAI UNIVERSITY

    MODULUS: METHODS OF PROGRAMMING

    MODULUS: VISUAL BASIC

    TWECAN Dalson , M2014042

    12/17/2014

    Design a project about your research field, To solve a problem. My project is ( DESIGN A PROGRAM THAT WILL DETERMINE THE ANNULLY TOTAL AND AVERAGE SEEDS USED BY THE FORMER TASK MANAGER.)

  • 2

    In my project I used the following tools: Label, Button, Textbox, Checkbox, Groupbox.

    a) PROPERTIES OF THE PROJECT

    b) INTERFACE OF THE PROJECT

    The following picture shows interface of Irrigation project throughout Agriculture year in

    Uganda. As you can see

    SN PROPERTY OBJECT SETTING

    1 Text SEASON ONE GroupBox4

    2 Text January Label5

    3 Text 234 TextBox4

    4 Text Total and Average Quantity of Seeds used during Four Agricultural SeasonsLabel1

    5 Text Results of Seeds Quantity GroupBox1

    6 Text Annual Seeds Quantity TextBox1

    7 Text Number of Agriculture Seasons Label3

    8 Text Average Annual Seeds Quantity Label4

    9 Text TextBox3

    10 Text Buttoncheckstate Submit

    11 Text Quit Button2

  • 3

    The above picture describes four Agricultural seasons used especially yearly irrigation project in

    Uganda.

    As you can see on the above picture we have 4 agriculture seasons but each seasons composed

    by three months, so our aims now is to establish a program that will help a farmer task manager

    to calculate the total annually seeds quantity and the average seeds consumption per seasons.

  • 4

    c) CODE

    Public Class Form1 Private Sub Buttoncheckstate_Click(sender As System.Object, e As System.EventArgs) Handles Buttoncheckstate.Click Dim a, b, c, d, q, f, g, h, i, j, k, l, o, P, AVG As Integer a = TextBox4.Text b = TextBox5.Text c = TextBox6.Text d = TextBox7.Text q = TextBox8.Text f = TextBox9.Text g = TextBox10.Text h = TextBox17.Text i = TextBox16.Text j = TextBox15.Text k = TextBox14.Text l = TextBox13.Text P = TextBox2.Text o = (a + b + c + d + q + f + g + h + i + j + k + l) AVG = o / P TextBox1.Text = o TextBox3.Text = AVG End Sub Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click Close() End Sub End Class

  • 5

    Let us try to run our program and we see how the program will look like,

  • 6

    After running our program looks like this, the next step is to click to the submit button

    This the result displayed by our program after clicking to the submit button, we can see that

    here the total seeds quantity were 7502 tons used in whole year, and seasonally average seeds

    were 1876 tons, thus implied that next year the former will only put the monthly seeds and he

    will get exactly annually total and the average seeds.