首页 > > 详细

辅导data编程、辅导Java程序、辅导Java编程设计辅导留学生Processing|调试Matlab程序

May 7, 2021
1. revised description of Student.courseExist()
to check whether the course is already in schedule or not. Since a student cannot select 2 courses
with the same code, name and type. If there is already a course with the same code, name and
type in the student's schedule as the parameters given, it returns true. Otherwise, it returns
false.
2. add some getter and setter methods into classes already used in test cases.
Building.setRooms
Building.getRooms
Course.setTime
Course.setType
Course.getStudents
May 6, 2021
1. revised interface name changeCourse() in CourseOperator . The method in class student
and teacher is correct before.
2. revised description of public method Student.changeCourse() implements the interface
A student could change a new course with different time or teacher but with the same course
code and type. Both with the same or different teachers are OK. Both with the same or different
classrooms are OK. If it returns true, the old course would be deleted from the student's
schedule. And the new course would be added to the schedule. The student should also be
deleted from the student list of the old course and added to the new course. If there is not an
available course for the student to choose at the time, it returns false and does not change the
schedule.
3. some typing and grammar errors in description.
May 5, 2021
1. revised error messages of Classroom.addCourse() if more than 1 error( May 5) :
boolean changeCourse( Course oldCourse1 , Course newCourse2 );
// to change oldCourse1 to newCourse2 and update the schedules.
public boolean changeCourse( Course oldCourse1 , Course newCourse2 )
Return messages are as follows:
OK: Adding course to classroom success.
ERROR: Another course already exists at the time.
ERROR: Course type not same as classroom.
ERROR: Not enough seats in the classroom for this course.
If there are more than 2 errors to add a course to a classroom at the time, it will show only 1 error
message at the order above.
2. revised description of Course.getAbbrevName()( May 5)
getAbbrevName() should get the abbreviation of the course name if it has been set. But if is
empty, it will be automatically generated by every first character in caption of each word in course
name, except some words like to, of, the, in,and. For example, getAbbrevName() of the course
"Introduction to Computer Programming A" returns "ICPA" if the AbbrevName is not set
before. It will return "JavaA" if it have been set as setAbbrevName("JavaA").
3. revised description of Teacher.getFreeClassroom()( May 5)
to the get available classrooms from the classroom list in Db.buildings. According to the teacher's
prefer location and it returns only the classrooms in the prefer location. If there is no available
classrooms in prefer location. It returns classrooms in other locations. It returns an empty list if
there isn't any available classroom for the course.
4. LocalJude.java, Db.java updates according to this document.(May 5)
Problems:
Problem 1: Design a class named Building and some basic enum structures and simple
classes
Problem 2: Design a class named Classroom
Problem 3: Design a class named Course
Problem 4: Design a class named Teacher inheriting Person implements CourseOperator
interface
Problem 5: Design a class named Student inheriting Person implements CourseOperator
interface
Notice:
1. There have been some static ArrayList of students, teachers, building and courses to
initiate some basic data in a class Db provided for you. There are also classes
CourseTime and interface CourseOperator already for you. Of course, it needs
invoke some methods you should finish. You can design more classes and more
methods in classes if you need, and submit them all together.
2. It is not necessary to consider data consistency in the class above except for those
mentioned in description below. For example, a teacher could drop a course while not
public String addCourse(Course course){}
checking whether some students have selected this course. It should be used before
students to select course.
3. There is also a junit test file for you to test the classes above you need finish. Most but
not all method would be tested in the test cases.
4. You should strictly write the class with the same names, attributes and methods with
no package in source codes.
It is a simple educational administration system for the teachers and students to arrange classes
. It should have at least the following functions:
1. The teachers can use this system to arrange their courses, such as choosing the time and the
location of the class he teaches before new semester.
2. The students can use this system to choose their courses they want to take and drop the
class they don’t like.
3. The system can print the classes schedule of a teacher, a student and a classroom.
Problem 1: Design a class named Building.
The class Building should have the following attributes.
The Class Building should have the following methods:
1. Constructor with location, id or with no argument
2. some getter and setter methods
3. public method addRoom(Classroom classroom), deleteRoom(Classroom classroom)
To add or delete a classroom to the building. Since there is a reference attribute of Building of
Classroom, it will be added or deleted successfully if they are the same building. Otherwise, it
would return false. It returns false if to delete a classroom not in the building.
4. override method toString()
private List rooms;
private Location location;
private int id;
public Building( )
public Building( Location location , int id )
public Location getLocation() {}
public void setLocation( Location location ) {}
public int getId() {}
public void setId( int number ) {}
public List getRooms() {}
public void setRooms( List rooms ) {}
public boolean addRoom( Classroom room ) {}
public boolean deleteRoom( Classroom room ) {}
to get the building location name and id. For example, Building 6 of LycheePark should be
LP#6
and Building 2 of TeachingBuilding should be
TB#2
Other basic Enum types and classes.
1. Enum type of Location with values of LycheePark, TeachingBuilding
2. Enum type of CourseType with values of Lecture, Lab
3. enum type of Day with values of Monday, Tuesday, Wednesday, Thursday, Friday,
Saturday, Sunday
4. design an abstract class named Person with attributes and constructor
The schedule is used to store the courses at any CourseTime in a week. You might use some of
the codes with HashMap below. And you might get more details from books and internet.
5. A class named CourseTime with attributes, constructor and override method of equals() and
hashCode() is already provided.
String id;
String name;
Map

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

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