Assignment 3

Designing Methods

Text as pdf or html

The program for Problem 3.2: Banking.java

  • The program that illustrates the design of the world: BlobWorldFun.java
  • Due Date: Tuesday February 2nd, 10:00 pm.



    Homework submissions instructions:


    Designing tests for inexact numbers

    Please, read the following page for explanation of the design of tests for inexact values:

    Comparing Inexact Values

    then consult the tester web page for concrete examples:

    Inexact Values Tests


    To generate random numbers,
      import java.util.Random;
      
    then define field:
      Random RAND = new Random();
      
    then define a method:
      // produce a random number in the range [0, 5)
      int randomNum(){
        return this.RAND.nextInt() % 5;
      }
      
    and use it when you need such number. Adjust this to fit your game design.