找回密码
 立即注册
搜索
查看: 2047|回复: 3

JAVA限时作业...

[复制链接]
发表于 2009-5-25 12:16 | 显示全部楼层 |阅读模式
CPSC 1181, Assignment 2  

Objectives
1.        Designing Classes and Objects
2.        ArraysList

Requirements
Develop a program named XYCollegeTest that stores its students’ information. The program will support the following operations:
        Adding new student to the XYCollege,
        Looking up for an existing student,
        Adding a Quiz score
        Finding a student with the highest quiz average.
        Deleting students from XYCollege.


Notes:
•        When you quit from the program you loose all the data stored in the XYCollege
•        You should create the following three classes:
o        Use the Student class you created for your assignment 2. Each Student object stores the name, student number, address, and total quiz score.
You may need to modify the Student public interface.
o        The XYCollege class with the list of all students (an ArrayList of Student objects).
o        The XYCollegeTest class with the main method which creates a XYCollege object and manipulates (adds Student objects, deletes Student objects, etc.) the XYCollege based on user input.

•        You should do appropriate error checking and display appropriate error message for wrong data entered by the user. For example:
o        Check if the user enters a valid commands
o        Check if the Student number entered is valid (8 digit number).

Here is a sample of what the user will see on the screen:

附件是做好的部分..


这个应该是运行的时候应该出现的样子

XYCollege directory commands:
                add – Add a new Student
                find– Find a Student
                addQuiz – Add a quiz score for a student
                findHighest – Find a students with highest quiz score
                delete – Delete a Student
                quit – Quit

        Enter a command: add
        Enter Student’s name: Abernathy, C.
        Enter Student’s number: 10010123
        Enter Student’s addres: 100 West 49 Ave.
        A Student added to the XYCollege directory.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
回复

使用道具 举报

发表于 2009-5-25 16:32 | 显示全部楼层
大一学的。。。。不知道这个ArrayList是不是LZ你们学的ArrayList...ADT的话叫这名也可以有很多种implementation

直接有现成code,5分钟简单改了下。。。class和method的名字什么的自己改吧,有这个做基础剩下的都很简单了

还有,随便扫了几眼LZ你的code有些syntax的小错误。。

[ 本帖最后由 残酷的天使 于 2009-5-25 16:36 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
回复

使用道具 举报

发表于 2009-5-25 16:42 | 显示全部楼层
http://www.langara.bc.ca/science ... urses.html#CPSC1181

我无聊了一下,是这个么。。
回复

使用道具 举报

发表于 2009-5-25 17:45 | 显示全部楼层
求代码不要紧,但拿到后自己要看懂哦


[ 本帖最后由 红钢怨狱 于 2009-5-25 21:10 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|上海互联网违法和不良信息举报中心|网上有害信息举报专区|962110 反电信诈骗|举报电话 021-62035905|Stage1st ( 沪ICP备13020230号-1|沪公网安备 31010702007642号 )

GMT+8, 2025-9-20 06:10 , Processed in 0.031132 second(s), 7 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表