Câu hỏi 305010 - Kỹ thuật lập trình hướng đối tượng - IT07 Đoạn mã để xây dựng lớp HOCSINH theo sơ đồ: Chọn đáp án: public class HOCSINH{private String hoTen;private String queQuan;private int namSinh;private float dTB;public void nhap(){Scanner sc = new Scanner(System.in);System.out.print("\n Ho ten:");hoTen = sc.nextLine();System.out.print("Que quan:");queQuan = sc.nextLine();System.out.print("Nam sinh:");namSinh = sc.nextInt();System.out.print("Diem TB:");dTB = sc.nextFloat();}public void xuat(){System.out.print("\n Ho ten:" + hoTen);System.out.print("\n Que quan:" + queQuan);System.out.print("\n Nam Sinh:" + namSinh);System.out.print("\n DTB:"+dTB);}} public class HOCSINH extends NHANSU{private float dTB;;public HOCSINH( ){super( );dTB = 0;}public HOCSINH( String ht, int ns, String qq, float dtb){super(ht, ns, qq);dTB = dtb;}public void hienthi(){super.hienthi();System.out.print("\n DTB:"+dTB);}} public class HOCSINH{private float dTB;public void nhap(){Scanner sc = new Scanner(System.in);System.out.print("Diem TB:");dTB = sc.nextFloat();}public void xuat(){System.out.print("\n DTB:"+dTB);}} public class HOCSINH extends NHANSU{private float dTB;public void nhap(){Scanner sc = new Scanner(System.in);NHANSU.nhapNS();System.out.print("Diem TB:");dTB = sc.nextFloat();}public void xuat(){NHANSU.xuatNS();System.out.print("\n DTB:"+dTB);} Xem đáp án