Java Assignment - 1 July 2004

After running the Zoo program, and looking at the kangaroo populations predicted by the model implemented in the Kangaroo class, answer the following questions (there is no "right" answer):

  1. Looking at these numbers (showing the kangaroo population dwindling to nothing after a few years), what sorts of preliminary conclusions — about kangaroos, about our model, about our assumptions, about our program, etc. — might we reach?
  2. Without worrying about how we would write this in Java (i.e. simply give your speculations in English), how should we fix the fact that all of the first batch of kangaroos in our Zoo program start out at zero years of age?

Nick's Responses

  1. First off, we might be alarmed that the kangaroo population in the model is dying off. But given that kangaroo's have been around a long time, and are still going pretty strong, I would strongly suspect that the relationships or assumptions in our model are invalid. (Our models will virtually never match the real world completely — the question is, are they close enough to be of value? In this case, I'd have to say we still have some work to do.)
  2. There are many ways to approach this — most of which carry with them more assumptions about kangaroos, and/or the business of raising kangaroos. Most fundamentally, it seems clear that we won't start a theme park with a population made up of all newborn kangaroos. So, one of the first things we would probably do is modify our Kangaroo class, so that we have a way to create kangaroos of a specified age. Next, we would want to modify our Zoo program, so that when it creates kangaroos, it creates at least some who aren't newborns. Alongside all of this, we should do some more research, to see if there is a standard practice for establishing a kangaroo population in a new location: Are mostly younger kangaroos transplanted, or is there a wide range? Is it totally random (i.e. catch a bunch of kangaroos, and take 'em all, regardless of age)? Would such a transplanted herd include pregnant kangaroos and/or kangaroos with "joeys" still in the pouch?

    Having done the additional research mentioned above, we should modify our program so that we can specify the changed initial conditions (regarding the initial age distribution of the kangaroos).

    I have modified my own copy of the Kangaroo and Zoo classes, to address some of the above issues, and have posted these online. However, it not being practical at this moment for me to do the research on age distribution of transplanted kangaroo populations, I have simply included code in the Zoo class to create the initial population with randomly selected ages between 0 and 6 years.