Untitled
unknown
plain_text
3 years ago
2.1 kB
8
Indexable
package v06f;
import java.io.Serializable;
/**
*
*
* @author kiet
*/
public class Profile implements Serializable {
private String ID; //ID profile
private String name; //name
private int yearOfRegistration; // year of registration
private String address; //Address
/**
* no-argument constructor.
*
*/
public Profile() {
}
/**
* Constructor
*
* @param ID
* @param name
* @param yearOfRegistration
* @param address
*/
public Profile(String ID, String name, int yearOfRegistration, String address) {
this.ID = ID;
this.name = name;
this.yearOfRegistration = yearOfRegistration;
this.address = address;
}
/**
*
* @return
*/
public String getID() {
return ID;
}
/**
*
* @param ID
*/
public void setID(String ID) {
this.ID = ID;
}
/**
*
* @return
*/
public String getName() {
return name;
}
/**
*
* @param name
*/
public void setName(String name) {
this.name = name;
}
/**
*
* @return
*/
public int getYearOfRegistration() {
return yearOfRegistration;
}
/**
*
* @param yearOfRegistration
*/
public void setYearOfRegistration(int yearOfRegistration) {
this.yearOfRegistration = yearOfRegistration;
}
/**
*
*
* @return
*/
public String getAddress() {
return address;
}
/**
*
* @param address
*/
public void setAddress(String address) {
this.address = address;
}
/**
* Method used to display information row by row.
*
*/
public void disPlayInfo() {
String template = "%-8s%-19s%-21s%-5s\n"; //template
System.out.printf(template, this.ID, this.name, this.yearOfRegistration, this.address);
}
}
Editor is loading...