package topica.moduel;

import java.io.Serializable;
import java.util.Scanner;


public class CanBo extends NhanVien implements Serializable {


	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String hocvi;
	private int phucap, sotiet;

	static Scanner sc = new Scanner(System.in);

	public CanBo() {
		// TODO Auto-generated constructor stub
	}

	public CanBo(String hocvi, int phucap, int sotiet) {
		super();
		this.hocvi = hocvi;
		this.phucap = phucap;
		this.sotiet = sotiet;
	}

	public String getHocvi() {
		return hocvi;
	}

	public void setHocvi(String hocvi) {
		this.hocvi = hocvi;
	}

	public int getPhucap() {
		return phucap;
	}

	public void setPhucap(int phucap) {
		this.phucap = phucap;
	}

	public int getSotiet() {
		return sotiet;
	}

	public void setSotiet(int sotiet) {
		this.sotiet = sotiet;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return super.toString() + "Giảng viên - học vị :" + this.hocvi + "||" + "Số tiết : " + this.sotiet;
	}

	public void menu() {
		System.out.println("!-----------!");
		System.out.println("!1.Cử nhân--!");
		System.out.println("!2.Thạc sĩ--!");
		System.out.println("!3.Tiên sĩ--!");
		System.out.println("!-----------!");
	}


   @Override
	public void inputID() throws ExceptionCharacter {
		// TODO Auto-generated method stub
		super.inputID();
	}
	
	@Override
	public void inputName() {
		// TODO Auto-generated method stub
		super.inputName();
	}
	
	@Override
	public void inputAge() throws ExceptionValue {
		// TODO Auto-generated method stub
		super.inputAge();
	}
	
	
	
	public void inputInformation() {
		// TODO Auto-generated method stub
		
		menu();
		boolean flag = true;

		do {
			int choice;
			
			do {
				try {
					System.out.print("Nhập học vị : ");
					choice = Integer.parseInt(sc.nextLine());
					break;
					
				} catch (Exception e) {
					// TODO: handle exception
					e.printStackTrace();
				}
				
				
			} while (true);
			
			switch (choice) {

			case 1: {
				this.hocvi = "Cử nhân";
				this.phucap = 300;
				flag = false;
				break;

			}
			
			

			case 2: {
				this.hocvi = "Thạc sĩ";
				this.phucap = 500;
				flag = false;
				break;

			}
			
			

			case 3: {
				this.hocvi = "Tiến sĩ";
				this.phucap = 1000;
				flag = false;
				break;

			}
			
			

			default: {
				System.out.println("Nhập sai vui lòng nhập lại !");
			}
			
			
			}
			
		} while (flag);

		System.out.print("Nhập số tiết dạy : ");
		this.sotiet = Integer.parseInt(sc.nextLine());
		
		super.setLuong(0.8 * 730 + this.sotiet * 45 + this.phucap);

		

	}
	
	

}
