In order to complete Assignment
2
Task
a
, you
need to define the data in detail. You must define what data will be
input, stored and output, and decide what format this data will have.
You have already outlined the inputs, outputs and
stored data in your assignment 1. Now you must
·
Specify the inputs in detail and their format
·
Specify the outputs in detail and their format
·
Specify the stored data in detail and their format
Have a look at your documentation for Assignment
1
Task
g.
You should have listed the
inputs, outputs and stored data. i.e.
Inputs
:-
etc....
Outputs
:-
etc....
Stored Data
:-
etc....
So how are we going to be more detailed about all of this?
We have to specify the format
of the data - it's
data
type.
As an example, is the input for the length of
the rectangular lawn
going to be a number or character data?
What about the amount of lawn
seeds, will it be a whole number
or something else? And so on.
Datatypes
What kind of data can we have? We can have numerical
data types - whole numbers or numbers with decimal parts. We can
have character and string data types - like names or postcodes etc.
Let's give these data types the names that visual basic uses:-
Integer
- means a
whole number like 10, -2, 1000
Single
- means a
number with a decimal part like 0.3, -10.234 etc.
Character
- means
data like the keyboard characters you press. For example, a, b to z and
the digits
0, 1 ...9 on a keyboard are actually characters.
String
- means a
set of characters like "Fred", "SE206EE" etc.
So for each input, output and stored data, you should create
a table similar to the one below:-
Rectangular
Lawn Length (m) |
floating point number |
single |
rectLawnLength
|
The number must
be larger than 0. Max number of digits will be 4. So max number
will be 9999 |
A lawn length
measurement may have a decimal part. E.g. 4.3m. |
Rectangular
Lawn Width (m) |
floating point number |
single |
rectLawnWidth
|
The number must
be larger than 0. Max number of digits will be 4. So max number
will be 9999 |
A lawn width
measurement may have a decimal part. E.g. 3.3m. |
etc... |
|
|
|
|
|
Here is one for the output data.
The amount of
lawn seeds |
floating point number |
single |
amountLawnSeed
|
The number must
be larger than 0. Max number of digits will be 4. So max number
will be 9999 |
This data type is
likely to have a decimal part E.g. 300.7 grams |
The number of
bags of lawn seeds |
floating point number |
single |
numBagsLawnSeed
|
The number must
be larger than 0. Max number of digits will be 4. So max number
will be 9999 |
This data type
is likely to have a decimal part E.g. 3.5 bags |
etc... |
|
|
|
|
|
Here is one for the stored data.
The amount of
lawn seeds that cover 1 square meter |
Whole number |
integer |
lawnSeedCoverage
|
The number must
be larger than 0. Max number of digits will be 3, so max number
will be 999 |
This data type is
likely to be a whole number E.g. 30 grams |
The amount of
lawn seeds in a bag |
Whole number |
integer |
lawnSeedinBag
|
The number must
be larger than 0. Max number of digits will be 3, so max number
will be 999 |
This data type
is likely to be a whole number E.g. 1000 grams |
etc... |
|
|
|
|
|
Your Task
Now it's your turn to create your tables:-
Please ensure you write your name in the document header.
The structure of your document should be as follows:-
Assignment 2: Designing the Program
Task
a: Defining the data in detail
Here you should explain what your
input table is about
Insert your input table
Here you should explain what your
output table is about
Insert your output table
Here you should explain what your
stored data table is about
Insert your stored data table