fork download
  1. package topica.moduel;
  2.  
  3. import java.io.Serializable;
  4. import java.util.Scanner;
  5.  
  6.  
  7. public class CanBo extends NhanVien implements Serializable {
  8.  
  9.  
  10. /**
  11. *
  12. */
  13. private static final long serialVersionUID = 1L;
  14. private String hocvi;
  15. private int phucap, sotiet;
  16.  
  17. static Scanner sc = new Scanner(System.in);
  18.  
  19. public CanBo() {
  20. // TODO Auto-generated constructor stub
  21. }
  22.  
  23. public CanBo(String hocvi, int phucap, int sotiet) {
  24. super();
  25. this.hocvi = hocvi;
  26. this.phucap = phucap;
  27. this.sotiet = sotiet;
  28. }
  29.  
  30. public String getHocvi() {
  31. return hocvi;
  32. }
  33.  
  34. public void setHocvi(String hocvi) {
  35. this.hocvi = hocvi;
  36. }
  37.  
  38. public int getPhucap() {
  39. return phucap;
  40. }
  41.  
  42. public void setPhucap(int phucap) {
  43. this.phucap = phucap;
  44. }
  45.  
  46. public int getSotiet() {
  47. return sotiet;
  48. }
  49.  
  50. public void setSotiet(int sotiet) {
  51. this.sotiet = sotiet;
  52. }
  53.  
  54. @Override
  55. public String toString() {
  56. // TODO Auto-generated method stub
  57. return super.toString() + "Giảng viên - học vị :" + this.hocvi + "||" + "Số tiết : " + this.sotiet;
  58. }
  59.  
  60. public void menu() {
  61. System.out.println("!-----------!");
  62. System.out.println("!1.Cử nhân--!");
  63. System.out.println("!2.Thạc sĩ--!");
  64. System.out.println("!3.Tiên sĩ--!");
  65. System.out.println("!-----------!");
  66. }
  67.  
  68.  
  69. @Override
  70. public void inputID() throws ExceptionCharacter {
  71. // TODO Auto-generated method stub
  72. super.inputID();
  73. }
  74.  
  75. @Override
  76. public void inputName() {
  77. // TODO Auto-generated method stub
  78. super.inputName();
  79. }
  80.  
  81. @Override
  82. public void inputAge() throws ExceptionValue {
  83. // TODO Auto-generated method stub
  84. super.inputAge();
  85. }
  86.  
  87.  
  88.  
  89. public void inputInformation() {
  90. // TODO Auto-generated method stub
  91.  
  92. menu();
  93. boolean flag = true;
  94.  
  95. do {
  96. int choice;
  97.  
  98. do {
  99. try {
  100. System.out.print("Nhập học vị : ");
  101. choice = Integer.parseInt(sc.nextLine());
  102. break;
  103.  
  104. } catch (Exception e) {
  105. // TODO: handle exception
  106. e.printStackTrace();
  107. }
  108.  
  109.  
  110. } while (true);
  111.  
  112. switch (choice) {
  113.  
  114. case 1: {
  115. this.hocvi = "Cử nhân";
  116. this.phucap = 300;
  117. flag = false;
  118. break;
  119.  
  120. }
  121.  
  122.  
  123.  
  124. case 2: {
  125. this.hocvi = "Thạc sĩ";
  126. this.phucap = 500;
  127. flag = false;
  128. break;
  129.  
  130. }
  131.  
  132.  
  133.  
  134. case 3: {
  135. this.hocvi = "Tiến sĩ";
  136. this.phucap = 1000;
  137. flag = false;
  138. break;
  139.  
  140. }
  141.  
  142.  
  143.  
  144. default: {
  145. System.out.println("Nhập sai vui lòng nhập lại !");
  146. }
  147.  
  148.  
  149. }
  150.  
  151. } while (flag);
  152.  
  153. System.out.print("Nhập số tiết dạy : ");
  154. this.sotiet = Integer.parseInt(sc.nextLine());
  155.  
  156. super.setLuong(0.8 * 730 + this.sotiet * 45 + this.phucap);
  157.  
  158.  
  159.  
  160. }
  161.  
  162.  
  163.  
  164. }
  165.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:7: error: class CanBo is public, should be declared in a file named CanBo.java
public class CanBo extends NhanVien implements Serializable {
       ^
Main.java:7: error: cannot find symbol
public class CanBo extends NhanVien implements Serializable {
                           ^
  symbol: class NhanVien
Main.java:70: error: cannot find symbol
	public void inputID() throws ExceptionCharacter {
	                             ^
  symbol:   class ExceptionCharacter
  location: class CanBo
Main.java:82: error: cannot find symbol
	public void inputAge() throws ExceptionValue {
	                              ^
  symbol:   class ExceptionValue
  location: class CanBo
Main.java:57: error: cannot find symbol
		return super.toString() + "Gi?ng vi?n - h?c v? :" + this.hocvi + "||" + "S? ti?t : " + this.sotiet;
		       ^
  symbol:   variable super
  location: class CanBo
Main.java:69: error: method does not override or implement a method from a supertype
   @Override
   ^
Main.java:72: error: cannot find symbol
		super.inputID();
		^
  symbol:   variable super
  location: class CanBo
Main.java:75: error: method does not override or implement a method from a supertype
	@Override
	^
Main.java:78: error: cannot find symbol
		super.inputName();
		^
  symbol:   variable super
  location: class CanBo
Main.java:81: error: method does not override or implement a method from a supertype
	@Override
	^
Main.java:84: error: cannot find symbol
		super.inputAge();
		^
  symbol:   variable super
  location: class CanBo
Main.java:156: error: cannot find symbol
		super.setLuong(0.8 * 730 + this.sotiet * 45 + this.phucap);
		^
  symbol:   variable super
  location: class CanBo
12 errors
stdout
Standard output is empty