-
02-28-2014, 07:00 AM #31Junior Member
- Ngày tham gia
- Apr 2016
- Bài viết
- 0
sinhvien
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>spoiler (move your mouse to the spoiler area to reveal the content)</noscript>
show spoiler
hide spoiler
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã:public class sinhvien { private string hoten, lophoc; private float diemtoan, diemly, diemhoa; public void sethoten(string hoten) { this.hoten = hoten; } public void setlophoc(string lophoc) { this.lophoc = lophoc; } public void setdiemtoan(float diemtoan) { this.diemtoan = diemtoan; } public void setdiemly(float diemly) { this.diemly = diemly; } public void setdiemhoa(float diemhoa) { this.diemhoa = diemhoa; } public string gethoten() { return hoten; } public string getlophoc() { return lophoc; } public float getdiemtoan() { return diemtoan; } public float getdiemly() { return diemly; } public float getdiemhoa() { return diemhoa; } public float diemtrungbinh() { return (diemtoan + diemly + diemhoa) / 3; } public string xeploai() { if (diemtrungbinh() >= 8) { return "gioi"; } else if (diemtrungbinh() >= 6.5) { return "kha"; } else if (diemtrungbinh() >= 5) { return "trung binh"; } else if (diemtrungbinh() >= 3.5) { return "yeu"; } else { return "kem"; } } }
</div>
</div>
giangvien
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>spoiler (move your mouse to the spoiler area to reveal the content)</noscript>
show spoiler
hide spoiler
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã:public class giangvien { private string hoten, lopday; private int namsinh,luong; public void sethoten(string hoten) { this.hoten = hoten; } public void setlopday(string lopday) { this.lopday = lopday; } public void setnamsinh(int namsinh) { this.namsinh = namsinh; } public void setluong(int luong) { this.luong = luong; } public string gethoten() { return hoten; } public string getlopday() { return lopday; } public int getnamsinh() { return namsinh; } public int getluong() { return luong; } }
</div>
</div>
nhap
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>spoiler (move your mouse to the spoiler area to reveal the content)</noscript>
show spoiler
hide spoiler
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã:import java.util.scanner; public class input { public string nhap1() { scanner input = new scanner(system.in); return input.nextline(); } public float nhapdiem() { scanner input = new scanner(system.in); boolean check = true; float n = 0; while (check) { try { n = input.nextfloat(); if (n >= 0 && n <= 10) { check = false; } else { system.out.println("diem chi co gia tri so tu 0-10, nhap lai!"); continue; } } catch (exception e) { system.out.println("chi duoc nhap so, nhap lai!"); input.nextline(); } } return n; } public int nhapso() { int n = 0; scanner input = new scanner(system.in); boolean check = true; while (check) { try { n = input.nextint(); if (n > 0) { check = false; } else { system.out.println("chi duoc nhap so >0, nhap lai!"); continue; } } catch (exception e) { system.out.println("chi duoc nhap so, nhap lai"); input.nextline(); } } return n; } }
</div>
</div>
main
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>spoiler (move your mouse to the spoiler area to reveal the content)</noscript>
show spoiler
hide spoiler
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>public class main {
public static void main(string[] args) {
//tao doi tuong sinh vien, nhap thuoc tinh
system.out.println("sinh vien");
sinhvien a= new sinhvien();
system.out.print("nhap ho ten hoc sinh a: ");
a.sethoten(new input().nhap1());
system.out.print("nhap lop hoc: ");
a.setlophoc(new input().nhap1());
system.out.println("nhap diem toan: ");
a.setdiemtoan(new input().nhapdiem());
system.out.println("nhap diem ly: ");
a.setdiemly(new input().nhapdiem());
system.out.println("nhap diem hoa: ");
a.setdiemhoa(new input().nhapdiem());
system.out.println();
//in cac thuoc tinh cua doi tuong sinh vien
system.out.println("ten sinh vien: "+a.gethoten());
system.out.println("lop hoc: "+a.getlophoc());
system.out.println("diem toan: "+a.getdiemtoan());
system.out.println("diem ly: "+a.getdiemly());
system.out.println("diem hoa: "+a.getdiemhoa());
system.out.println("diem trung bin : "+a.diemtrungbinh());
system.out.println("xep loai: "+a.xeploai());
system.out.println();
//tao doi tuong giang vien b, nhap cac thuoc tinh
system.out.println("giang vien");
giangvien b= new giangvien();
system.out.println("nhap ten: ");
b.sethoten(new input().nhap1());
system.out.println("lop day: ");
b.setlopday(new input().nhap1());
system.out.println("nam sinh: ");
b.setnamsinh(new input().nhapso());
system.out.println("luong: ");
b.setluong(new input().nhapso());
system.out.println();
//in cac thuoc tinh cua giao vien
system.out.println("ten giao vien: "+b.gethoten());
system.out.println("lop day: "+b.getlopday());
system.out.println("nam sinh: "+b.getnamsinh());
system.out.println("luong: "+b.getluong()+" $");
system.out.println();
//kiem tra xem giao vien co day sinh vien khong?
if(a.getlophoc().equals(b.getlopday())){
system.out.println("giao vien \""+b.gethoten()+"\" co day sinh vien \""+a.gethoten()+"\" o lop "+a.getlophoc());
}else{
system.out.println("giao vien \""+b.gethoten()+"\" khong co day sinh vien \""+a.gethoten()+"\"");
}
}
}
</blockquote></div>
</div>
</div>
-
03-02-2014, 07:00 AM #32Banned
- Ngày tham gia
- Feb 2015
- Bài viết
- 0
bai 1:
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>spoiler (move your mouse to the spoiler area to reveal the content)</noscript>
show spoiler
hide spoiler
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã nguồn PHP:[color=#000000]
package nhansu[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]util[/color][color=#007700].[/color][color=#0000bb]scanner[/color][color=#007700];class [/color][color=#0000bb]sinhvien[/color][color=#007700]{ private [/color][color=#0000bb]string hoten[/color][color=#007700]; private [/color][color=#0000bb]string lophoc[/color][color=#007700]; private [/color][color=#0000bb]float dtoan[/color][color=#007700]; private [/color][color=#0000bb]float dli[/color][color=#007700]; private [/color][color=#0000bb]float dhoa[/color][color=#007700]; public [/color][color=#0000bb]void sethoten[/color][color=#007700]([/color][color=#0000bb]string hoten[/color][color=#007700]){ [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]hoten[/color][color=#007700]=[/color][color=#0000bb]hoten[/color][color=#007700]; } public [/color][color=#0000bb]string gethoten[/color][color=#007700](){ return [/color][color=#0000bb]hoten[/color][color=#007700]; } public [/color][color=#0000bb]void setlophoc[/color][color=#007700]([/color][color=#0000bb]string lophoc[/color][color=#007700]){ [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]lophoc[/color][color=#007700]=[/color][color=#0000bb]lophoc[/color][color=#007700]; } public [/color][color=#0000bb]string getlophoc[/color][color=#007700](){ return [/color][color=#0000bb]lophoc[/color][color=#007700]; } public [/color][color=#0000bb]void setdtoan[/color][color=#007700]([/color][color=#0000bb]float dtoan[/color][color=#007700]){ [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dtoan[/color][color=#007700]=[/color][color=#0000bb]dtoan[/color][color=#007700]; } public [/color][color=#0000bb]float getdtoan[/color][color=#007700](){ return [/color][color=#0000bb]dtoan[/color][color=#007700]; } public [/color][color=#0000bb]void setdli[/color][color=#007700]([/color][color=#0000bb]float dli[/color][color=#007700]){ [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dli[/color][color=#007700]=[/color][color=#0000bb]dli[/color][color=#007700]; } public [/color][color=#0000bb]float getdli[/color][color=#007700](){ return [/color][color=#0000bb]dli[/color][color=#007700]; } public [/color][color=#0000bb]void setdhoa[/color][color=#007700]([/color][color=#0000bb]float dhoa[/color][color=#007700]){ [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dhoa[/color][color=#007700]=[/color][color=#0000bb]dhoa[/color][color=#007700]; } public [/color][color=#0000bb]float getdhoa[/color][color=#007700](){ return [/color][color=#0000bb]dhoa[/color][color=#007700]; } public [/color][color=#0000bb]float getdiemtrungbinh[/color][color=#007700]([/color][color=#0000bb]float x[/color][color=#007700],[/color][color=#0000bb]float y[/color][color=#007700],[/color][color=#0000bb]float z[/color][color=#007700]){ return (float)(([/color][color=#0000bb]x[/color][color=#007700]+[/color][color=#0000bb]y[/color][color=#007700]+[/color][color=#0000bb]z[/color][color=#007700])/[/color][color=#0000bb]3[/color][color=#007700]); }}class [/color][color=#0000bb]giangvien[/color][color=#007700]{ private [/color][color=#0000bb]string hoten[/color][color=#007700]; private [/color][color=#0000bb]string lopday[/color][color=#007700]; private [/color][color=#0000bb]int namsinh[/color][color=#007700]; private [/color][color=#0000bb]float luong[/color][color=#007700]; public [/color][color=#0000bb]void sethoten[/color][color=#007700]([/color][color=#0000bb]string hoten[/color][color=#007700]){ [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]hoten[/color][color=#007700]=[/color][color=#0000bb]hoten[/color][color=#007700]; } public [/color][color=#0000bb]string gethoten[/color][color=#007700](){ return [/color][color=#0000bb]hoten[/color][color=#007700]; } public [/color][color=#0000bb]void setlopday[/color][color=#007700]([/color][color=#0000bb]string lopday[/color][color=#007700]){ [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]lopday[/color][color=#007700]=[/color][color=#0000bb]lopday[/color][color=#007700]; } public [/color][color=#0000bb]string getlopday[/color][color=#007700](){ return [/color][color=#0000bb]lopday[/color][color=#007700]; } public [/color][color=#0000bb]void setnamsinh[/color][color=#007700]([/color][color=#0000bb]int namsinh[/color][color=#007700]){ [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]namsinh[/color][color=#007700]=[/color][color=#0000bb]namsinh[/color][color=#007700]; } public [/color][color=#0000bb]int getnamsinh[/color][color=#007700](){ return [/color][color=#0000bb]namsinh[/color][color=#007700]; } public [/color][color=#0000bb]void setluong[/color][color=#007700]([/color][color=#0000bb]float luong[/color][color=#007700]){ [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]luong[/color][color=#007700]=[/color][color=#0000bb]luong[/color][color=#007700]; } public [/color][color=#0000bb]float getluong[/color][color=#007700](){ return [/color][color=#0000bb]luong[/color][color=#007700]; }}public class [/color][color=#0000bb]quanlinhansu [/color][color=#007700]{ public static [/color][color=#0000bb]void main[/color][color=#007700]([/color][color=#0000bb]string[/color][color=#007700][][/color][color=#0000bb]args[/color][color=#007700]){ [/color][color=#0000bb]quanlinhansu c[/color][color=#007700]=new [/color][color=#0000bb]quanlinhansu[/color][color=#007700](); [/color][color=#0000bb]scanner input[/color][color=#007700]=new [/color][color=#0000bb]scanner[/color][color=#007700]([/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]in[/color][color=#007700]); [/color][color=#0000bb]sinhvien a[/color][color=#007700]=new [/color][color=#0000bb]sinhvien[/color][color=#007700](); [/color][color=#0000bb]giangvien b[/color][color=#007700]=new [/color][color=#0000bb]giangvien[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"+sinh vien:"[/color][color=#007700]); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]" ho ten:"[/color][color=#007700]); [/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]sethoten[/color][color=#007700]([/color][color=#0000bb]input[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700]()); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]" lop hoc:"[/color][color=#007700]); [/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]setlophoc[/color][color=#007700]([/color][color=#0000bb]input[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700]()); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]" diem toan:"[/color][color=#007700]); [/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]setdtoan[/color][color=#007700]([/color][color=#0000bb]input[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700]()); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]" diem li:"[/color][color=#007700]); [/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]setdli[/color][color=#007700]([/color][color=#0000bb]input[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700]()); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]" diem hoa:"[/color][color=#007700]); [/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]setdhoa[/color][color=#007700]([/color][color=#0000bb]input[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700]()); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"+giang vien"[/color][color=#007700]); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]" ho ten:"[/color][color=#007700]); [/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]sethoten[/color][color=#007700]([/color][color=#0000bb]input[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700]()); [/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]sethoten[/color][color=#007700]([/color][color=#0000bb]input[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700]()); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]" lop day:"[/color][color=#007700]); [/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]setlopday[/color][color=#007700]([/color][color=#0000bb]input[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700]()); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]" nam sinh:"[/color][color=#007700]); [/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]setnamsinh[/color][color=#007700]([/color][color=#0000bb]input[/color][color=#007700].[/color][color=#0000bb]nextint[/color][color=#007700]()); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]" luong:"[/color][color=#007700]); [/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]setluong[/color][color=#007700]([/color][color=#0000bb]input[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700]()); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"+diem trung binh cua "[/color][color=#007700]+[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]gethoten[/color][color=#007700]()+[/color][color=#dd0000]":"[/color][color=#007700]+[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdiemtrungbinh[/color][color=#007700]([/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdtoan[/color][color=#007700](),[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdli[/color][color=#007700](),[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdhoa[/color][color=#007700]())); if([/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdiemtrungbinh[/color][color=#007700]([/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdtoan[/color][color=#007700](),[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdli[/color][color=#007700](),[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdhoa[/color][color=#007700]())<[/color][color=#0000bb]5[/color][color=#007700]) [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"+hoc luc yeu"[/color][color=#007700]); if([/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdiemtrungbinh[/color][color=#007700]([/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdtoan[/color][color=#007700](),[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdli[/color][color=#007700](),[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdhoa[/color][color=#007700]())>=[/color][color=#0000bb]9[/color][color=#007700]) [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"+hoc luc gioi"[/color][color=#007700]); if([/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdiemtrungbinh[/color][color=#007700]([/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdtoan[/color][color=#007700](),[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdli[/color][color=#007700](),[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdhoa[/color][color=#007700]())>=[/color][color=#0000bb]5[/color][color=#007700]&[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdiemtrungbinh[/color][color=#007700]([/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdtoan[/color][color=#007700](),[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdli[/color][color=#007700](),[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdhoa[/color][color=#007700]())<[/color][color=#0000bb]7[/color][color=#007700]) [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"+hoc luc trung bing"[/color][color=#007700]); if([/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdiemtrungbinh[/color][color=#007700]([/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdtoan[/color][color=#007700](),[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdli[/color][color=#007700](),[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdhoa[/color][color=#007700]())>=[/color][color=#0000bb]7[/color][color=#007700]&[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdiemtrungbinh[/color][color=#007700]([/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdtoan[/color][color=#007700](),[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdli[/color][color=#007700](),[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getdhoa[/color][color=#007700]())<[/color][color=#0000bb]9[/color][color=#007700]) [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"+hoc sinh kha"[/color][color=#007700]); if(([/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getlophoc[/color][color=#007700]()).[/color][color=#0000bb]equals[/color][color=#007700]([/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]getlopday[/color][color=#007700]())) [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"+giang vien "[/color][color=#007700]+[/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]gethoten[/color][color=#007700]()+[/color][color=#dd0000]" day lop cua sinh vien "[/color][color=#007700]+[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]gethoten[/color][color=#007700]()); else [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"+giang vien "[/color][color=#007700]+[/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]gethoten[/color][color=#007700]()+[/color][color=#dd0000]" khong day lop cua sinh vien "[/color][color=#007700]+[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]gethoten[/color][color=#007700]()); }}[/color]
</div>
</div>
-
03-24-2014, 07:00 AM #33Junior Member
- Ngày tham gia
- Feb 2015
- Bài viết
- 0
mong mọi người chỉ bảo thêm !
class sinhvien:
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>spoiler (move your mouse to the spoiler area to reveal the content)</noscript>
show spoiler
hide spoiler
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã:public class sinhvien { private string name; private string classname; private float math; private float physical; private float chemistry; public string getname() { return name; } public void setname(string name) { this.name = name; } public string getclassname() { return classname; } public void setclassname(string classname) { this.classname = classname; } public float getmath() { return math; } public void setmath(float math) { this.math = math; } public float getphysical() { return physical; } public void setphysical(float physical) { this.physical = physical; } public float getchemistry() { return chemistry; } public void setchemistry(float chemistry) { this.chemistry = chemistry; } }
</div>
</div>
class giangvien:
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>spoiler (move your mouse to the spoiler area to reveal the content)</noscript>
show spoiler
hide spoiler
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã:public class giangvien { private string name; private string classteach; private int year; private int salary; public string getname() { return name; } public void setname(string name) { this.name = name; } public string getclassteach() { return classteach; } public void setclassteach(string classteach) { this.classteach = classteach; } public int getyear() { return year; } public void setyear(int year) { this.year = year; } public int getsalary() { return salary; } public void setsalary(int salary) { this.salary = salary; } }
</div>
</div>
class quanli ( main ) :
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>spoiler (move your mouse to the spoiler area to reveal the content)</noscript>
show spoiler
hide spoiler
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã:import java.util.scanner; import nhan.su.exam15.giangvien; import nhan.su.exam15.sinhvien; public class quanli { public static void main(string[] args){ scanner input = new scanner(system.in); sinhvien a = new sinhvien(); giangvien b = new giangvien(); system.out.println(" + input infomation student: "); system.out.print("\t name:"); a.setname(input.nextline()); system.out.print("\t class: "); a.setclassname(input.nextline()); system.out.print("\t math point: "); a.setmath(input.nextfloat()); system.out.print("\t physical point: "); a.setphysical(input.nextfloat()); system.out.print("\t chemistry point: "); a.setchemistry(input.nextfloat()); input.nextline(); system.out.println(" + input infomation lecturer: "); system.out.print("\t name lecturer: "); b.setname(input.nextline()); system.out.print("\t class teach: "); b.setclassteach(input.nextline()); system.out.print("\t year: "); b.setyear(input.nextint()); system.out.print("\t salary: "); b.setsalary(input.nextint()); system.out.println(" *** thông tin về sinh viên vừa nhập ***"); system.out.println("\t name: "+a.getname()+" \tclass: "+a.getclassname()+" \tmath point: "+a.getmath()+" \tphysical point: "+a.getphysical()+" \tchemistry point: "+a.getchemistry()+" \taverage point: "+((a.getmath()+a.getchemistry()+a.getphysical())/3)); system.out.println(" *** thông tin về giảng viên vừa nhập ***"); system.out.println("\t name lecturer: "+b.getname()+" \tclass teach: "+b.getclassteach()+" \tyear :"+b.getyear()+" \tsalary: "+b.getsalary()); if(b.getclassteach().equals(a.getclassname())){ system.out.println("giao vien "+b.getname()+" day sinh vien "+a.getname()); }else{ system.out.println("giao vien "+b.getname()+" không day sinh vien "+a.getname()); } } }
</div>
</div>
càng code lại càng thấy thích thích :v
-
04-12-2014, 07:00 AM #34Junior Member
- Ngày tham gia
- Jan 2015
- Bài viết
- 0
mọi người xem code và góp ý kiến để bài làm của mình được hoàn thiện với
class sinhvien
Mã:public class sinhvien { private string hoten, lop; private double diemtoan, diemly, diemhoa; public string gethoten() { return hoten; } public string getlop() { return lop; } public double getdiemtoan() { return diemtoan; } public double getdiemly() { return diemly; } public double getdiemhoa() { return diemhoa; } public void sethoten(string hoten) { this.hoten = hoten; } public void setlop(string lop) { this.lop = lop; } public void setdiemtoan(double diemtoan) { this.diemtoan = diemtoan; } public void setdiemly(double diemly) { this.diemly = diemly; } public void setdiemhoa(double diemhoa) { this.diemhoa = diemhoa; } public void nhapttsv(){ scanner input = new scanner(system.in); system.out.println("nhap vao ho ten:"); hoten = input.nextline(); system.out.println("nhap vao lop hoc:"); lop = input.nextline(); system.out.println("nhap vao diem toan:"); diemtoan = input.nextdouble(); system.out.println("nhap vao diem ly:"); diemly = input.nextdouble(); system.out.println("nhap vao diem hoa:"); diemhoa = input.nextdouble(); } public void xuatttsv(){ system.out.println(hoten); system.out.println(lop); system.out.println(diemtoan); system.out.println(diemly); system.out.println(diemhoa); } public double tinhdtb(){ double dtb =0.0; dtb = (diemtoan+diemly+diemhoa)/3; return dtb; } public string kt_hocluc(){ string hocluc= ""; if(tinhdtb()< 6){ hocluc = "hoc luc yeu"; }else{ if(tinhdtb()<7){ hocluc = "hoc luc trung binh"; }else{ if(tinhdtb()<8.5){ hocluc = "hoc luc kha"; }else{ hocluc = "hoc luc gioi"; } } } return hocluc; } }
Mã:public class giangvien { private string hoten, lopday; private int namsinh, luong; public string gethoten() { return hoten; } public string getlopday() { return lopday; } public int getnamsinh() { return namsinh; } public int getluong() { return luong; } public void sethoten(string hoten) { this.hoten = hoten; } public void setlopday(string lopday) { this.lopday = lopday; } public void setnamsinh(int namsinh) { this.namsinh = namsinh; } public void setluong(int luong) { this.luong = luong; } public void nhapttgv(){ scanner input = new scanner(system.in); system.out.println("nhap ho ten:"); hoten = input.nextline(); system.out.println("nhap lop day:"); lopday = input.nextline(); system.out.println("nhap nam sinh:"); namsinh = input.nextint(); system.out.println("nhap luong:"); luong = input.nextint(); } public void xuatttgv(){ system.out.println(hoten); system.out.println(lopday); system.out.println(namsinh); system.out.println(luong); } }
Mã:public class bai1 { public static void main(string[] args) { sinhvien a = new sinhvien(); giangvien b = new giangvien(); system.out.println("nhap thong tin cho sinh vien:"); a.nhapttsv(); system.out.println("nhap thong tin cho giang vien:"); b.nhapttgv(); system.out.println("diem trung binh cua sinh vien:"+a.tinhdtb()); system.out.println("hoc luc cua sinh vien:"+a.kt_hocluc()); if(a.getlop().equalsignorecase(b.getlopday())){ system.out.println("b day a"); }else{ system.out.println("b khong day a"); } } }
-
07-01-2014, 07:00 AM #35Junior Member
- Ngày tham gia
- Feb 2015
- Bài viết
- 0
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>spoiler (move your mouse to the spoiler area to reveal the content)</noscript>
show spoiler
hide spoiler
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã nguồn PHP:[color=#000000]
package nhansu[/color][color=#007700]; class [/color][color=#0000bb]student[/color][color=#007700]{private [/color][color=#0000bb]string hoten[/color][color=#007700];private [/color][color=#0000bb]string lop[/color][color=#007700];private [/color][color=#0000bb]float dtb[/color][color=#007700], [/color][color=#0000bb]toan[/color][color=#007700], [/color][color=#0000bb]ly[/color][color=#007700], [/color][color=#0000bb]hoa[/color][color=#007700]; public [/color][color=#0000bb]string gethoten[/color][color=#007700]() {return [/color][color=#0000bb]hoten[/color][color=#007700];}public [/color][color=#0000bb]void sethoten[/color][color=#007700]([/color][color=#0000bb]string hoten[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]hoten [/color][color=#007700]= [/color][color=#0000bb]hoten[/color][color=#007700];}public [/color][color=#0000bb]string getlop[/color][color=#007700]() {return [/color][color=#0000bb]lop[/color][color=#007700];}public [/color][color=#0000bb]void setlop[/color][color=#007700]([/color][color=#0000bb]string lop[/color][color=#007700]) {[/color][color=#0000bb]lop [/color][color=#007700]= [/color][color=#0000bb]lop[/color][color=#007700];}public [/color][color=#0000bb]float getdtb[/color][color=#007700]() {return [/color][color=#0000bb]dtb[/color][color=#007700];}public [/color][color=#0000bb]void setdtb[/color][color=#007700]([/color][color=#0000bb]float dtb[/color][color=#007700]) {[/color][color=#0000bb]dtb [/color][color=#007700]= [/color][color=#0000bb]dtb[/color][color=#007700];}public [/color][color=#0000bb]float gettoan[/color][color=#007700]() {return [/color][color=#0000bb]toan[/color][color=#007700];}public [/color][color=#0000bb]void settoan[/color][color=#007700]([/color][color=#0000bb]float toan[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]toan [/color][color=#007700]= [/color][color=#0000bb]toan[/color][color=#007700];}public [/color][color=#0000bb]float getly[/color][color=#007700]() {return [/color][color=#0000bb]ly[/color][color=#007700];}public [/color][color=#0000bb]void setly[/color][color=#007700]([/color][color=#0000bb]float ly[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]ly [/color][color=#007700]= [/color][color=#0000bb]ly[/color][color=#007700];}public [/color][color=#0000bb]float gethoa[/color][color=#007700]() {return [/color][color=#0000bb]hoa[/color][color=#007700];}public [/color][color=#0000bb]void sethoa[/color][color=#007700]([/color][color=#0000bb]float hoa[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]hoa [/color][color=#007700]= [/color][color=#0000bb]hoa[/color][color=#007700];}public [/color][color=#0000bb]void tinh[/color][color=#007700](){[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dtb [/color][color=#007700]= (float)([/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]hoa [/color][color=#007700]+ [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]ly [/color][color=#007700]+ [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]toan[/color][color=#007700])/[/color][color=#0000bb]3[/color][color=#007700];[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"dtb: "[/color][color=#007700]+[/color][color=#0000bb]dtb[/color][color=#007700]);}public [/color][color=#0000bb]void xeploai[/color][color=#007700](){if([/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dtb [/color][color=#007700]> [/color][color=#0000bb]8 [/color][color=#007700]&& [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dtb [/color][color=#007700]<=[/color][color=#0000bb]10[/color][color=#007700]){[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"giỏi"[/color][color=#007700]);}if([/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dtb [/color][color=#007700]> [/color][color=#0000bb]6.5 [/color][color=#007700]&& [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dtb [/color][color=#007700]<[/color][color=#0000bb]8[/color][color=#007700]){[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"khá"[/color][color=#007700]);}if([/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dtb [/color][color=#007700]> [/color][color=#0000bb]5 [/color][color=#007700]&& [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dtb [/color][color=#007700]<[/color][color=#0000bb]6.5[/color][color=#007700]){[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"trung bình"[/color][color=#007700]);}if([/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dtb [/color][color=#007700]< [/color][color=#0000bb]5 [/color][color=#007700]){[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"yếu"[/color][color=#007700]);}}public [/color][color=#0000bb]void showkqsv[/color][color=#007700](){[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"thong tin sinh vien"[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"ten sv: "[/color][color=#007700]+[/color][color=#0000bb]hoten[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"lop sv: "[/color][color=#007700]+[/color][color=#0000bb]lop[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"diem toan: "[/color][color=#007700]+[/color][color=#0000bb]toan[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"diem ly: "[/color][color=#007700]+[/color][color=#0000bb]ly[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"diem hoa: "[/color][color=#007700]+[/color][color=#0000bb]hoa[/color][color=#007700]); } } class [/color][color=#0000bb]teacher[/color][color=#007700]{private [/color][color=#0000bb]string hoten[/color][color=#007700];private [/color][color=#0000bb]string lopday[/color][color=#007700];public [/color][color=#0000bb]string gethoten[/color][color=#007700]() {return [/color][color=#0000bb]hoten[/color][color=#007700];}public [/color][color=#0000bb]void sethoten[/color][color=#007700]([/color][color=#0000bb]string hoten[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]hoten [/color][color=#007700]= [/color][color=#0000bb]hoten[/color][color=#007700];}public [/color][color=#0000bb]string getlopday[/color][color=#007700]() {return [/color][color=#0000bb]lopday[/color][color=#007700];}public [/color][color=#0000bb]void setlopday[/color][color=#007700]([/color][color=#0000bb]string lopday[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]lopday [/color][color=#007700]= [/color][color=#0000bb]lopday[/color][color=#007700];}public [/color][color=#0000bb]int getnamsinh[/color][color=#007700]() {return [/color][color=#0000bb]namsinh[/color][color=#007700];}public [/color][color=#0000bb]void setnamsinh[/color][color=#007700]([/color][color=#0000bb]int namsinh[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]namsinh [/color][color=#007700]= [/color][color=#0000bb]namsinh[/color][color=#007700];}public [/color][color=#0000bb]int getluong[/color][color=#007700]() {return [/color][color=#0000bb]luong[/color][color=#007700];}public [/color][color=#0000bb]void setluong[/color][color=#007700]([/color][color=#0000bb]int luong[/color][color=#007700]) {[/color][color=#0000bb]luong [/color][color=#007700]= [/color][color=#0000bb]luong[/color][color=#007700];}private [/color][color=#0000bb]int namsinh[/color][color=#007700];private [/color][color=#0000bb]int luong[/color][color=#007700]; public [/color][color=#0000bb]void showkqgv[/color][color=#007700](){[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"thong tin giang vien: "[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"ten gv: "[/color][color=#007700]+[/color][color=#0000bb]hoten[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"lop day: "[/color][color=#007700]+[/color][color=#0000bb]lopday[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"nam sinh: "[/color][color=#007700]+[/color][color=#0000bb]namsinh[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"luong: "[/color][color=#007700]+[/color][color=#0000bb]luong[/color][color=#007700]);}}public class [/color][color=#0000bb]preform [/color][color=#007700]{public static [/color][color=#0000bb]void main[/color][color=#007700]([/color][color=#0000bb]string[/color][color=#007700][] [/color][color=#0000bb]agrs[/color][color=#007700]){[/color][color=#0000bb]student a [/color][color=#007700]= new [/color][color=#0000bb]student[/color][color=#007700]();[/color][color=#0000bb]teacher b [/color][color=#007700]= new [/color][color=#0000bb]teacher[/color][color=#007700]();[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]sethoten[/color][color=#007700]([/color][color=#dd0000]"ly hoang tin"[/color][color=#007700]);[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]setlop[/color][color=#007700]([/color][color=#dd0000]"cntt3"[/color][color=#007700]);[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]sethoa[/color][color=#007700]([/color][color=#0000bb]7.8f[/color][color=#007700]);[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]setly[/color][color=#007700]([/color][color=#0000bb]8.5f[/color][color=#007700]);[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]settoan[/color][color=#007700]([/color][color=#0000bb]9.2f[/color][color=#007700]); [/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]sethoten[/color][color=#007700]([/color][color=#dd0000]"tran duc tam"[/color][color=#007700]);[/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]setlopday[/color][color=#007700]([/color][color=#dd0000]"cntt3"[/color][color=#007700]);[/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]setnamsinh[/color][color=#007700]([/color][color=#0000bb]1987[/color][color=#007700]);[/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]setluong[/color][color=#007700]([/color][color=#0000bb]7500000[/color][color=#007700]); [/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]showkqsv[/color][color=#007700]();[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]tinh[/color][color=#007700]();[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]xeploai[/color][color=#007700]();if([/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getlop[/color][color=#007700]()==[/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]getlopday[/color][color=#007700]()){ [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"giang vien co day"[/color][color=#007700]); } else{ [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"giang vien khong day"[/color][color=#007700]); } [/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]showkqgv[/color][color=#007700](); } }[/color]
</div>
</div>
-
07-07-2014, 07:00 AM #36Junior Member
- Ngày tham gia
- Oct 2014
- Bài viết
- 0
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>sinhvien (move your mouse to reveal the content)</noscript>
sinhvien (open)
sinhvien (close)
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã nguồn PHP:[color=#000000]
package nhansu[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]util[/color][color=#007700].[/color][color=#0000bb]scanner[/color][color=#007700]; public class [/color][color=#0000bb]sinhvien [/color][color=#007700]{private [/color][color=#0000bb]string hoten[/color][color=#007700];private [/color][color=#0000bb]string lophoc[/color][color=#007700];private [/color][color=#0000bb]float dtoan[/color][color=#007700];private [/color][color=#0000bb]float dly[/color][color=#007700];private [/color][color=#0000bb]float dhoa[/color][color=#007700];public [/color][color=#0000bb]string gethoten[/color][color=#007700]() {return [/color][color=#0000bb]hoten[/color][color=#007700];}public [/color][color=#0000bb]void sethoten[/color][color=#007700]([/color][color=#0000bb]string hoten[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]hoten [/color][color=#007700]= [/color][color=#0000bb]hoten[/color][color=#007700];}public [/color][color=#0000bb]string getlophoc[/color][color=#007700]() {return [/color][color=#0000bb]lophoc[/color][color=#007700];}public [/color][color=#0000bb]void setlophoc[/color][color=#007700]([/color][color=#0000bb]string lophoc[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]lophoc [/color][color=#007700]= [/color][color=#0000bb]lophoc[/color][color=#007700];}public [/color][color=#0000bb]float getdtoan[/color][color=#007700]() {return [/color][color=#0000bb]dtoan[/color][color=#007700];}public [/color][color=#0000bb]void setdtoan[/color][color=#007700]([/color][color=#0000bb]float dtoan[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dtoan [/color][color=#007700]= [/color][color=#0000bb]dtoan[/color][color=#007700];}public [/color][color=#0000bb]float getdly[/color][color=#007700]() {return [/color][color=#0000bb]dly[/color][color=#007700];}public [/color][color=#0000bb]void setdly[/color][color=#007700]([/color][color=#0000bb]float dly[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dly [/color][color=#007700]= [/color][color=#0000bb]dly[/color][color=#007700];}public [/color][color=#0000bb]float getdhoa[/color][color=#007700]() {return [/color][color=#0000bb]dhoa[/color][color=#007700];}public [/color][color=#0000bb]void setdhoa[/color][color=#007700]([/color][color=#0000bb]float dhoa[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dhoa [/color][color=#007700]= [/color][color=#0000bb]dhoa[/color][color=#007700];}public [/color][color=#0000bb]float dtb[/color][color=#007700](){return (float)([/color][color=#0000bb]dtoan [/color][color=#007700]+ [/color][color=#0000bb]dhoa [/color][color=#007700]+ [/color][color=#0000bb]dly[/color][color=#007700])/[/color][color=#0000bb]3[/color][color=#007700];}public [/color][color=#0000bb]void xeploai[/color][color=#007700]([/color][color=#0000bb]float dtb[/color][color=#007700]){if([/color][color=#0000bb]dtb [/color][color=#007700]>= [/color][color=#0000bb]8 [/color][color=#007700]&& [/color][color=#0000bb]dtb [/color][color=#007700]<=[/color][color=#0000bb]10[/color][color=#007700])[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"giỏi"[/color][color=#007700]);else if([/color][color=#0000bb]dtb [/color][color=#007700]>=[/color][color=#0000bb]7 [/color][color=#007700]&& [/color][color=#0000bb]dtb [/color][color=#007700]<[/color][color=#0000bb]8[/color][color=#007700])[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"khá"[/color][color=#007700]);else if([/color][color=#0000bb]dtb [/color][color=#007700]< [/color][color=#0000bb]7 [/color][color=#007700]&& [/color][color=#0000bb]dtb [/color][color=#007700]>=[/color][color=#0000bb]5[/color][color=#007700])[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"trung bình"[/color][color=#007700]);else[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"yếu"[/color][color=#007700]);}public [/color][color=#0000bb]void nhap[/color][color=#007700](){[/color][color=#0000bb]scanner in [/color][color=#007700]= new [/color][color=#0000bb]scanner[/color][color=#007700]([/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]in[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập tên sinh viên:"[/color][color=#007700]);[/color][color=#0000bb]hoten [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập lớp học:"[/color][color=#007700]);[/color][color=#0000bb]lophoc [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập điểm toán:"[/color][color=#007700]);[/color][color=#0000bb]dtoan [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập điểm hóa:"[/color][color=#007700]);[/color][color=#0000bb]dhoa [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập điểm lý:"[/color][color=#007700]);[/color][color=#0000bb]dly [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700]();}public [/color][color=#0000bb]void xuat[/color][color=#007700](){[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"thông tin của sinh viên!!!"[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"họ tên:"[/color][color=#007700]+[/color][color=#0000bb]hoten[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"lớp học:"[/color][color=#007700]+[/color][color=#0000bb]lophoc[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"điểm toán:"[/color][color=#007700]+[/color][color=#0000bb]dtoan[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"điểm hóa:"[/color][color=#007700]+[/color][color=#0000bb]dhoa[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"điểm lý:"[/color][color=#007700]+[/color][color=#0000bb]dly[/color][color=#007700]);}}[/color]
</div>
</div>
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>giangvien (move your mouse to reveal the content)</noscript>
giangvien (open)
giangvien (close)
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã nguồn PHP:[color=#000000]
package nhansu[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]util[/color][color=#007700].[/color][color=#0000bb]scanner[/color][color=#007700]; public class [/color][color=#0000bb]sinhvien [/color][color=#007700]{private [/color][color=#0000bb]string hoten[/color][color=#007700];private [/color][color=#0000bb]string lophoc[/color][color=#007700];private [/color][color=#0000bb]float dtoan[/color][color=#007700];private [/color][color=#0000bb]float dly[/color][color=#007700];private [/color][color=#0000bb]float dhoa[/color][color=#007700];public [/color][color=#0000bb]string gethoten[/color][color=#007700]() {return [/color][color=#0000bb]hoten[/color][color=#007700];}public [/color][color=#0000bb]void sethoten[/color][color=#007700]([/color][color=#0000bb]string hoten[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]hoten [/color][color=#007700]= [/color][color=#0000bb]hoten[/color][color=#007700];}public [/color][color=#0000bb]string getlophoc[/color][color=#007700]() {return [/color][color=#0000bb]lophoc[/color][color=#007700];}public [/color][color=#0000bb]void setlophoc[/color][color=#007700]([/color][color=#0000bb]string lophoc[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]lophoc [/color][color=#007700]= [/color][color=#0000bb]lophoc[/color][color=#007700];}public [/color][color=#0000bb]float getdtoan[/color][color=#007700]() {return [/color][color=#0000bb]dtoan[/color][color=#007700];}public [/color][color=#0000bb]void setdtoan[/color][color=#007700]([/color][color=#0000bb]float dtoan[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dtoan [/color][color=#007700]= [/color][color=#0000bb]dtoan[/color][color=#007700];}public [/color][color=#0000bb]float getdly[/color][color=#007700]() {return [/color][color=#0000bb]dly[/color][color=#007700];}public [/color][color=#0000bb]void setdly[/color][color=#007700]([/color][color=#0000bb]float dly[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dly [/color][color=#007700]= [/color][color=#0000bb]dly[/color][color=#007700];}public [/color][color=#0000bb]float getdhoa[/color][color=#007700]() {return [/color][color=#0000bb]dhoa[/color][color=#007700];}public [/color][color=#0000bb]void setdhoa[/color][color=#007700]([/color][color=#0000bb]float dhoa[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dhoa [/color][color=#007700]= [/color][color=#0000bb]dhoa[/color][color=#007700];}public [/color][color=#0000bb]float dtb[/color][color=#007700](){return (float)([/color][color=#0000bb]dtoan [/color][color=#007700]+ [/color][color=#0000bb]dhoa [/color][color=#007700]+ [/color][color=#0000bb]dly[/color][color=#007700])/[/color][color=#0000bb]3[/color][color=#007700];}public [/color][color=#0000bb]void xeploai[/color][color=#007700]([/color][color=#0000bb]float dtb[/color][color=#007700]){if([/color][color=#0000bb]dtb [/color][color=#007700]>= [/color][color=#0000bb]8 [/color][color=#007700]&& [/color][color=#0000bb]dtb [/color][color=#007700]<=[/color][color=#0000bb]10[/color][color=#007700])[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"giỏi"[/color][color=#007700]);else if([/color][color=#0000bb]dtb [/color][color=#007700]>=[/color][color=#0000bb]7 [/color][color=#007700]&& [/color][color=#0000bb]dtb [/color][color=#007700]<[/color][color=#0000bb]8[/color][color=#007700])[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"khá"[/color][color=#007700]);else if([/color][color=#0000bb]dtb [/color][color=#007700]< [/color][color=#0000bb]7 [/color][color=#007700]&& [/color][color=#0000bb]dtb [/color][color=#007700]>=[/color][color=#0000bb]5[/color][color=#007700])[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"trung bình"[/color][color=#007700]);else[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"yếu"[/color][color=#007700]);}public [/color][color=#0000bb]void nhap[/color][color=#007700](){[/color][color=#0000bb]scanner in [/color][color=#007700]= new [/color][color=#0000bb]scanner[/color][color=#007700]([/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]in[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập tên sinh viên:"[/color][color=#007700]);[/color][color=#0000bb]hoten [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập lớp học:"[/color][color=#007700]);[/color][color=#0000bb]lophoc [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập điểm toán:"[/color][color=#007700]);[/color][color=#0000bb]dtoan [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập điểm hóa:"[/color][color=#007700]);[/color][color=#0000bb]dhoa [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập điểm lý:"[/color][color=#007700]);[/color][color=#0000bb]dly [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700]();}public [/color][color=#0000bb]void xuat[/color][color=#007700](){[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"thông tin của sinh viên!!!"[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"họ tên:"[/color][color=#007700]+[/color][color=#0000bb]hoten[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"lớp học:"[/color][color=#007700]+[/color][color=#0000bb]lophoc[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"điểm toán:"[/color][color=#007700]+[/color][color=#0000bb]dtoan[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"điểm hóa:"[/color][color=#007700]+[/color][color=#0000bb]dhoa[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"điểm lý:"[/color][color=#007700]+[/color][color=#0000bb]dly[/color][color=#007700]);}}[/color]
</div>
</div>
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>qlnhansu (move your mouse to reveal the content)</noscript>
qlnhansu (open)
qlnhansu (close)
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã nguồn PHP:[color=#000000]
package nhansu[/color][color=#007700]; public class [/color][color=#0000bb]qlnhansu [/color][color=#007700]{public static [/color][color=#0000bb]void main[/color][color=#007700]([/color][color=#0000bb]string[/color][color=#007700][] [/color][color=#0000bb]args[/color][color=#007700]){[/color][color=#0000bb]sinhvien a [/color][color=#007700]= new [/color][color=#0000bb]sinhvien[/color][color=#007700]();[/color][color=#0000bb]giangvien b [/color][color=#007700]= new [/color][color=#0000bb]giangvien[/color][color=#007700]();[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]nhap[/color][color=#007700]();[/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]nhap[/color][color=#007700]();[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]xuat[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"điểm trung bình của "[/color][color=#007700]+[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]gethoten[/color][color=#007700]()+[/color][color=#dd0000]" là:"[/color][color=#007700]+[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]dtb[/color][color=#007700]());[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]xeploai[/color][color=#007700]([/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]dtb[/color][color=#007700]());[/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]xuat[/color][color=#007700]();if([/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getlophoc[/color][color=#007700]().[/color][color=#0000bb]compareto[/color][color=#007700]([/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]getlopday[/color][color=#007700]()) == [/color][color=#0000bb]0[/color][color=#007700])[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"giảng viên "[/color][color=#007700]+[/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]gethoten[/color][color=#007700]()+[/color][color=#dd0000]" dạy lớp của "[/color][color=#007700]+[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]gethoten[/color][color=#007700]());else[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"giảng viên "[/color][color=#007700]+[/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]gethoten[/color][color=#007700]()+[/color][color=#dd0000]" không dạy lớp của "[/color][color=#007700]+[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]gethoten[/color][color=#007700]());}}[/color]
</div>
</div>
-
07-07-2014, 07:00 AM #37Junior Member
- Ngày tham gia
- Mar 2015
- Bài viết
- 0
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>sinhvien (move your mouse to reveal the content)</noscript>
sinhvien (open)
sinhvien (close)
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã nguồn PHP:[color=#000000]
package nhansu[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]util[/color][color=#007700].[/color][color=#0000bb]scanner[/color][color=#007700]; public class [/color][color=#0000bb]sinhvien [/color][color=#007700]{private [/color][color=#0000bb]string hoten[/color][color=#007700];private [/color][color=#0000bb]string lophoc[/color][color=#007700];private [/color][color=#0000bb]float dtoan[/color][color=#007700];private [/color][color=#0000bb]float dly[/color][color=#007700];private [/color][color=#0000bb]float dhoa[/color][color=#007700];public [/color][color=#0000bb]string gethoten[/color][color=#007700]() {return [/color][color=#0000bb]hoten[/color][color=#007700];}public [/color][color=#0000bb]void sethoten[/color][color=#007700]([/color][color=#0000bb]string hoten[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]hoten [/color][color=#007700]= [/color][color=#0000bb]hoten[/color][color=#007700];}public [/color][color=#0000bb]string getlophoc[/color][color=#007700]() {return [/color][color=#0000bb]lophoc[/color][color=#007700];}public [/color][color=#0000bb]void setlophoc[/color][color=#007700]([/color][color=#0000bb]string lophoc[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]lophoc [/color][color=#007700]= [/color][color=#0000bb]lophoc[/color][color=#007700];}public [/color][color=#0000bb]float getdtoan[/color][color=#007700]() {return [/color][color=#0000bb]dtoan[/color][color=#007700];}public [/color][color=#0000bb]void setdtoan[/color][color=#007700]([/color][color=#0000bb]float dtoan[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dtoan [/color][color=#007700]= [/color][color=#0000bb]dtoan[/color][color=#007700];}public [/color][color=#0000bb]float getdly[/color][color=#007700]() {return [/color][color=#0000bb]dly[/color][color=#007700];}public [/color][color=#0000bb]void setdly[/color][color=#007700]([/color][color=#0000bb]float dly[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dly [/color][color=#007700]= [/color][color=#0000bb]dly[/color][color=#007700];}public [/color][color=#0000bb]float getdhoa[/color][color=#007700]() {return [/color][color=#0000bb]dhoa[/color][color=#007700];}public [/color][color=#0000bb]void setdhoa[/color][color=#007700]([/color][color=#0000bb]float dhoa[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dhoa [/color][color=#007700]= [/color][color=#0000bb]dhoa[/color][color=#007700];}public [/color][color=#0000bb]float dtb[/color][color=#007700](){return (float)([/color][color=#0000bb]dtoan [/color][color=#007700]+ [/color][color=#0000bb]dhoa [/color][color=#007700]+ [/color][color=#0000bb]dly[/color][color=#007700])/[/color][color=#0000bb]3[/color][color=#007700];}public [/color][color=#0000bb]void xeploai[/color][color=#007700]([/color][color=#0000bb]float dtb[/color][color=#007700]){if([/color][color=#0000bb]dtb [/color][color=#007700]>= [/color][color=#0000bb]8 [/color][color=#007700]&& [/color][color=#0000bb]dtb [/color][color=#007700]<=[/color][color=#0000bb]10[/color][color=#007700])[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"giỏi"[/color][color=#007700]);else if([/color][color=#0000bb]dtb [/color][color=#007700]>=[/color][color=#0000bb]7 [/color][color=#007700]&& [/color][color=#0000bb]dtb [/color][color=#007700]<[/color][color=#0000bb]8[/color][color=#007700])[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"khá"[/color][color=#007700]);else if([/color][color=#0000bb]dtb [/color][color=#007700]< [/color][color=#0000bb]7 [/color][color=#007700]&& [/color][color=#0000bb]dtb [/color][color=#007700]>=[/color][color=#0000bb]5[/color][color=#007700])[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"trung bình"[/color][color=#007700]);else[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"yếu"[/color][color=#007700]);}public [/color][color=#0000bb]void nhap[/color][color=#007700](){[/color][color=#0000bb]scanner in [/color][color=#007700]= new [/color][color=#0000bb]scanner[/color][color=#007700]([/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]in[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập tên sinh viên:"[/color][color=#007700]);[/color][color=#0000bb]hoten [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập lớp học:"[/color][color=#007700]);[/color][color=#0000bb]lophoc [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập điểm toán:"[/color][color=#007700]);[/color][color=#0000bb]dtoan [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập điểm hóa:"[/color][color=#007700]);[/color][color=#0000bb]dhoa [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập điểm lý:"[/color][color=#007700]);[/color][color=#0000bb]dly [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700]();}public [/color][color=#0000bb]void xuat[/color][color=#007700](){[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"thông tin của sinh viên!!!"[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"họ tên:"[/color][color=#007700]+[/color][color=#0000bb]hoten[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"lớp học:"[/color][color=#007700]+[/color][color=#0000bb]lophoc[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"điểm toán:"[/color][color=#007700]+[/color][color=#0000bb]dtoan[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"điểm hóa:"[/color][color=#007700]+[/color][color=#0000bb]dhoa[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"điểm lý:"[/color][color=#007700]+[/color][color=#0000bb]dly[/color][color=#007700]);}}[/color]
</div>
</div>
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>giangvien (move your mouse to reveal the content)</noscript>
giangvien (open)
giangvien (close)
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã nguồn PHP:[color=#000000]
package nhansu[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]util[/color][color=#007700].[/color][color=#0000bb]scanner[/color][color=#007700]; public class [/color][color=#0000bb]sinhvien [/color][color=#007700]{private [/color][color=#0000bb]string hoten[/color][color=#007700];private [/color][color=#0000bb]string lophoc[/color][color=#007700];private [/color][color=#0000bb]float dtoan[/color][color=#007700];private [/color][color=#0000bb]float dly[/color][color=#007700];private [/color][color=#0000bb]float dhoa[/color][color=#007700];public [/color][color=#0000bb]string gethoten[/color][color=#007700]() {return [/color][color=#0000bb]hoten[/color][color=#007700];}public [/color][color=#0000bb]void sethoten[/color][color=#007700]([/color][color=#0000bb]string hoten[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]hoten [/color][color=#007700]= [/color][color=#0000bb]hoten[/color][color=#007700];}public [/color][color=#0000bb]string getlophoc[/color][color=#007700]() {return [/color][color=#0000bb]lophoc[/color][color=#007700];}public [/color][color=#0000bb]void setlophoc[/color][color=#007700]([/color][color=#0000bb]string lophoc[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]lophoc [/color][color=#007700]= [/color][color=#0000bb]lophoc[/color][color=#007700];}public [/color][color=#0000bb]float getdtoan[/color][color=#007700]() {return [/color][color=#0000bb]dtoan[/color][color=#007700];}public [/color][color=#0000bb]void setdtoan[/color][color=#007700]([/color][color=#0000bb]float dtoan[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dtoan [/color][color=#007700]= [/color][color=#0000bb]dtoan[/color][color=#007700];}public [/color][color=#0000bb]float getdly[/color][color=#007700]() {return [/color][color=#0000bb]dly[/color][color=#007700];}public [/color][color=#0000bb]void setdly[/color][color=#007700]([/color][color=#0000bb]float dly[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dly [/color][color=#007700]= [/color][color=#0000bb]dly[/color][color=#007700];}public [/color][color=#0000bb]float getdhoa[/color][color=#007700]() {return [/color][color=#0000bb]dhoa[/color][color=#007700];}public [/color][color=#0000bb]void setdhoa[/color][color=#007700]([/color][color=#0000bb]float dhoa[/color][color=#007700]) {[/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]dhoa [/color][color=#007700]= [/color][color=#0000bb]dhoa[/color][color=#007700];}public [/color][color=#0000bb]float dtb[/color][color=#007700](){return (float)([/color][color=#0000bb]dtoan [/color][color=#007700]+ [/color][color=#0000bb]dhoa [/color][color=#007700]+ [/color][color=#0000bb]dly[/color][color=#007700])/[/color][color=#0000bb]3[/color][color=#007700];}public [/color][color=#0000bb]void xeploai[/color][color=#007700]([/color][color=#0000bb]float dtb[/color][color=#007700]){if([/color][color=#0000bb]dtb [/color][color=#007700]>= [/color][color=#0000bb]8 [/color][color=#007700]&& [/color][color=#0000bb]dtb [/color][color=#007700]<=[/color][color=#0000bb]10[/color][color=#007700])[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"giỏi"[/color][color=#007700]);else if([/color][color=#0000bb]dtb [/color][color=#007700]>=[/color][color=#0000bb]7 [/color][color=#007700]&& [/color][color=#0000bb]dtb [/color][color=#007700]<[/color][color=#0000bb]8[/color][color=#007700])[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"khá"[/color][color=#007700]);else if([/color][color=#0000bb]dtb [/color][color=#007700]< [/color][color=#0000bb]7 [/color][color=#007700]&& [/color][color=#0000bb]dtb [/color][color=#007700]>=[/color][color=#0000bb]5[/color][color=#007700])[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"trung bình"[/color][color=#007700]);else[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"yếu"[/color][color=#007700]);}public [/color][color=#0000bb]void nhap[/color][color=#007700](){[/color][color=#0000bb]scanner in [/color][color=#007700]= new [/color][color=#0000bb]scanner[/color][color=#007700]([/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]in[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập tên sinh viên:"[/color][color=#007700]);[/color][color=#0000bb]hoten [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập lớp học:"[/color][color=#007700]);[/color][color=#0000bb]lophoc [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập điểm toán:"[/color][color=#007700]);[/color][color=#0000bb]dtoan [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập điểm hóa:"[/color][color=#007700]);[/color][color=#0000bb]dhoa [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập điểm lý:"[/color][color=#007700]);[/color][color=#0000bb]dly [/color][color=#007700]= [/color][color=#0000bb]in[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700]();}public [/color][color=#0000bb]void xuat[/color][color=#007700](){[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"thông tin của sinh viên!!!"[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"họ tên:"[/color][color=#007700]+[/color][color=#0000bb]hoten[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"lớp học:"[/color][color=#007700]+[/color][color=#0000bb]lophoc[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"điểm toán:"[/color][color=#007700]+[/color][color=#0000bb]dtoan[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"điểm hóa:"[/color][color=#007700]+[/color][color=#0000bb]dhoa[/color][color=#007700]);[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"điểm lý:"[/color][color=#007700]+[/color][color=#0000bb]dly[/color][color=#007700]);}}[/color]
</div>
</div>
<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>qlnhansu (move your mouse to reveal the content)</noscript>
qlnhansu (open)
qlnhansu (close)
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã nguồn PHP:[color=#000000]
package nhansu[/color][color=#007700]; public class [/color][color=#0000bb]qlnhansu [/color][color=#007700]{public static [/color][color=#0000bb]void main[/color][color=#007700]([/color][color=#0000bb]string[/color][color=#007700][] [/color][color=#0000bb]args[/color][color=#007700]){[/color][color=#0000bb]sinhvien a [/color][color=#007700]= new [/color][color=#0000bb]sinhvien[/color][color=#007700]();[/color][color=#0000bb]giangvien b [/color][color=#007700]= new [/color][color=#0000bb]giangvien[/color][color=#007700]();[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]nhap[/color][color=#007700]();[/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]nhap[/color][color=#007700]();[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]xuat[/color][color=#007700]();[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"điểm trung bình của "[/color][color=#007700]+[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]gethoten[/color][color=#007700]()+[/color][color=#dd0000]" là:"[/color][color=#007700]+[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]dtb[/color][color=#007700]());[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]xeploai[/color][color=#007700]([/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]dtb[/color][color=#007700]());[/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]xuat[/color][color=#007700]();if([/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getlophoc[/color][color=#007700]().[/color][color=#0000bb]compareto[/color][color=#007700]([/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]getlopday[/color][color=#007700]()) == [/color][color=#0000bb]0[/color][color=#007700])[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"giảng viên "[/color][color=#007700]+[/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]gethoten[/color][color=#007700]()+[/color][color=#dd0000]" dạy lớp của "[/color][color=#007700]+[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]gethoten[/color][color=#007700]());else[/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"giảng viên "[/color][color=#007700]+[/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]gethoten[/color][color=#007700]()+[/color][color=#dd0000]" không dạy lớp của "[/color][color=#007700]+[/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]gethoten[/color][color=#007700]());}}[/color]
</div>
</div>
-
07-19-2014, 07:00 AM #38Junior Member
- Ngày tham gia
- Jul 2015
- Bài viết
- 1
lỗi này là sao vậy các bạn . sau khi mình nhập trông tin của sinh viên xong . tiếp đến nhập thông tin của giảng viên thì bị lỗi này .
nhập thông tin sinh viên!
nhập tên sinh viên: luc
nhập lớp học: 22
nhập điểm toán: 2
nhập điểm lý: 2
nhập điểm hóa: 2
nhập thông tin giảng viên!
nhập tên giảng viên: exception in thread "main" java.util.nosuchelementexception: no line found
at java.util.scanner.nextline(unknown source)
at nhan.su.giangvien.inputgv(giangvien.java:39)
at nhan.su.main.main(main.java:10)
-
07-19-2014, 07:00 AM #39Junior Member
- Ngày tham gia
- Aug 2015
- Bài viết
- 0
Gửi bởi htmljava
-
07-19-2014, 07:00 AM #40Junior Member
- Ngày tham gia
- Jul 2015
- Bài viết
- 4
Gửi bởi nhatta
Mã nguồn PHP:[color=#000000]
[/color][color=#007700]public [/color][color=#0000bb]void inputsv[/color][color=#007700]() { [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"nhập thông tin sinh viên!"[/color][color=#007700]); [/color][color=#0000bb]scanner inp [/color][color=#007700]= new [/color][color=#0000bb]scanner[/color][color=#007700]([/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]in[/color][color=#007700]); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập tên sinh viên: "[/color][color=#007700]); [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]hoten [/color][color=#007700]= [/color][color=#0000bb]inp[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập lớp học: "[/color][color=#007700]); [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]lophoc [/color][color=#007700]= [/color][color=#0000bb]inp[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập điểm toán: "[/color][color=#007700]); [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]toan [/color][color=#007700]= [/color][color=#0000bb]inp[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập điểm lý: "[/color][color=#007700]); [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]ly [/color][color=#007700]= [/color][color=#0000bb]inp[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập điểm hóa: "[/color][color=#007700]); [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]hoa [/color][color=#007700]= [/color][color=#0000bb]inp[/color][color=#007700].[/color][color=#0000bb]nextfloat[/color][color=#007700](); [/color][color=#0000bb]inp[/color][color=#007700].[/color][color=#0000bb]close[/color][color=#007700](); } public [/color][color=#0000bb]void inputgv[/color][color=#007700]() { [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"nhập thông tin giảng viên!"[/color][color=#007700]); [/color][color=#0000bb]scanner inp [/color][color=#007700]= new [/color][color=#0000bb]scanner[/color][color=#007700]([/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]in[/color][color=#007700]); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập tên giảng viên: "[/color][color=#007700]); [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]hoten [/color][color=#007700]= [/color][color=#0000bb]inp[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập lớp dạy: "[/color][color=#007700]); [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]lopday [/color][color=#007700]= [/color][color=#0000bb]inp[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700](); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].print([/color][color=#dd0000]"nhập năm sinh: "[/color][color=#007700]); [/color][color=#0000bb]this[/color][color=#007700].[/color][color=#0000bb]namsinh [/color][color=#007700]= [/color][color=#0000bb]inp[/color][color=#007700].[/color][color=#0000bb]nextint[/color][color=#007700](); [/color][color=#0000bb]inp[/color][color=#007700].[/color][color=#0000bb]close[/color][color=#007700](); } public class [/color][color=#0000bb]main [/color][color=#007700]{public static [/color][color=#0000bb]void main[/color][color=#007700]([/color][color=#0000bb]string[/color][color=#007700][] [/color][color=#0000bb]args[/color][color=#007700]) {[/color][color=#0000bb]sinhvien a [/color][color=#007700]= new [/color][color=#0000bb]sinhvien[/color][color=#007700](); [/color][color=#0000bb]giangvien b [/color][color=#007700]= new [/color][color=#0000bb]giangvien[/color][color=#007700](); [/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]inputsv[/color][color=#007700](); [/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]inputgv[/color][color=#007700](); [/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]showsv[/color][color=#007700](); [/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]xeploai[/color][color=#007700](); if ([/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]getlopday[/color][color=#007700]().[/color][color=#0000bb]equals[/color][color=#007700]([/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]getlophoc[/color][color=#007700]())) { [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"giảng viên " [/color][color=#007700]+ [/color][color=#0000bb]b[/color][color=#007700].[/color][color=#0000bb]gethoten[/color][color=#007700]() + [/color][color=#dd0000]" dạy lớp của sinh viên " [/color][color=#007700]+ [/color][color=#0000bb]a[/color][color=#007700].[/color][color=#0000bb]gethoten[/color][color=#007700]()); }}}[/color]
Khu chung cư cao cấp The Esme Dĩ An đầu tư bởi Công ty TNHH Đầu tư Xây dựng Thiên Hà – Băng Dương văn hoá đa dạng gần trung tâm đầu tư dài hạn. The Esme Dĩ An giagocchudautu.com văn hoá đa dạng...
Dự án chung cư The Esme Dĩ An sát trung tâm