Assignment 8, due Mar 25

Part of the homework for CS:2820, Spring 2016
by Douglas W. Jones
THE UNIVERSITY OF IOWA Department of Computer Science

On every assignment, write your name legibly as it appears on your University ID card! Homework is due on paper at the start of lecture on the day indicated (MONDAY). Exceptions will be made only by advance arrangement (excepting "acts of God"). Late work must be turned in to the TA's mailbox (ask the CS receptionist in 14 MLH for help). Never push homework under someone's door!

  1. Background: Look at Machine Problem 4, and note the need to compute an interesting mathematical function involving exponentiation.

    a) What Java library class or package supports the the exponentiation operation this requires? (0.2 points)

    b) Is it a class or a package? (0.2 points)

    c) Do you have to import this class or package prior to using its members, or is the import implicit? (0.2 points)

    d) Is there an alternative class or package that can do the same thing? (0.2 points)

    e) Give the Java code for corresponding to the assignment statement in the machine problem assignment. You are free to use stupid variable names like t1 where the original code said t1. (Later, in your solution to the machine problem, you might want to re-think some of these names.) (0.2 points)

  2. Background Some authors of simulation code use events (or event service routines) as their primary coding tools. So, instead of calling a method to do something now, they schedule an event at the current time. In our neuron network simulator, this would lead to something like the following (we're ignoring secondary synapses here):

    a) Which of the actions listed above must involve scheduling new events and cannot be done by simple method calls. (0.5 points)

    b) Which of the above do not even necessarily involve different methods but could be folded together into the same method of the same object. (0.5 points)

  3. Background: If you wanted to extend the outline of the simulation program presented in problem 2 to include secondary synapses, you would have to make some changes in order to account for the fact that when a secondary synapse fires, the message is delivered to a primary synapse.

    a) Which bullet points from problem 2 would you need to change to account for the existence of secodary synapses? Give the necessary change(s). (0.5 points)

    b) What bullet point(s) would you need to add to account for the existence of secondary synapses? (0.5 points)