首页 > > 详细

JAVA设计讲解、辅导JAVA编程设计、辅导data留学生 辅导R语言程序|讲解Python程序

JAVA Coursework (30 marks)
Suppose you need to process course information. You should design a
Course class, and Test class to handle course information.
1. Course class(20 marks)
The Course class should be able to create course, add and drop the student
name, scores, get the students and the number of students in a course, clear
all the students from a course, calculate average score and sort the average
score, and so on.
The Course class should include the following methods at least.
addStudent():
Function: add student and score
The array size should be automatically increased by creating a new larger
array and copy the contents of the current array to it when the arrays is full.
An exception will be thrown when score is negative and tip information is
displayed in caller.
dropStudent():
Function: drop student and score
The array contents should be automatically arranged when removing the
student from the course.
getAverage(): get each student average score
getSortStudent():get the sorted average score
setInformation():set the student information(name, score)
getNumberOfstudent: Return the number of students
getStudents(); Return to students
clear( ): Remove all students information from the course
toString(): override toString() to return course name, the number of
students, and created date.
compareTo(); override compareTo(), compare two course teaching hours,
return 1, 0,-1 when first one is bigger than, equal to, less than the second
one
2. Test class (10 marks)
Create 2 courses (Math, Physics), 3 students and scores for each courses as
shown below.
Math Physics
Jack 88 79
John 90 82
Mark 84 73
1. Print the all courses names, student name, and student score
2: Print each student average score
3. Sort each student average score and print them out
4. Set one student information and print updated student information
5. Drop one student and print updated student information
Assessment scheme
1: Implement and verify each method function
2: Good code structure: comments, identification, concise
Note
Java code can be named in your name(Pinyin)_ID .java format. Send me
your code before the deadline (June 16, 18.pm).

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!