I like to make sure you
understand what
Physical Data DEPENDENCE is
before we move on to solve this problem.
Physical Data DEPENDENCY is
caused
by the
fact that:
the
structure (format) of the data
is
embedded inside
the computer program itself.
In other words:
The
program
is
tightly coupled
to
the format of the
data
Example: look
inside the file access program, you see this definition
of the format of the data:
class StudentRecord
{
String ID;
String name;
String level;
}
The program has statements that are AWARE of the structure:
x.ID = myFile.ReadString(10);
x.name = myFile.ReadString(30);
x.level = myFile.ReadString(4);
The fact that the
program contains
statements that
mentions
the
field names
of a structure, is the
fact that the
program is
tightly coupled to the
structure
of the data !!!!!
Because of this coupling,
the program can
only
operate
of data files of
that specific data format !!!