1 package JSci.chemistry; 2 3 9 public class Element extends Object implements java.io.Serializable { 10 private String name; 11 private String symbol; 12 private int atomicNumber; 13 private int massNumber; 14 private double electronegativity; 15 private double covalentRadius; 16 private double atomicRadius; 17 private double meltingPoint; 18 private double boilingPoint; 19 private double density; 20 private double specificHeat; 21 private double electricalConductivity; 22 private double thermalConductivity; 23 28 public Element(String title,String label) { 29 name=title; 30 symbol=label; 31 } 32 35 public String getName() { 36 return name; 37 } 38 41 public int getAtomicNumber() { 42 return atomicNumber; 43 } 44 protected void setAtomicNumber(int z) { 45 atomicNumber=z; 46 } 47 50 public int getMassNumber() { 51 return massNumber; 52 } 53 protected void setMassNumber(int m) { 54 massNumber=m; 55 } 56 59 public double getElectronegativity() { 60 return electronegativity; 61 } 62 protected void setElectronegativity(double en) { 63 electronegativity=en; 64 } 65 68 public double getCovalentRadius() { 69 return covalentRadius; 70 } 71 protected void setCovalentRadius(double covRadius) { 72 covalentRadius=covRadius; 73 } 74 77 public double getAtomicRadius() { 78 return atomicRadius; 79 } 80 protected void setAtomicRadius(double atomRadius) { 81 atomicRadius=atomRadius; 82 } 83 86 public double getMeltingPoint() { 87 return meltingPoint; 88 } 89 protected void setMeltingPoint(double melt) { 90 meltingPoint=melt; 91 } 92 95 public double getBoilingPoint() { 96 return boilingPoint; 97 } 98 protected void setBoilingPoint(double boil) { 99 boilingPoint=boil; 100 } 101 104 public double getDensity() { 105 return density; 106 } 107 protected void setDensity(double rho) { 108 density=rho; 109 } 110 113 public double getSpecificHeat() { 114 return specificHeat; 115 } 116 protected void setSpecificHeat(double heat) { 117 specificHeat=heat; 118 } 119 122 public double getElectricalConductivity() { 123 return electricalConductivity; 124 } 125 protected void setElectricalConductivity(double elect) { 126 electricalConductivity=elect; 127 } 128 131 public double getThermalConductivity() { 132 return thermalConductivity; 133 } 134 protected void setThermalConductivity(double therm) { 135 thermalConductivity=therm; 136 } 137 141 public boolean equals(Object e) { 142 return (e!=null) && (e instanceof Element) && 143 (atomicNumber==((Element)e).atomicNumber) && 144 (massNumber==((Element)e).massNumber); 145 } 146 public int hashCode() { 147 return 37*(37*(37*17+atomicNumber)+massNumber); 148 } 149 152 public String toString() { 153 return symbol; 154 } 155 } 156 157 | Popular Tags |