package cn.edu.bjut.chapter4; public class Person { protected String id; //身份证号 protected String name; // 姓名 protected char gender; // 性别 public Person(String id, String name, char gender) { this.id = id; this.name = name; this.gender = gender; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public char getGender() { return gender; } public void setGender(char gender) { this.gender = gender; } }