Join the forum, it's quick and easy

Bạn có muốn phản ứng với tin nhắn này? Vui lòng đăng ký diễn đàn trong một vài cú nhấp chuột hoặc đăng nhập để tiếp tục.
Tìm kiếm
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» [GIÚP ]KÍCH HOẠT Ở ĐÂU THÌ KHI COPY EMBED CODE SẼ HIỆN THỊ VIDEO TRÊN FORUMVI?
Bài tập SINHVIEN EmptyTue May 21, 2013 8:07 am by NGUOIMIENTAY

» THAY ĐỔI HÌNH ẢNH TRÊN DIỄN ĐÀN ĐI XẤU QUÁ HÀ
Bài tập SINHVIEN EmptySat Feb 04, 2012 8:36 pm by hongsang

» KỸ NĂNG ĐẠT ĐẾN THÀNH CÔNG - BIẾT CÁCH BÁN HÀNG
Bài tập SINHVIEN EmptySat Sep 24, 2011 2:05 pm by banhminuong

» Source BT tuần 1
Bài tập SINHVIEN EmptySun Sep 18, 2011 7:44 pm by nucuoithienthan20077

» 12 Lý do để thử ngay Ubuntu 11.04
Bài tập SINHVIEN EmptySat Sep 17, 2011 9:57 pm by fx

» Bài tập SINHVIEN
Bài tập SINHVIEN EmptyWed Sep 14, 2011 10:15 pm by fx

» Bom Tan Tuan` 1 ne````
Bài tập SINHVIEN EmptyMon Aug 29, 2011 1:11 pm by nucuojhanhphuc

» TÀI LIỆU KIẾN TRÚC MÁY TÍNH
Bài tập SINHVIEN EmptyMon Aug 29, 2011 12:41 am by minhduc2592

» ĐÔRÊMON CHẾ
Bài tập SINHVIEN EmptySat Aug 13, 2011 11:31 am by nucuoithienthan20077

Top posters
fx (49)
Bài tập SINHVIEN I_vote_lcapBài tập SINHVIEN I_voting_barBài tập SINHVIEN I_vote_rcap 
thanhvu215 (19)
Bài tập SINHVIEN I_vote_lcapBài tập SINHVIEN I_voting_barBài tập SINHVIEN I_vote_rcap 
minhduc2592 (13)
Bài tập SINHVIEN I_vote_lcapBài tập SINHVIEN I_voting_barBài tập SINHVIEN I_vote_rcap 
nucuoithienthan20077 (7)
Bài tập SINHVIEN I_vote_lcapBài tập SINHVIEN I_voting_barBài tập SINHVIEN I_vote_rcap 
biboy (6)
Bài tập SINHVIEN I_vote_lcapBài tập SINHVIEN I_voting_barBài tập SINHVIEN I_vote_rcap 
pengox2912 (2)
Bài tập SINHVIEN I_vote_lcapBài tập SINHVIEN I_voting_barBài tập SINHVIEN I_vote_rcap 
boylangyeu (2)
Bài tập SINHVIEN I_vote_lcapBài tập SINHVIEN I_voting_barBài tập SINHVIEN I_vote_rcap 
sock (2)
Bài tập SINHVIEN I_vote_lcapBài tập SINHVIEN I_voting_barBài tập SINHVIEN I_vote_rcap 
nucuojhanhphuc (2)
Bài tập SINHVIEN I_vote_lcapBài tập SINHVIEN I_voting_barBài tập SINHVIEN I_vote_rcap 
nhongthuy (2)
Bài tập SINHVIEN I_vote_lcapBài tập SINHVIEN I_voting_barBài tập SINHVIEN I_vote_rcap 

May 2024
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
2728293031  

Calendar Calendar

Lick chuột vào đây chat cho vui!
Admin Bài tập SINHVIEN Anhso-09641_lc01171151911 Không có tạ! Mình dùng tạm cái này vậy!!

Bài tập SINHVIEN

Go down

Bài tập SINHVIEN Empty Bài tập SINHVIEN

Bài gửi by fx Wed Sep 14, 2011 10:15 pm

Hàm main




/*
* To change this template, choose | Templates
* and open the template in the editor.
*/

package bai3;

/**
*
* @author Administrator
*/
public class Main {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
SV s=new SV(1,"son",5);
SV s1=new SV();
s1.nhap();
s.hienThi();
s1.hienThi();

}

}

Hàm con: SINHVIEN


/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package bai3;

import java.util.Scanner;

/**
*
* @author Administrator
*/
public class SV {
int ma;
String ten;
float dtb;
public SV(int m,String t,float d){
this.ma=m; this.ten=t; this.dtb=d;
}

public SV() {
this.ma=0;
this.ten="";
this.dtb=0;
}
public void hienThi(){
System.out.println("ma:" + this.ma);
System.out.println("Ten:" + this.ten);
System.out.println("DTB:" + this.dtb);
}
public void nhap(){
Scanner sc=new Scanner(System.in);
System.out.println("ma:");
this.ma=sc.nextInt();
System.out.println("Ten:");
sc.nextLine();
this.ten=sc.nextLine();
System.out.println("DTB:");
this.dtb=sc.nextFloat();
}
}
fx
fx
Admin

Tổng số bài gửi : 49
Points : 179
Reputation : 3
Join date : 02/04/2011
Age : 31

https://04cdct1.forumvi.com

Về Đầu Trang Go down

Về Đầu Trang


 
Permissions in this forum:
Bạn không có quyền trả lời bài viết