Software Development

  Assignment 1 Guide

Investigation Phase - Input Form Design

Introduction

Inputs needed by your program

Task D: Draw a draft input form

Carry out the Task


Introduction

Objectives

This guide  will help you to: -   

·   Complete part of assignment 1 - task d - Input Form Design

You should have a copy of  following two assignment documents.

Assignment Scenario

Assignment 1: Investigating the problem


Inputs needed by your program

In order to complete Assignment 1 Task d, you need to draw draft input and output forms.  This involves drawing a picture of how you think the user interface will look. These notes help you design an input form for your program

Your Seed Program:  We know that the inputs will be things like the number of standard lawn or hay meadow shapes. What other inputs are needed? You will need to design an input form so that a user of your program can input the necessary information into your program.

When you design the output form you will have to consider what will the outputs be?  So to specify the user interface you will need to have an idea of both the inputs and outputs of your seed program.

~~ Inputs ~~

The inputs of your program will be things your program needs to carry out the calculations and produce the answers (outputs)-

  • amount of seeds in grams

  • number of bags of seed

Before getting to the answers, your program will need to know

  1. If there are any lawns and which shape lawn - rectangle or circle

  2. If there are any fields and which shape field - L shape or circular with a pond

  3. how many lawns

  4. how many fields

  5. the dimensions of any lawns

  6. the dimensions of any fields

  7. the number of grams of lawn seed needed to cover one square meter

  8. the number of grams of hay meadow seed needed to cover one square meter

  9. the number of grams in a bag of lawn seed

  10. the number of grams in a bag of hay meadow seed

Then it can calculate the lawn areas and field areas and figure out the amount of seeds and number of bags required for each area.

How can the program know things like "If there are any lawns and which shape lawn - rectangle or circle" and other things in the list above. The user needs to tell the program those things. This is where you need to design your user interface so that it is possible for the user to tell the program these things. Altogether, the user will need to give the program information on...

  1. If there are any lawns and which shape lawn - rectangle or circle

  2. If there are any fields and which shape field - L shape or circular with a pond

  3. how many lawns

  4. how many fields

  5. the dimensions of any lawns

  6. the dimensions of any fields

~~Activity~~

Activity A

What about the rest of the items in the original list.  Why doesn't the user need to tell the program the other things such as ...

  1. the number of grams of lawn seed needed to cover one square meter

  2. the number of grams of hay meadow seed needed to cover one square meter

  3. the number of grams in a bag of lawn seed

  4. the number of grams in a bag of hay meadow seed

Do you think the number of grams of seed needed to cover one square meter will change every time a user runs your program?

Do you think a user would prefer it if your program could store values that rarely change, so that value does not have to be typed in.

Perhaps your program could store the values such as number of grams of seed needed to cover one square meter and the number of grams in a bag for each seed type. Then the user wouldn't have to keep typing these values in every time they use your program.

What if the values change say a year after you finish the program.  Say the manufacturer starts producing lawn seeds in bigger bags.  How could you ensure your program is flexible enough to cope with this?

Now that you have a list of inputs to your program - items 1 to 6 above - you need to draw an input form that will allow the user to enter the information specified in the list.


Task D: Draw a Draft Input Form

So, how do you draw an input form? The inputs of your program will be things your program needs to carry out the calculations.

For each item in the list the user must...

  1. tell the program if there are any lawns and which shape lawn - rectangle or circle

  2. tell the program if there are any fields and which shape field - L shape or circular with a pond

  3. specify how many lawns

  4. specify how many fields

  5. specify the dimensions of any lawns

  6. specify the dimensions of any fields

...the program will need something that allows a user to input that information.  It is now time to design an input form that allows a user to input the appropriate information.

~~ Sketching an Input Form ~~

Lets investigate which input controls could be used for each number above.

Input controls are...

Icon Control Name What it looks like on the form  What it is for

TextBox Meant for user input. The user can type information into a text box
CheckBox Used for selecting or deselecting some feature of the program.
ComboBox Displays a list of items in a drop-down list and the user selects one.
ListBox Displays a list of items and the user can select one.
OptionButton Option buttons are usually grouped together and the user chooses one.

How could we accomplish the first two parts of the list above...

  1. tell the program if there are any lawns and which shape lawn - rectangle or circle

  2. tell the program if there are any fields and which shape field - L shape or circular with a pond

Looking at the list of input controls above, I am going to try using checkboxes on the form.

~~Activity~~

Activity B

Here is one way a user could specify which lawn and field shapes they want.

Seed Calculating Program

Select field and lawns shapes

Rectangular Lawn    Circular Lawn

L-Shape Field          Circular Field with Round Pond
   

  • Play with the form above till you are happy with using checkboxes
       
  • Using paper and pencil, draw a quick sketch of your input form.  You can use checkboxes like above but you could make it even better by including a picture box next to each check, showing the shape of the lawn or field.

How could we accomplish the next two parts of the list above...

  1. specify how many lawns

  2. specify how many fields

There are a few possibilities here.  I could use text boxes to allow the user to type in the number of lawns and/or fields.  Another way would be to use a drop-down list filled with numbers. 

~~Activity~~

Activity C

Here is one way a user could specify the number of lawn and field shapes they want, using textboxes.

Seed Calculating Program

Select field and lawns shapes

Rectangular Lawn       Number

Circular Lawn             Number

L Shape Field             Number        

Circular Field with Round Pond         Number
   

Try playing with the form above.  Notice that if a user leaves a textbox empty, my program assumes this means the same as 0.  However, have you also noticed that you can enter silly characters into the textboxes instead of numbers.  Try entering something like '4abc' into one of the textboxes.  My program accepts that.  To check a user has entered a valid number I would have to write extra code.  This is one of the disadvantages of textboxes, you have to write extra validation code to make sure the user does not enter something silly.

Lets try a different approach, using drop-down lists to get the number of each shape.

~~Activity~~

Activity D

Here is one way a user could specify the number of lawn and field shapes they want, using combo boxes (drop-down lists).

Seed Calculating Program

Select field and lawns shapes

Rectangular Lawn       Number

Circular Lawn             Number

L Shape Field             Number

Circular Field with Round Pond         Number
   

  • Try playing with the form above.  Notice that in this case, the possible numbers of each shape are listed inside the combo boxes.  Therefore, unlike using textboxes, I do not have to add extra code to check if a user has entered something silly. I do have to make sure I put enough numbers in the list though.  What if a user wanted to specify 6 rectangular lawn shapes?  My numbers stop at 5.
       

  • Using paper and pencil, draw a quick new sketch of your input form using textboxes or combo boxes to allow the user to specify the number of each shape. 

Now for the last two items in the list.  How could we allow the user to input the following...

  1. specify the dimensions of any lawns

  2. specify the dimensions of any fields

I think the only real way to accomplish this is to provide textboxes for the user to type in the dimensions of a shape.

~~Activity~~

Activity E

Here is one way a user could specify the dimensions of a rectangular lawn shape using text boxes.

Seed Calculating Program

Input Form

Rectangular Lawn       Number

length (m)           width (m)   

  • Try playing with the form above.  I have only considered the rectangular lawn shape.  You have to consider how to deal with the other shapes. Notice how this time I have added code to make sure the user enters a valid number in each textbox.
       

  • Using paper and pencil, draw a quick new sketch of your input form using textboxes to allow the user to input shape dimensions.
     

  • There is one problem with this design. What if a user has two rectangular lawns and they have different lengths and widths.  My program is not flexible enough to allow this. Do you think it is wise to allow a user to be able to select more than one of the same shape? Perhaps you should restrict your design so the user can only choose one of each shape.  However, if you can think of a good design which allows the user to select more than one of the same shape and allow different dimensions that would be good.


Carry out the Task

After carrying out all the activities you should have various ideas on how you can design your input form. Using a word processor, draw a sketch of your input form.  You will need to draw all the controls you think will be needed.  Don't forget to include labels.  Labels tell the user what they have to do. 

Write your name at the top of your document header. The structure of your document should be as follows:-

 Assignment 1: Investigating the Problem:

      Task d: Draft Input Form

Your draft input form drawing should go here.

Underneath you should include annotation, explaining what your form does and how it will work.
  


Have you finished all the tasks and handed them in? 
If so - well done.

 

 

   

  Unit Information

Assessment

Syllabus

Scheme of Work

Notes &Tutorials

Assignments

Quizzes

Books & Things

Links