信息管理系统源码报告学生APP(学生项目学号请输入信息)「学生管理系统源代码c」

《移动开发技术II》实践考核方案适用网络工程(网络软件开发)2018级一、考核内容:环境配置及移动开发生命周期、控件的使用、用户界面设计、数据存储与访问、广播、服务、网络编程、蓝牙应用等知识点
二、考核方式:1、通过提交一个综合的项目,学会运用所学知识解决实际问题
2、项目题目: XX管理系统APP,购物商城APP等,也可自命题
三、考核目的:1、掌握移动开发的生命周期2、掌握用户界面以及自定义界面的使用3、掌握数据库的应用4、掌握移动开发中网络程序设计5、掌握移动开发的程序设计方法
四、考核要求:1、完成项目程序设计;2、提交的项目运行正常,界面友好,功能完善,异常处理较好;3、项目中功能符合要求,数据库设计合理;4、文档资料完善
五、成绩评定:1、记分制:百分制2、评分标准:序号资料类型分值评分标准备注1项目描述文档20需求分析10分数据库设计10分2源程序代码60完整的源代码30分基本功能具备10分界面友好5分无明显的异常10分添加适当的注释5分3项目的复杂性10根据每位学生的选题判断其技术难度4界面的设计10满足APP界面设计要求,界面友好,便于操作3、项目提交要求:(1)项目的源程序文件,添加适当的注释,格式合理;(2)项目描述文档,包括项目名称,需求分析,项目功能描述及各个文件功能描述;(3)项目运行的每个页面截图到项目文档中并加以说明;(4)设计的APP程序应包含登录页面、数据显示页面、自定义功能页面、查询页面、网络状态连接页面等,其中数据存储需要使用Sqlite数据库,登录页面可以使用SharedPerference或者数据库,并且各个页面需要布局合理;(5)提交的源程序、项目描述文档一起打包后,命名:学号 + 姓名,如181413210张三
六、考核时间1、以学院安排为准
七、其它说明:学生在多个项目中选择一个完成,或者自选项目
通过APP项目的设计和提交,使学生能够逐渐熟悉移动开发项目的整个流程,为今后的进一步学习打下坚实的基础考核教师签名:学生信息管理的设计与实现一、项目名称:学生信息管理的设计与实现二、项目完成人:三、项目需求分析:学生信息的管理对于学校的管理者来说至关重要,学生信息是高等学校非常重要的一项数据资源,是一个教育单位不可缺少一部分
特别是近几年来,国家政策的调整,我国高等院校大规模的扩招,给高等院校的教学管理、学生管理、后勤管理等方面都带来不少的冲击
其包含的数据量大,涉及的人员面广,而且需要及时更新,故较为复杂,难以单纯地依靠人工管理,而且传统的人工管理方式既不易于规范化,管理效率也不高,系统针对学校学生信息的特点以及管理中实际需要而设计
优点如下:用户可以登录注册详细记录每位学生信息,并且可以做出统计系统操作人性化、简单易用保证软件的安全性界面流畅四、运行环境操作系统:android数据库:Sqlite五、系统功能模块(1)注册、登录页面 (2)页面admin 666学生信息录入界面 (4) 信息录入成功界面(5)学生信息浏览界面 (6)修改学生信息成功界面(7)查询学生信息界面 (8)学生信息删除界面(9)学生信息退出界面核心代码如下:AddStudentsActivity类:public class AddStudentsActivity extends AppCompatActivity implements View.OnClickListener {private ImageButton BtnBack;//返回按钮private TextView tv_title;//头标题private EditText EtName, EtNumber, EtYear, EtSex, EtBirth, EtAddress, EtPhone;//姓名、学号、年龄、性别、出生年月、地址、电话private Button BtnSave;//保存按钮DbStudents dbStudents;//数据库List<StudentsBean> mData;//数据源String number;//学号@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_add_students);tv_title=findViewById(R.id.tv_title);//绑定控件BtnBack = findViewById(R.id.btn_back);BtnSave = findViewById(R.id.btn_save);BtnBack.setOnClickListener(this);BtnSave.setOnClickListener(this);EtNumber = findViewById(R.id.add_et_number);EtName = findViewById(R.id.add_et_name);EtYear = findViewById(R.id.add_et_year);EtSex = findViewById(R.id.add_et_sex);EtBirth = findViewById(R.id.add_et_birthday);EtAddress = findViewById(R.id.add_et_address);EtPhone = findViewById(R.id.add_et_phone);dbStudents= new DbStudents(this);mData = new ArrayList<>();initData();}/ 保存修改的信息 /private void initData() {Intent intent = getIntent();if (intent != null) {number = intent.getStringExtra("number");if (number != null) {tv_title.setText("修改学生信息");BtnSave.setText("修 改");EtNumber.setText(intent.getStringExtra("number"));EtName.setText(intent.getStringExtra("name"));EtYear.setText(intent.getStringExtra("year"));EtSex.setText(intent.getStringExtra("sex"));EtBirth.setText(intent.getStringExtra("birth"));EtAddress.setText(intent.getStringExtra("address"));EtPhone.setText(intent.getStringExtra("phone"));}}}@Overridepublic void onClick(View v) {switch (v.getId()) {case R.id.btn_back:Intent intent1 = new Intent(AddStudentsActivity.this, MainActivity.class);startActivity(intent1);break;case R.id.btn_save://输入String number = EtNumber.getText().toString().trim();String name = EtName.getText().toString().trim();String year = EtYear.getText().toString().trim();String sex = EtSex.getText().toString().trim();String birth = EtBirth.getText().toString().trim();String address = EtAddress.getText().toString().trim();String phone = EtPhone.getText().toString().trim();StudentsBean studentsBeans = dbStudents.QueryFromStudentByNumber(number);if (number != null) {//修改操作if (name.length() > 0) {if (dbStudents.updateStudent(number, name, year,sex,birth,address,phone)) {Toast.makeText(AddStudentsActivity.this,"修改成功",Toast.LENGTH_LONG).show();setResult(2);showDeleteDialog2();}} else {Toast.makeText(AddStudentsActivity.this,"修改的内容不能为空
",Toast.LENGTH_LONG).show();}}if (TextUtils.isEmpty(name)) {Toast.makeText(AddStudentsActivity.this, "录入失败
请输入姓名", Toast.LENGTH_SHORT).show();} else if (TextUtils.isEmpty(number)) {Toast.makeText(AddStudentsActivity.this, "录入失败
请输入学号", Toast.LENGTH_SHORT).show();} else if (TextUtils.isEmpty(year)) {Toast.makeText(AddStudentsActivity.this, "录入失败
请输入年龄", Toast.LENGTH_SHORT).show();} else if (TextUtils.isEmpty(sex)) {Toast.makeText(AddStudentsActivity.this, "录入失败
请输入性别", Toast.LENGTH_SHORT).show();} else if (TextUtils.isEmpty(birth)) {Toast.makeText(AddStudentsActivity.this, "录入失败
请输入出生年月", Toast.LENGTH_SHORT).show();} else if (TextUtils.isEmpty(address)) {Toast.makeText(AddStudentsActivity.this, "录入失败
请输入地址", Toast.LENGTH_SHORT).show();} else if (TextUtils.isEmpty(phone)) {Toast.makeText(AddStudentsActivity.this, "录入失败
请输入电话", Toast.LENGTH_SHORT).show();}else if (studentsBeans != null){Toast.makeText(AddStudentsActivity.this, "学号重复", Toast.LENGTH_SHORT).show();}else {System.out.println("是否为空: "+dbStudents);dbStudents.insertStudents(number, name, year, sex, birth, address, phone);showDeleteDialog();}}}/ 修改提示框 /private void showDeleteDialog2() {final AlertDialog.Builder builder = new AlertDialog.Builder(this);builder.setTitle("修改成功提示").setMessage("已成功修改
").setPositiveButton("ok", new DialogInterface.OnClickListener() {@Overridepublic void onClick(DialogInterface dialog, int which) {Intent intent=new Intent(AddStudentsActivity.this,MainActivity.class);startActivity(intent);}});builder.create().show();}/ 保存提示框 /private void showDeleteDialog() {final AlertDialog.Builder builder = new AlertDialog.Builder(this);builder.setTitle("录入成功提示").setMessage("已成功录入
\n是否继续?").setPositiveButton("否", new DialogInterface.OnClickListener() {@Overridepublic void onClick(DialogInterface dialog, int which) {Intent intent=new Intent(AddStudentsActivity.this,MainActivity.class);startActivity(intent);}}).setNegativeButton("是", new DialogInterface.OnClickListener() {@Overridepublic void onClick(DialogInterface dialog, int which) {//将输入框清空EtNumber.setText("");EtName.setText("");EtYear.setText("");EtSex.setText("");EtBirth.setText("");EtAddress.setText("");EtPhone.setText("");}});builder.create().show();}DeleteStudentsActivity类:public class DeleteStudentsActivity extends AppCompatActivity {ListView listView;//列表List<StudentsBean> mData;//数据源Adapter_del adapter;//适配器DbStudents dbStudents;//数据库@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_delete_students);//控件绑定listView = findViewById(R.id.del_lv);dbStudents = new DbStudents(this);mData = new ArrayList<>();System.out.println("长度为:" + mData.size());//设置适配器:加载每一行数据到列表当中adapter = new Adapter_del(this, mData);listView.setAdapter(adapter);loadData();setLVClickListener();}/ listView长按事件/private void setLVClickListener() {listView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {@Overridepublic boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {StudentsBean studentsBean = mData.get(position);deleteItem(studentsBean);return false;}});}/ 长按删除 /private void deleteItem(final StudentsBean studentsBean) {final String delNumber = studentsBean.getNumber();AlertDialog.Builder builder = new AlertDialog.Builder(this);builder.setTitle("提示信息").setMessage("您确定要删除这条记录么?").setNegativeButton("取消", null).setPositiveButton("确定", new DialogInterface.OnClickListener() {@Overridepublic void onClick(DialogInterface dialog, int which) {DbStudents.deleteItemFromStudentByNumber(delNumber);mData.remove(studentsBean); //实时刷新,从数据源删除adapter.notifyDataSetChanged();}});builder.create().show();}/ 显示学生信息列表 /private void loadData() {List<StudentsBean> list = DbStudents.search();mData.clear();mData.addAll(list);adapter.notifyDataSetChanged();}/ 按钮点击事件 /public void onClick(View v) {switch (v.getId()) {case R.id.iv_back:Intent intent = new Intent(DeleteStudentsActivity.this, MainActivity.class);startActivity(intent);finish();break;}}DataSupper类public class Users extends DataSupport {private String name;private String password;private String email;private String addrs;private int age;private String sex;public Users ( String name, String password) {this.name = name;this.password = password;}public Users ( String name, String password,String email,String addrs,String sex,int age) {this.name = name;this.password = password;this.addrs = addrs;this.email = email;this.age = age;this.sex = sex;}public Users () {}public String get_name () {return name;}public String get_password () { return password; }public String get_email() {return email;}public int get_age(){ return age; }public String get_addrs(){ return addrs; }public String get_sex() { return sex; }public void set_name(String name) {this.name=name;}public void setPassword(String password) {this.password = password;}public void setEmail(String email) {this.email = email;}public void setAge(int age) {this.age = age;}public void setAddrs(String addrs) { this.addrs = addrs; }public void setSex(String sex) { this.sex = sex; }}MainActivity类:public class MainActivity extends AppCompatActivity implements View.OnClickListener{private Button btnAdd,btnSearch,btnMod,btnQuery,btnDelete,btnBack;//按钮:录入、浏览、修改、查询、删除、退出@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);//事件绑定btnAdd=findViewById(R.id.add_students);btnSearch=findViewById(R.id.search_students);btnMod=findViewById(R.id.mod_students);btnDelete=findViewById(R.id.delete_students);btnQuery=findViewById(R.id.query_students);btnBack=findViewById(R.id.btn_back);btnBack.setOnClickListener(this);btnQuery.setOnClickListener(this);btnDelete.setOnClickListener(this);btnMod.setOnClickListener(this);btnAdd.setOnClickListener(this);btnSearch.setOnClickListener(this);}/ 按钮点击事件 /@Overridepublic void onClick(View v) {switch (v.getId()){case R.id.add_students:Intent intent1=new Intent(MainActivity.this,AddStudentsActivity.class);startActivity(intent1);break;case R.id.search_students:Intent intent2=new Intent(MainActivity.this,SearchStudentsActivity.class);startActivity(intent2);break;case R.id.mod_students:Intent intent3=new Intent(MainActivity.this,ModStudentsActivity.class);startActivity(intent3);break;case R.id.query_students:Intent intent4=new Intent(MainActivity.this,QueryStudentsActivity.class);startActivity(intent4);break;case R.id.delete_students:Intent intent5=new Intent(MainActivity.this,DeleteStudentsActivity.class);startActivity(intent5);break;case R.id.btn_back:DigLogShow();break;}}/ 退出提示 /private void DigLogShow() {final AlertDialog.Builder builder = new AlertDialog.Builder(this);builder.setTitle("退出提示").setMessage("是否退出?").setPositiveButton("否", new DialogInterface.OnClickListener() {@Overridepublic void onClick(DialogInterface dialog, int which) {}}).setNegativeButton("是", new DialogInterface.OnClickListener() {@Overridepublic void onClick(DialogInterface dialog, int which) {Intent intent6=new Intent(MainActivity.this,LoginActivity.class);SharedPreferences sharedPreferences = getSharedPreferences("zidong", Context.MODE_PRIVATE);sharedPreferences.edit().clear().apply();Toast.makeText(MainActivity.this,"退出成功
",Toast.LENGTH_LONG).show();startActivity(intent6);}});builder.create().show();}}ModStudentSActivity类:public class ModStudentsActivity extends AppCompatActivity implements View.OnClickListener {ListView UpdateLv;//列表EditText EtNumber;//学号List<StudentsBean> mData;//数据源Adapter_update adapter;//适配器对象DbStudents dbStudents;//数据库@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_mod_students);//绑定事件UpdateLv = findViewById(R.id.update_lv);EtNumber = findViewById(R.id.et_update);mData = new ArrayList<>();adapter = new Adapter_update(this, mData);UpdateLv.setAdapter(adapter);//适配器列表显示dbStudents = new DbStudents(this);}/ 按钮点击事件 /@Overridepublic void onClick(View v) {switch (v.getId()) {case R.id.iv_back:Intent intent = new Intent(ModStudentsActivity.this, MainActivity.class);startActivity(intent);finish();break;case R.id.update_iv:String number = EtNumber.getText().toString().trim();StudentsBean studentsBeans = dbStudents.QueryFromStudentByNumber(number);//查询学号是否存在if (TextUtils.isEmpty(number)) {Toast.makeText(this, "请输入学号
", Toast.LENGTH_SHORT).show();} else if (studentsBeans == null) {Toast.makeText(this, "该学号不存在
", Toast.LENGTH_SHORT).show();} else {//开始搜索List<StudentsBean> list = DbStudents.getStudentListByNumber(number);//查询该学号的所有信息mData.clear();//将原来搜索的消息清除mData.addAll(list);adapter.notifyDataSetChanged();//实时更新initData();//修改信息函数break;}}}/ 修改信息点击事件,点击就会进入到修改页面进行修改 /private void initData() {dbStudents= new DbStudents(this); //创建数据库UpdateLv.setOnItemClickListener(new AdapterView.OnItemClickListener() {@Overridepublic void onItemClick(AdapterView<?> parent, View view, int position, long id){StudentsBean studentsBean = mData.get(position);Intent intent = new Intent(ModStudentsActivity.this,AddStudentsActivity.class);intent.putExtra("number", studentsBean.getNumber());intent.putExtra("name", studentsBean.getName());intent.putExtra("year", studentsBean.getYear());intent.putExtra("sex", studentsBean.getSex());intent.putExtra("birth", studentsBean.getBirth());intent.putExtra("address", studentsBean.getAddress());intent.putExtra("phone", studentsBean.getPhone());ModStudentsActivity.this.startActivityForResult(intent, 1);}});}}QueryStudentsActivity类:public class QueryStudentsActivity extends AppCompatActivity implements View.OnClickListener {ListView QueryLv;//列表EditText EtNumber, EtName;//输入框学号和姓名List<StudentsBean> mData;//数据源Adapter adapter;//适配器对象DbStudents dbStudents;//数据库@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_query_students);//绑定所有事件QueryLv = findViewById(R.id.query_lv);EtName = findViewById(R.id.et_name);EtNumber = findViewById(R.id.et_number);mData = new ArrayList<>();adapter = new Adapter(this, mData);QueryLv.setAdapter(adapter);dbStudents=new DbStudents(this);}/ 按钮点击事件 /@Overridepublic void onClick(View v) {switch (v.getId()) {case R.id.iv_back:Intent intent = new Intent(QueryStudentsActivity.this, MainActivity.class);//实现页面跳转startActivity(intent);finish();break;case R.id.iv_query:String number = EtNumber.getText().toString().trim();String name = EtName.getText().toString().trim();if (TextUtils.isEmpty(number)) {Toast.makeText(this, "请输入学号
", Toast.LENGTH_SHORT).show();} else if (TextUtils.isEmpty(name)) {Toast.makeText(this, "请输入姓名
", Toast.LENGTH_SHORT).show();} else {//开始搜索List<StudentsBean> list = DbStudents.getStudentListByNumberAndName(number,name);mData.clear();//将原来搜索的消息清除mData.addAll(list);//显示在列表上adapter.notifyDataSetChanged();//实时更新break;}}}SearchStudentsActivity类:public class SearchStudentsActivity extends AppCompatActivity implements View.OnClickListener {ImageButton BtnBack;//退出按钮ListView listView;//列表List<StudentsBean> mData;//数据源Adapter adapter;//适配器DbStudents dbStudents;//数据库@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_search_students);//绑定事件BtnBack = findViewById(R.id.btn_back);BtnBack.setOnClickListener(this);listView = findViewById(R.id.listView);dbStudents = new DbStudents(this);mData = new ArrayList<>();System.out.println("长度为:" + mData.size());//设置适配器:加载每一行数据到列表当中adapter = new Adapter(this, mData);listView.setAdapter(adapter);loadData();//显示学生信息列表函数}/ 显示学生信息列表/private void loadData() {List<StudentsBean> list = DbStudents.search();mData.clear();mData.addAll(list);adapter.notifyDataSetChanged();//实时更新}@Overridepublic void onClick(View v) {switch (v.getId()) {case R.id.btn_back:Intent intent = new Intent(SearchStudentsActivity.this, MainActivity.class);startActivity(intent);finish();break;}}}六、数据库设计七、总结这次的课程学习时间比较短,所以完成的项目也不算完美,基础比较差,到做项目的时候问题就全部出来了,所以我还需要继续努力学习
信息管理系统源码报告学生APP(学生项目学号请输入信息)
(图片来源网络,侵删)

联系我们

在线咨询:点击这里给我发消息