0% found this document useful (0 votes)
22 views6 pages

Modulus: Methods of Programming

This document describes a Visual Basic program designed by a student named TWECAN Dalson to calculate the total and average quantity of seeds used over four agricultural seasons in Uganda. The program interface includes labels, text boxes, buttons, and group boxes to collect input on the quantity of seeds used each season and number of agricultural seasons. The code calculates the total annual seeds quantity by summing the inputs and calculates the average annual seeds quantity by dividing the total by the number of seasons. Running the program demonstrates it displaying the results.

Uploaded by

Karen Johnson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views6 pages

Modulus: Methods of Programming

This document describes a Visual Basic program designed by a student named TWECAN Dalson to calculate the total and average quantity of seeds used over four agricultural seasons in Uganda. The program interface includes labels, text boxes, buttons, and group boxes to collect input on the quantity of seeds used each season and number of agricultural seasons. The code calculates the total annual seeds quantity by summing the inputs and calculates the average annual seeds quantity by dividing the total by the number of seasons. Running the program demonstrates it displaying the results.

Uploaded by

Karen Johnson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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.)

In my project I used the following tools: Label, Button, Textbox, Checkbox, Groupbox.
a) PROPERTIES OF THE PROJECT

SN
1
2
3
4
5
6
7
8
9
10
11
b)

PROPERTY OBJECT
Text
Text
Text
Text
Text
Text
Text
Text
Text
Text
Text

SETTING

SEASON ONE
GroupBox4
January
Label5
234
TextBox4
Total and Average Quantity of Seeds used during Four Agricultural
Label1
Seasons
Results of Seeds Quantity
GroupBox1
Annual Seeds Quantity
TextBox1
Number of Agriculture Seasons
Label3
Average Annual Seeds Quantity
Label4
TextBox3
Buttoncheckstate
Submit
Quit
Button2

INTERFACE OF THE PROJECT


The following picture shows interface of Irrigation project throughout Agriculture year in
Uganda. As you can see

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.

c)

CODE

Public Class Form1


Private Sub Buttoncheckstate_Click(sender As [Link], e As [Link])
Handles [Link]
Dim a, b, c, d, q, f, g, h, i, j, k, l, o, P, AVG As Integer
a = [Link]
b = [Link]
c = [Link]
d = [Link]
q = [Link]
f = [Link]
g = [Link]
h = [Link]
i = [Link]
j = [Link]
k = [Link]
l = [Link]
P = [Link]
o = (a + b + c + d + q + f + g + h + i + j + k + l)
AVG = o / P
[Link] = o
[Link] = AVG
End Sub
Private Sub Button2_Click(sender As [Link], e As [Link]) Handles
[Link]
Close()
End Sub
End Class

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

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.

You might also like