mirror of
https://git.adityakumar.xyz/data-structures.git
synced 2024-12-22 19:52:52 +00:00
19 lines
439 B
Java
19 lines
439 B
Java
|
/** A simple payroll entry with ID, name, address fields */
|
||
|
class Payroll {
|
||
|
private Integer ID;
|
||
|
private String name;
|
||
|
private String address;
|
||
|
|
||
|
/** Constructor */
|
||
|
Payroll(int inID, String inname, String inaddr) {
|
||
|
id = inID;
|
||
|
name = inname;
|
||
|
address = inaddr;
|
||
|
}
|
||
|
|
||
|
/** Data member access functions */
|
||
|
public Integer getID() { return ID; }
|
||
|
public String getname() { return name; }
|
||
|
public String getaddr() { return address; }
|
||
|
}
|