From MSchwarz, 2 Weeks ago, written in Java.
Embed
  1.  
  2. /**
  3.  *
  4.  * This is a class that tests the BBall class constructors and methods
  5.  *
  6.  */
  7. public class BBallTest
  8. {
  9.    
  10.     public static void main(String [] args)
  11.     {
  12.     BBall s2 = new BBall();//this calls the constructor
  13.     s2.setName("Max Schwarz");
  14.     System.out.println(s2);
  15.     s2.setpointsPer(16);
  16.     System.out.println(s2);
  17.     s2.setreboundsPer(8);
  18.     System.out.println(s2);
  19.     s2.setassistsPer(8);
  20.     System.out.println(s2);
  21.     s2.setPosition("Small Forward");
  22.     System.out.println(s2.Allstar());
  23.     System.out.println(s2);
  24.    
  25.     BBall s3 = new BBall();
  26.     System.out.println(s3.getName());
  27.     System.out.println(s3);
  28.     System.out.println(s3.getpointsPer());
  29.     System.out.println(s3);
  30.     System.out.println(s3.getreboundsPer());
  31.     System.out.println(s3);
  32.     System.out.println(s3.getassistsPer());
  33.     System.out.println(s3);
  34.     System.out.println(s3.getPosition());
  35.     System.out.println(s3);
  36.     System.out.println(s3.Allstar());
  37.     System.out.println(s3);
  38.     }
  39.    
  40. }
  41.