avatar
Untitled

Guest 645 27th Feb, 2022

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Hello;

import java.lang.reflect.Array;

/**
 *
 * @author Admin
 */
public class Student {
    private String studentID;
    private String studentName;
    private Date birdthDay;
    private double TestScore;
    public Student(){
        studentID="No ID";
        studentName="No Name";
        birdthDay = null;
        TestScore=0;
    }
    public Student(String studentID, String studentName,Date Ngaysinh, Double TestScore){
        this.studentID = studentID;
        this.studentName = studentName;
        this.TestScore= TestScore;
        this.birdthDay=Ngaysinh;
    }
    public void Display(){
        System.out.printf("\nID: %s, Name: %s",studentID,studentName);
        System.out.printf("\nNgay sinh: %d/%d/%d",birdthDay.Getday(),birdthDay.Getmonth(),birdthDay.Getyear());
        System.out.printf("\nTest Score: %f",TestScore);
    }
}
Markup
Description

No description

To share this paste please copy this url and send to your friends
RAW Paste Data