毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 课程设计 >> 正文

java学生信息管理系统设计报告 第4页

更新时间:2008-9-5:  来源:毕业论文

java学生信息管理系统设计报告 第4页

       public static void mod()

       { 

              int j,k;

              try

              {转发请注明源于www.751com.cn

                     System.out.print("请输入学生姓名");

                     while(true)

                     {

                            BufferedReader Console=new BufferedReader(new InputStreamReader(System.in));

                            s_name=Console.readLine();

                            for(i=1;i<=n;i++)

                            if((st[i].name).equals(s_name)==true)

                            {

                                   j=i; 

                                   if(show(j))

                                   {

                                          System.out.print("确认修改?(y/n");

                                          while(true)

                                          {

                                                 s=Console.readLine();

                                                 if(!s.equals("y")  && !s.equals("n"))

                                                 {

                                                        System.out.print("有错,请重新输入");

                                                 }

                                                 if(s.equals("n"))

                                                 {

                                                        break;

                                                 }

                                                 else if(s.equals("y"))

                                                 {  

                                                        System.out.println("当前学号为:"+st[i].num+",更改为:");

                                                        k=Integer.parseInt(Console.readLine());

                                                        st[i].num=k;

                                                        System.out.println("当前姓名为:"+st[i].name+",更改为:");

                                                        s=Console.readLine();

                                                        st[i].name=s;

                                                        System.out.println("当前成绩为:"+st[i].score+",更改为:");

                                                        k=Integer.parseInt(Console.readLine());

                                                        st[i].score=k;

                                                        System.out.println("当前性别为:"+st[i].sex+",更改为:");

                                                        s=Console.readLine();

                                                        st[i].sex=s;

                                                        System.out.println("当前籍贯为:"+st[i].born_place+",更改为:");

                                                        s=Console.readLine();

                                                        st[i].born_place=s;

                                                        System.out.print("修改成功\n");

                                                        break;

                                                 }

                                          }

                                          break;

                                   }

                                   else

                                   {

                                          System.out.print("你输入的姓名不存在,请重新输入:");

                                   }

                            }

                            break;

                     }

              }

              catch(Exception e)

              {

                     System.out.print("错误");

              }

       }

/*=============================================================================================================================*/

/**********************************************************信息排序*************************************************************/

/*=============================================================================================================================*/

 

       public static void Sort_by_num() /*按成绩排序*/

       {

              Student stu;

              String a;

              int m,k;

              while(true)

              {

                     for(i=1;i<=n;i++)

                     {

                            for(m=1;m<=n-i;m++)

                            {

                                    if(st[m+1].score-st[m].score>0)

                                   { 转发请注明源于www.751com.cn

                                          k=st[m+1].num;

                                          st[m+1].num=st[m].num;

                                          st[m].num=k;

                                          a=st[m+1].name;

                                          st[m;

                                          st[m+1].born_place=st[m].born_place;

                                          st[m].born_place=a;

                                          k=st[m+1].score;

                                          st[m+1].score=st[m].score;

                                          st[m].score=k;

                                          a=st[m+1].sex;

                                          st[m+1].sex=st[m].sex;

                                          st[m].sex=a;

                                   }

                            } 

                            show(m);

                     }

              break;

              }

       }

}

五、运行结果

首先运行程序,得到如下界面

然后输入10个人的档案(最多可输入80人的档案);

返回主界面;然后选择2显示所有的档案
然后选择3,删除一个档案

再看一下显示
查询修改信息:按成绩排序最后选择0可以退出

辣、设计的心得体会

通过这次课程设计,我深感程序语言的复杂与精深,同时也极大的提高了我对于程序语言的兴趣。从这次设计中我也有了很多新的体会,对于java程序语言的使用也进一步熟悉了。虽然没有达到预期的要求,但是这对于我来说仍然是一个极大的进步。因为我通过这次设计认识到了自己的不足,学习到了很多新的知识,并且独立的完成了设计,对我来说是个极大的鼓励。同时感谢崔老师的教导以及认真负责的态度,这也是我这次设计主要的动力之一。

上一页  [1] [2] [3] [4] 

java学生信息管理系统设计报告 第4页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。