Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Sinh_Vien
- {
- private String MaSV, HoTen;
- public class Date
- {
- public int m,d,y;
- public void setDate(int d, int m, int y)
- {
- this.m=m;
- this.y=y;
- this.d=d;
- }
- public String showDate()
- {
- //System.out.print(" "+d+"/"+m+"/"+y+" ");
- return " "+d+"/"+m+"/"+y+" ";
- }
- }
- public void input()
- {
- Scanner scan=new Scanner(System.in);
- Date D = new Date();
- MaSV=scan.nextLine();
- HoTen=scan.nextLine();
- int d,m,y;
- d=scan.nextInt();
- m=scan.nextInt();
- y=scan.nextInt();
- D.setDate(d,m,y);
- scan.close();
- }
- public void info()
- {
- Date D = new Date();
- D.setDate(4, 5, 2013);
- System.out.print(MaSV+"\t"+HoTen+"\t"+D.showDate());
- }
- public static void main(String []Srg)
- {
- Sinh_Vien sv = new Sinh_Vien();
- sv.input();
- sv.info();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement