⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 studentinfo.java

📁 java程序 学生信息管理系统 数据库采用acce
💻 JAVA
字号:
package com.studentFrame;
/*学生基本信息类*/

public class StudentInfo          
 {
     String id;        //学号
     String name;
     String sex;
     String nativeplace;   // 冠籍
     String address;
     String dep;         //系别
     String grade;  
	 String birth;
	 String entrytime;       //入学时间
	 private String password;
	 StudentInfo(String id,String name,String sex,String nativeplace,String address,
	 String birth,String entrytime,String grade,String dep)
     {
		 this.id = id ;
		 this.name = name;
		 this.sex = sex ;
		 this.nativeplace = nativeplace;
		 this.address = address ;
		 this.birth = birth ;
		 this.entrytime = entrytime;
		 this.grade = grade;
		 this.dep = dep;
		 password = id;    //默认密码为学号
	}
	StudentInfo()            //构造函数重载
	{
		 this.id = "0" ;
		 this.name = "";
		 this.sex = "男" ;
		 this.nativeplace = "";
		 this.address = "" ;
		 this.birth = "" ;
		 this.entrytime = "";
		 this.grade = "";
		 this.dep = "计算机";
		 password = id;
	}
	 /*设置课程信息类的属性的set与get方法*/
	public String getPassword()
	{
		return password;
	}
	public void setPassword(String pas)
	{
		password = pas;
	}
	public void setName(String name)
	{
		this.name = name ;
	}
	public void setNativeplace(String nativeplace)
	{
		this.nativeplace = nativeplace ;
     }
     public void setAddress(String address)
	 {
	 	this.address = address;
    }
	public void setBirth(String bir)
	{
		birth = bir;
    }
    public void setEntrytime(String time)
    {
		this.entrytime = time;
	}
    public String getBirth()
    {
		return birth;
	}
	public String getEntrytime()
	{
		return entrytime;
	}
    public String getId()
    {
		return id;
	}
	/*将学生的基本信息以字符串形式返回*/
	public String toString()      //覆盖Object类的toString()函数
	{
		String info = id+" "+name+" "+sex+" "+nativeplace+" "+address+" "
		              +dep+" "+grade+" "+birth;
		return info;
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -