The above example illustrated the use of "top down" design. We started with a specification and definition of the main procedure display_data, then defined the procedure used by it, display_room, then defined the lowest level procedures used by that one, i.e. area, perim, volume.
However, there are some things that were already defined as part of the Pop-11 language, in particular the print procedure "pr" and the arithmetic procedures for addition and multiplication: "+" and "*"
A design methodology that starts by defining the "low level" procedures then moves up towards more and more complex procedures using those already defined is called "bottom up design". Most real life software development uses a mixture of top down and bottom up design. Top down design is usually possible only when you start by having a very clear idea of the problem and how to solve it.
Whether you do your programming top down or bottom up, it is absolutely essential to be clear about the "ontology" of your problem. This includes the following topics, not all of which will be relevant to every problem:
What kinds of objects are there? What sorts of properties can the objects have? What sorts of relationships can the objects have? What sorts of events or processes can occur involving those objects? What sorts of problems can arise involving those objects? What algorithms, or procedures are required to solve those problems?Which of these would be relevant to the rooms example so far?