DESIGN AND IMPLEMENTATION OF DATABASE AND GRAPHIC USER INTERFACE

0
463

ABSTRACT

— An Application of Visual FoxPro6.0

Haoyu Qin

Master in Computer Science and Engineering, July, 2000

Directed by Dr. Kai-Hsiung Chang

PEANUT PLAN (PNTPLAN) is a farm planning system designed to assist peanut producers in farming and financial planning decisions by developing formal farming plans specific to individual farm operation. Basically PNT PLAN allows farmers to “build” farming plans on a farm-by-farm and field-by-field basis.

The problems of the earlier PNTPLAN are:

(1) It is based on the Corel Quattro Pro and the user interface is not friendly, especially for the farmers;

(2) It requires the pre-installation of Corel Quattro Pro, which is expensive for both software and hardware;

(3) The data of the farming plan is not organized systematically, especially for the accumulation of several years’ data.

Visual FoxPro is a Microsoft database development environment that simplifies data management. Visual Fox Pro makes it easy to organize data, define database rules,and build applications. We can quickly create forms, queries, and reports with the visual design tools and wizards. It is also possible to rapidly create full-featured applications by providing an integrated development environment with powerful object-oriented programming tools, client/server capabilities, and Active X support.

3

A full cycle of software development processes has been performed. A stand alone application with improved functionality for PNT PLAN has been developed using the Visual Fox Pro 6.0. Comparing to the original PNT PLAN, the user interface has been improved, the data management has also been enhanced with more flexibility and less cost.

4

CONTENTS

1. Introduction to PNTPLAN 6

1.1 General outlines of PNTPLAN 6

1.2 Major functions that PNTPLAN can perform 7

1.3 Detailed structures of PNTPLAN 7

1.4 Problems of PNTPLAN and the proposed solutions 10

2. Design of customer database and Graphical User Interface 12

2.1 Analysis of customer data 12

2.2 Design of customer database with Visual FoxPro 6.0 13

2.3 Analysis of customer background 14

2.4 Design of the Graphical User Interface 15

3. Implementation of the design with Visual FoxPro 6.0 17

3.1 Building and programming the database 17

3.2 Building the input and output forms for the database 28

3.3 Integrating the database and forms into application project 32

3.4 Building the distribution disks for the application 35

4. Demonstration of NewPeanutPlan 38

4.1 General outlook of NewPeanutPlan 38

4.2 Whole farm information 40

4.3 Data entry forms for peanut crop 42

4.4 Multiple-document interface (MDI) structure of NewPeanutPlan 44

5. Conclusions 46

References 47

Appendix — Setup Wizard Summary Report for 1.44 Megabyte Disks

5

LIST OF FIGURES

Figure 1. The main interface of PNTPLAN 6

Figure 2. The major function sheets of PNTPLAN 8

Figure 3. Microsoft Visual FoxPro 6.0 environment for Form Designer 29

Figure 4. Visual FoxPro 6.0 Form Control window 30

Figure 5. Visual FoxPro 6.0 object Property window 30

Figure 6. The finished equipment data entry form 31

Figure 7. Microsoft Visual FoxPro 6.0 Application Builder window 32

Figure 8. The Menu Designer window of Microsoft Visual FoxPro 6.0 34

Figure 9. The Microsoft Visual FoxPro 6.0 Build Options window 34

Figure 10. Setup Wizard Progress window for building distribution disks 36

Figure 11. The report for result of building distribution disks 36

Figure 12. The starting point of NewPeanutPlan 38

Figure 13. The main window of the NewPeanutPlan and its file open window 39

Figure 14. The child window Quota Information contained in the main window 40

Figure 15. The child window Whole Farm Information 41

Figure 16. The first data entry form for peanut crop 42

Figure 17. The second data entry form for peanut crop 43

Figure 18. The third data entry form for peanut crop 44

Figure 19. Multiple-document interface structure of NewPeanutPlan 45

6

1. Introduction

1.1 General outlines of PNTPLAN

PEANUT PLAN (PNTPLAN) (see Figure 1) is a whole farm planning system designed to assist peanut producers in farming and financial planning decisions by developing formal farming plans specific to individual farm operation[1, 2]. Basically PNTPLAN allows farmers to “build” farming plans individually on a farm-by-farm and field-by-field basis and generate a variety of reports.

Once the farming plan is ‘built’ into PNTPLAN, many situations can be addressed to analyze the direct impacts on the farm that the customer is working on.

7

1.2 Major functions that PNTPLAN can perform

The PNTPLAN is designed to help peanut producers evaluate and modify their farm operation plans. The whole idea is to help them minimize cost and maximize profit.

Basically it can perform the following functions:

(a) Evaluating which crop enterprises to plant for profit maximization,

(b) Analyzing the impacts of changes in crop prices on farm income, cash flow,break-even yields, optimal crop acreage, etceteras,

(c) Analyzing rents, either adding a potential rented farm or dropping an already rented farm,

(d) Analyzing equipment purchase decisions, that is the fixed cost can be estimated for an individual tractor (plow, etc.) to let a grower know what the per acre/per crop cost of each piece of equipment is.

The detailed output of PNTPLAN can also be used as a supplement to loan applications to lenders and help producers improve their financial position by providing a more formal farm plan[1, 2].

The benefit is that the information is specific to the individual producer operation and does not require a great deal of time to set up.

DESIGN AND IMPLEMENTATION OF DATABASE AND GRAPHIC USER INTERFACE