package homework; public class Student { private String name; private int id; private int age; private String sex; public Student() { // TODO Auto-generated constructor stub } public Student(String name, int id, int age, String sex) { this.name = name; this.id = id; this.age = age; this.sex = sex; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getId() { return id; } public void setId(int id) { this.id = id; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public String getSex() { return sex; } public void setSex(String sex) { this.sex = sex; } @Override public String toString() { return "Student [name=" + name + ", id=" + id + ", age=" + age + ", sex=" + sex + "]"; } }