Đâu là đoạn mã để tạo hình tròn như hình minh hoạ

A. class MyFrame extends Frame
{
public MyFrame(String title)
{
super(title);
}
public void paint(Graphics g)
{
g.setColor(Color.BLUE);
g.drawOval(40, 40, 80, 80);
}
}
B. class MyFrame extends Frame
{
public void paint(Graphics g)
{
g.setColor(Color.BLUE);
g.fillOval(40, 40, 80, 80);
}
}
C. class MyFrame extends Frame
{
public MyFrame(String title)
{
super(title);
}
public void paint(Graphics g)
{
g.setColor(Color.BLUE);
g.fillOval(40, 40, 80, 80);
}
}
D. class MyFrame extends Frame
{
public MyFrame(String title)
{
super(title);
g.setColor(Color.BLUE);
g.fillOval(40, 40, 80, 80);
}
}
Cho lớp HangHoa được xây dựng như sau:
public class HangHoa{
private String tenHH;
private int soLuong;
private float donGia;
public String getTenHH() {
return tenHH;
}
public void setTenHH(String name) {
this.tenHH = name;
}
public int getSoLuong() {
return soLuong;
}
public void setSoLuong(int sl) {
this.soLuong = sl;
}
public float getDonGia() {
return donGia;
}
public void setDonGia(float dg) {
this.donGia = dg;
}
}
Đâu là đoạn mã để tạo đối tượng HangHoa với giá trị lấy từ các điều khiển trên giao diện như hình:

A. private HangHoa getHangHoa ( ){
HangHoa hh = new HangHoa();
hh.tenHH = txtTenHH.getText();
hh.soLuong = Integer.parseInt(txtSoLuong.getText());
hh.donGia = Float.parseFloat(txtDonGia.getText());
return hh;
}
B. private HangHoa getHangHoa ( ){
HangHoa hh = new HangHoa();
hh.tenHH = txtTenHH.getText();
hh.soLuong = txtSoLuong.getText();
hh.donGia = txtDonGia.getText();
return hh;
}
C. private void getHangHoa( HangHoa hh ){
hh.setTenHH(txtTenHH.getText());
hh.setSoLuong(Integer.parseInt(txtSoLuong.getText()));
hh.setDonGia(Float.parseFloat(txtDonGia.getText()));
}
D. private HangHoa getHangHoa ( ){
HangHoa hh = new HangHoa();
hh.setTenHH(txtTenHH.getText());
hh.setSoLuong(Integer.parseInt(txtSoLuong.getText()));
hh.setDonGia(Float.parseFloat(txtDonGia.getText()));
return hh;
}
Để thêm lần lượt 03 mục cho List như hình minh hoạ thì đoạn mã là gì?

A. colorList = new List(3, false);
colorList.add("Yellow");
colorList.add("Green");
colorList.add("Black");
B. colorList = new List(3, false);
colorList.add("Yellow");
colorList.add("Black");
colorList.add("Green");
C. colorList = new List(3, false);
colorList.add("Green");
colorList.add("Black");
colorList.add("Yellow");
D. colorList = new List(3, false); colorList.add("Black");
colorList.add("Yellow");
colorList.add("Green");
Đâu là đoạn mã xây dựng lớp GiaoVien theo sơ đồ sau:

A. class GiaoVien
{
int maNS, namSinh;
Strinh hoTen;
float luongThang;
void nhapGV( )
{
Scanner sc = new Scanner(System.in);
System.out.print(“Nhap Ma:”);
maNS = sc.nextInt( );
System.out.print(“Nhap Ho Ten:”);
hoTen = sc.nextLine( );
System.out.print(“Nhap Nam Sinh:”);
namSinh = sc.nextInt( );
System.out.print(“Nhap Luong:”);
luongThang = sc.nextFloat( );
}
void xuatGV( )
{
System.out.printf(“\n%7d”, maNS);
System.out.printf(“%15s”, hoTen);
System.out.printf(“%7d”, namSinh);
System.out.printf(“%7.1f”, luongThang);
}
}
B. class GiaoVien extend NhanSu
{
float luongThang;
void nhapGV( )
{
NhanSu.nhapNS();
Scanner sc = new Scanner(System.in);
System.out.print(“Nhap Luong:”);
luongThang = sc.nextFloat( );
}
void xuatGV( )
{
NhanSu.xuatNS();
System.out.printf(“%7.1f”, luongThang);
}
}
C. class GiaoVien
{
float luongThang;
void nhapGV( )
{
Scanner sc = new Scanner(System.in);
System.out.print(“Nhap Luong:”);
luongThang = sc.nextFloat( );
}
void xuatGV( )
{
System.out.printf(“%7.1f”, luongThang);
}
}
D. class GiaoVien extends NhanSu
{
float luongThang;
void nhapGV( )
{
super.nhapNS();
Scanner sc = new Scanner(System.in);
System.out.print(“Nhap Luong:”);
luongThang = sc.nextFloat( );
}
void xuatGV( )
{
super.xuatNS();
System.out.printf(“%7.1f”, luongThang);
}
}