bebesurf

Cell.class

May 27th, 2019
739
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | None | 0 0
  1. class Cell {
  2.    
  3.     private int number;
  4.     private char type;
  5.  
  6.     public Cell(int number, char type){
  7.         this.number = number;
  8.         this.type = type;
  9.     }
  10.  
  11.     public Cell(char type){
  12.         this.number = 0;
  13.         this.type = type;
  14.     }
  15.  
  16.     public void setNumber(int number){
  17.         this.number = number;
  18.     }
  19.  
  20.     public int getNumber(){
  21.         return this.number;
  22.     }
  23.  
  24.     public void setType(char type){
  25.         this.type = type;
  26.     }
  27.  
  28.     public int getType(){
  29.         return this.type;
  30.     }
  31.  
  32.     public String toString(){
  33.         return "" + this.type;
  34.     }
  35.  
  36. }
Add Comment
Please, Sign In to add comment