Home > Back-end >  This how do ah, ask each dalao
This how do ah, ask each dalao

Time:09-22

Design simple student elective system, the requirements are as follows:
(1) students need to have a student id, name, age, gender and course information,
(2) teachers need to have job number, name, age, gender and the courses of information,
(3) a student can take up to 5 courses, you can view all their elective courses, can cancel take a particular course,
(4) a teacher teaching can not exceed 3 door, can see his teaching of all courses, taught a course can cancel,
(5) to view each course of teacher and student elective courses,

Requirements are as follows:
(1) analysis of requirements, design, the classes required to use inheritance, combination, such as knowledge,
Tip: you can use ArrayList linked lists to store the students choose course, teachers teach and students of a certain course list,
(2) write a test class to test students' course selection system,
(3) draw a UML class diagram

CodePudding user response:

no

CodePudding user response:

Just provide the train of thought, still need you to complete the specific
 
/* * personnel parent */
Public abstract class Person {
/* *
* attributes: the identity (student id/job number), name, age, gender,
*/


/* * methods: course information */
The abstract List fetchSubjects (String id);

}
Students/* * */
Public class Student extends the Person {}
Teacher/* * */
Public class the Teacher extends the Person {}

/* * */
Public class Subject {

/* */* * attributes: course information

Methods:/* * get course belongs to the teacher or a student list * */


}


CodePudding user response:

How to break the QAQ
  • Related