public HarddriveStorage(String name,double capacity) throws ParameterException {
  if (name == null || name.length() == 0) {
    throw new ParameterException("HarddriveStorage(): Error - invalid storage name.");
  }
  if (capacity <= 0) {
    throw new ParameterException("HarddriveStorage(): Error - capacity <= 0.");
  }
  this.name=name;
  this.capacity=capacity;
  init();
}

public HarddriveStorage ( String name , double capacity ) throws ParameterException { if ( name == null || name . length ( ) == 0 ) { throw new ParameterException ( "HarddriveStorage(): Error - invalid storage name." ) ; } if ( capacity <= 0 ) { throw new ParameterException ( "HarddriveStorage(): Error - capacity <= 0." ) ; } this . name = name ; this . capacity = capacity ; init ( ) ; }
creates a new hard drive storage with a given name and capacity .
