7.4 Structure Chart Questions

1. Late for School

  1. Write out a list of 8 things that could make you late for school.
  2. Put them in categories. Give each category a name.
  3. Make a structure chart. The starting point is "Late Excuses". Add in the other two layers (categories, then individual excuses)

2.   Draw a structure chart for the process of making a pizza in your home.

  1. Start with: "Make pizza"
  2. Add in the overall categories of things you need to do.
  3. Put in the actual details of the categories. You should have about 6 or 7 of these
  4. You should have a minimum of 12 methods in total.

3. Classify each clue as "SC" (Structure Chart) or "FC" (Flow Chart).

  1. Shows all the methods in a program.
  2. Shows one method in detail.
  3. Shows boolean expressions.
  4. Shows flow of events.
  5. Lines must have arrows.
  6. Lines generally don't have arrows.
  7. Shows loops and ifs.
  8. Only has boxes and lines.
  9. Shows the hierarchy of methods in a program.
  10. Lots of different shapes to represent different things.
  11. Like a table of contents for the program.
  12. Easier to draw.

4. Draw a structure chart for the process of cleaning your locker. Put on about 10 methods.

5. Structure Charts are also used outside programming to show the hierarchy in businesses. Draw a structure chart for the school. Include the trustee, principal, vice-principals, department heads, teachers and students.

6. Draw a structure chart for this program. Start with the main mehtod:

public class x
{
   public static void main (String args [])
   {
   new x ();
   }
 public x ()
   {
   a ();
   b ();
   c ();
   }
 public void a ()
   {
   System.out.println ("Hi");
   }
 public void b ()
   {
   System.out.println ("Hi2");
   }
 public void c ()
   {
   System.out.println ("Hi3");
   }
}
 

7. Draw a structure chart for this program. Start with the main method:

public class x
{
   public static void main (String args [])
   {
   new x ();
   }
   public x ()
   {
   a ();
   b ();
   c ();
   }
   public void a ()
   {
   b ();
   }
   public void b ()
   {
   c ();
   e ();
   }
   public void c ()
   {
   System.out.println ("Hi");
   }
   public void d ()
   {
   a ();
   e ();
   }
   public void e ()
   {
   System.out.println ("Hi");
   }
   public void g ()
   {
   e ();
   e ();
   b ();
   }
}
 

8. Assume all void methods. Write a program for this structure chart.

                      |----- c
|---- a --|
main--- b --| |----- c
|
|---- d --|------f
|----- e