public class Row{

 //Fields 

   public int row_number; 
   public String derivation;
   public String explanation;
   public int word_number; 


 //Constructor

   public Row(int row_number, String derivation, String explanation, int word_number){
        
      this.row_number  = row_number;
      this.derivation  = derivation;
      this.explanation = explanation;
      this.word_number = word_number;      
 
   }


 //Methods 
   public String toString(){

          String step=new String(String.valueOf(row_number));
          //add the needed amount of blanks
          while(step.length()<4){
                step+=" ";
          }          

          String deriv=new String(" "+derivation);
          //add the needed amount of blanks
          while(deriv.length()<16){
                deriv+=" ";
          }
      
          String explan=new String(" "+explanation);
          //add the needed amount of blanks
          while(explan.length()<32){
                explan+=" ";
          }

          String position=new String("P:"+String.valueOf(word_number));       
      
          return step+deriv+explan+position;       

   }
}    