朋友求助的一个JAVA题目,偶也是不懂的,只能拿来请教各位了,先在此谢过. ^_^
/******************************************************/
Objectives
In  this  assignment,  you  will  gain  experience  performing  the  phases  of  the  software  development  process  while  developing  an  object-oriented  program.  Additionally,  this  assignment  gives  you  the  opportunity  to  further  hone  your  skills  at  building  classes,  manipulating  objects  in  a  Java  program,  and  using  exception  handling.  Furthermore,  in  this  assignment,  you  will  learn  to  use  various  I/O  Java  mechanisms.  
________________________________________
Problem  Statement问题说明
In  this  assignment,  you  are  to  build  a  Student  Management  Application.  
作业中,构建学生管理应用程序
Our  Application  must  allow  the  user  to  perform  the  following  actions:  
本应用必须用户完成一下操作:
" Add  a  student,  增加学生
" modify  any  of  the  information  related  to  this  student  (Except  student  ID),  
" 修改与这个学生相关的任何信息(除了学生ID)
" delete  a  student,  删除学生
" display  all  the    students  (display  only  student  ID  and  student  full  name)    in  alphabetical  order  of  students'  last  name,  
" 显示所有的学生(仅显示学生的ID和全名),用学生姓的字母顺序
" select  a  student  (by  specifying  the  student  ID),  and  display  all  the  information  about  the  student.  
" 选中一个学生(用学生的ID),并显示他的所有信息。
An  student  object  holds  the  following  information  about  this  book:  
一个学生目标包括一下信息
" Student  ID  学生ID
" student's  last  name  姓
" student's  first  name  名
" number  of  years  being  a  student.  几年级的学生
" Whether  the  student  is  Canadian  or  not.  是否在加拿大
" list  of  courses  taken  and  the  grade  received  for  each.  所学过的课程和得到的成绩(用A,B,C级)
" Average.  平均分
________________________________________
Specific  Requirements特殊要求
In  creating  your  application,  you  must  satisfy  the  following  requirements:  
创造你的应用程序时,你必须满足以下要求:
" You  must  have  a  class  called  Resource  (Resource.)  as  part  of  your  application  for  student  objects.  
" 你必须有一个类叫做RESOURCE,作为你程序的一部分
" You  must  use  array(s)  only  (no  vectors,  no  linked  lists,  no  nothing  that  is  not  an  array).  你必须用只能用数组(不能用向量,连接的表格,任何不是数组的东西。)
" When  your  data  collection  is  full,  your  program  must  expand  it  in  a  transparent  fashion.  This  is  to  say  that  it  cannot  notify  the  user  that  the  student  registery  is  full  nor  must  it  prevent  the  user  from  adding  more  students.  Instead,  when  your  application  senses  that  the  data  collection  has  reached  its  maximum  capacity,  it  must  first  expand  it,  and  this  expansion  must  be  unbeknown  to  the  user,  then  it  must  store  the  new  library  resource  the  user  is  creating  into  the  newly  expanded  data  collection.  当你的数据满了,你的程序必须能以明晰的方式扩展它。即是说你不能通知用户学生登记簿已满或它必须防止用户增加更多的学生。取代的做法,当你的应用感觉到数据收集已达到它的最大容量,它必须先扩充它,这个扩充对用户而言是完全不知道的,然后它必须保存这个新的资源到数据收集中。
" Duplicated  last  names  are  allowed.  Make  sure  your  application  orders  them  properly.  For  example:  Anita  Lee  must  be  displayed  before  Yvan  Lee.  
" 复制姓是容许的。要确认你的应用中排序是正确的。Anita  Lee必须显示在Yvan  Lee的前面。
" The  operation  of  displaying  all  the  students,  in  alphabetical  order  of  student's  last  name,  should  perform  in  O(n).  (n  is  the  number  of  students  stored  in  the  system.)  
" 显示所有学生的操作,  以姓的字母顺序,应该用O(n)完成(n是学生存与系统中的数字)
" Your    application  (simplified  version)  must  store  its  data  in  a  file  at  shutdown  and  read  the  information  at  start-up.  Do  not  forget  to  ask  the  user  whether  or  not  s/he  wants  to  save  the  data  before  your  application  does  so  (i.e.,  saves  the  data).  
" 你的应用程序(简单版)必须在关机时保存它的数据在一个文件中并能在开机时读到它。不要忘记在你的应用程序这样做的时候问用户是否要保存数据。
" Don't  forget  to  handle  different  kind  of  errors,  eg.  inserting  into  full  array,  deleting  from  empty  array,  invalid  input,  etc.  
" 不要忘记去处理不同的错误,如:插入满的数组,删除空数组,无效的输入等。
" For  Java  programmers:  You  must  name  your  application  class  (the  class  with  the  main  method)  SMA.java.  The  reason  for  this  is  that  it  will  be  easier  for  the  er  to  execute  your  application.  S/he  will  simply  need  to  type  this  command  in  order  to  execute  your  Library  Management  Application:  
java  SMA

解决方案 »

  1.   

    up.
    it's not difficult, but at least cost half an hour to finish .
      

  2.   

    这个问题应该不难。一个文件保存所有学生信息,学生的各项信息以空格间隔,文件的第一行保存一个学生人数,这样每次读取后就知道分配多大的数组了。主要难点是只能用数组,其实可以用2个相同大小的数组来模拟一个列表,一个数组记录数据,另外一个数组来记录指针。每次删除,插入,修改都要涉及数组的重新排列。关于数组的expand,分配一个更大的数组然后复制原来数组就可以了。
      

  3.   

    sheat...what the fucking brain of the  babies..
      

  4.   

    写一个javabean,在写个静态的ArrayList用来放javabean,application操作静态的ArrayList来完成相应的操作
      

  5.   


    典型的没看清问题
    说明中就写了不允许用list,只能用array
    lz自行解决,上面有位说了思路