Sports Results Database
Write a program that acts as an online sports results database for all the results of a single player or team (eg a footballer or team for your favourite sport)
          class definition
 instance variables 
 constructors and other methods
 arrays of objects 
 searching method 
 useful comments, good indentation, good use of variable names
 file i/o
 objects can be updated with new values
 sorting method (not necessarily using index arrays)For example
       • Write a new class ‘result’ to represent player or team result objects. An object consists of (for example) the player or team name, the date of result and score. Your class definition should include an appropriate constructor method. A single entry can be entered by the user typing the details in and the entry can be printed out. 
• The program should be able to store an array of result objects. Each entry in the array will be a single object for a result. Add a menu of options including
o input a new entry from a keyboard
o print all the entries so far
o Quit
• Your result database should provide a search method that allows the title of a given result to be looked up in the array.  This should be an extra menu option. It should be part of a new “database” class rather than being part of the result class previously defined, ie it should be part of the class that instantiates the array of objects.

解决方案 »

  1.   

    此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
    楼主【handsome2t】截止到2008-07-01 22:36:26的历史汇总数据(不包括此帖):
    发帖的总数量:0                        发帖的总分数:0                        
    结贴的总数量:0                        结贴的总分数:0                        
    无满意结贴数:0                        无满意结贴分:0                        
    未结的帖子数:0                        未结的总分数:0                        
    结贴的百分比:---------------------结分的百分比:---------------------
    无满意结贴率:---------------------无满意结分率:---------------------
    如何结贴请参考这里:http://topic.csdn.net/u/20080501/09/ef7ba1b3-6466-49f6-9d92-36fe6d471dd1.html
      

  2.   

    帮你翻译一下,问题自己解决。Sports Results Database
    体育竞赛结果数据库Write a program that acts as an online sports results database for all the results of a single player or team (eg a footballer or team for your favourite sport)
    写一个在线体育竞赛结果数据库程序用作记录单人赛或团体赛(例如你喜欢的一个足球运动员或一支球队)的所有比赛结果。 class definition 类定义
     instance variables 实例域
     constructors and other methods 构造方法和其它方法
     arrays of objects 对像数组
     searching method 搜索方法
     useful comments, good indentation, good use of variable names
     有效的注释,适当的缩进,良好的变量名运用
     file i/o 文件输入/输出
     objects can be updated with new values
     对像能够用新的值更新
     sorting method (not necessarily using index arrays)
     排序方法(不必非得使用数组下标)For example 例如
    • Write a new class ‘result’ to represent player or team result objects. An object consists of (for example) the player or team name, the date of result and score. Your class definition should include an appropriate constructor method. A single entry can be entered by the user typing the details in and the entry can be printed out.
    写一个“result”类用来描述个人或团体的比赛结果对像。(例如)一个对像由个人或团体名字,比赛日期和比赛成绩构成。你的类定义应该包括一个恰当的构造方法。一个单一的条目能够由用户键入详细信息,并且条目应能被打印出来。
    • The program should be able to store an array of result objects. Each entry in the array will be a single object for a result. Add a menu of options including
    此程序应能存储一个比赛结果数组。每个数组元素将是一个表示比赛结果的单一对像。添加一个包含下列选项的菜单。
    o input a new entry from a keyboard 从键盘输入一个新条目
    o print all the entries so far 打印迄今为止的所有条目
    o Quit 退出
    • Your result database should provide a search method that allows the title of a given result to be looked up in the array.  This should be an extra menu option. It should be part of a new “database” class rather than being part of the result class previously defined, ie it should be part of the class that instantiates the array of objects.
    你的结果数据库应该提供一个搜索方法,它允许在数组中查找给定的结果标题。这应该作为一个附加菜单项。它将作为新的“database”类的一部分而不是先前定义的“result”类的一部分,也就是说它应该成为能访问对像数组的类的一部分。
      

  3.   

    另:题里虽然提到了 database 但根据要求并没有让你用数据库存储数据,而是用一个数组模拟,能用到 Swing 作带菜单的界面,另外还要写两个类,分别为 Result(用于装一次比赛的信息)和 Database(用于装 Result 集合并提供搜索功能)。
      

  4.   


    スポーツの結果をデータベースとして動作するプログラムを書くのオンラインデータベースを検索結果のすべてのスポーツの結果を、 1つのプレーヤーやチーム(例えば、あなたの好きなスポーツ選手やチーム)    クラスで定義されて
        インスタンス変数
        コンストラクタと、他の方法
        のオブジェクトの配列
        探索法
        有用なコメント、良いインデント、良い名前の変数を使用する
        ファイルI / O 
        オブジェクトを新しい値で更新できる
        並べ替えの方法(インデックスを使用して、必ずしも配列)例えば、• ここに新しいクラス'結果'を表現するプレーヤーやチームの結果オブジェクトです。構成するオブジェクト(たとえば)のプレーヤーやチーム名は、この評価を結果とスコアです。あなたのクラスで定義されては、コンストラクタには、適切なメソッドを使用します。の単一のエントリをユーザーが入力されるとのエントリの詳細を入力してプリントアウトできる。• できるはずのプログラムを格納するオブジェクトの配列を結果です。配列の各エントリには、 1つのオブジェクトをした結果です。を含む]メニューのオプションを追加するo 新しいエントリをキーボードから入力する
    o これまでのすべてのエントリを印刷する
    o 終了• あなたの結果のデータベースは、検索方法を提供することができるのタイトルを与えられた結果、配列を見上げました。これはエキストラ]メニューのオプションを選択します。ばならない部分が、新たに"データベース"クラスの一部としてではなく、その結果、以前は次のクラス定義されて、すなわちそれは部分のクラスをインスタンスのオブジェクトの配列です。以上是金山词霸翻译的,质量不保证(基本没法看),上面英文是本人人工翻译的。
      

  5.   

    其实我们高IT的人,遇到最多的问题就是数据存储。
    对于诸如database这样的字眼,大可将它理解为数据库或与之相关的东西(只要能满足当前存储需要就行),没必要把它出现的地方都跟“成熟数据库管理系统”扯上关系。
      

  6.   

    另:楼主注意,上面的 print 打印并不是真的叫你把数据用打印机打印出来,这里理解成显示可能更准确。
      

  7.   

    体育成果数据库
    编写程序的行为,作为一个网上体育成果数据库为所有的结果,一个单一的播放器或团队(如一名足球运动员或团队为您最喜爱的体育) 
              类定义
    的实例变量
    建设者和其他方法
    阵列的物体
    搜索方法
    有用的意见,良好的压痕,用好变数名称
    文件I / O 
    对象可以更新,新的价值观
    排序方法(不一定是使用指数阵列) 例如: 
           •写一类新的'结果' ,代表球员或球队的结果对象。 1对象构成的(例如)播放器或团队的名称,日期,结果和评分。您的类定义应包括一个适当的构造方法。单一项目,可以进入由用户输入的细节和文字可以打印出来。 
    •计划应该能够存储阵列的结果对象。每个条目在数组中,将一个单一的对象,结果。添加一个菜单选项,包括
    o投入新的项目从键盘
    o打印的所有作品,到目前为止, 
    o退出
    •您的结果,数据库应该提供一个搜索方法,使标题某一特定的结果,予以研究了在数组中。这应该是一个额外的菜单选项。应该的一部分,一个新的“数据库”一类,而不是被部分结果阶层先前定义,即它应该是一部分的类实例数组的物体。