帮忙看看这题

handsome2t handsome2t 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区


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.


...全文

相关推荐

评论 23
收藏 已收藏
分享
返回顶部
handsome2t
Java SE 62,620 成员 307,251 内容