Advertisement
Guest User

ch

a guest
Dec 12th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ThiThu
  8. {
  9. class GVCH : Giangvien
  10. {
  11. public int phucap, luongcb,luong;
  12. public GVCH()
  13. {
  14. phucap = 0;
  15. luongcb = 0;
  16. }
  17. public GVCH(int magv, int dienthoai, string hoten, string diachi, int phucap, int luongcb, int luong):base(magv, dienthoai, hoten, diachi)
  18. {
  19. this.phucap = phucap;
  20. this.luongcb = luongcb;
  21. this.luong = luongcb + phucap;
  22.  
  23. }
  24. public override void Luong()
  25. {
  26. Console.WriteLine("Luong cua GVCH la: {0}",luong);
  27. Console.WriteLine("-----");
  28. }
  29. public override void Hienthi()
  30. {
  31. base.Hienthi();
  32. }
  33. public void Input()
  34. {
  35. Console.WriteLine("----------------------------");
  36. Console.Write("Nhap ma giao vien: ");
  37. magv = int.Parse(Console.ReadLine());
  38. Console.Write("Nhap ho ten giao vien: ");
  39. hoten = Console.ReadLine();
  40. Console.Write("Nhap dien thoai giao vien: ");
  41. dienthoai = Convert.ToInt32(Console.ReadLine());
  42. Console.Write("Nhap dia chi giao vien: ");
  43. diachi = Console.ReadLine();
  44. Console.Write("Nhap phu cap giao vien: ");
  45. phucap = Convert.ToInt32(Console.ReadLine());
  46. Console.Write("Nhap luong co ban giao vien: ");
  47. luongcb = Convert.ToInt32(Console.ReadLine());
  48. Console.WriteLine("----------------------------");
  49. luong = luongcb + phucap;
  50. }
  51. }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement