0

Java programming

How to write an application that assigns course to students based on year or semester.

6th Apr 2018, 4:44 PM
Tewodros Worku Dargie
2 odpowiedzi
+ 2
After looking at your profile, I'd recommend that you finish learning Java and SQL. Considering you'll be dealing with a bunch of students and courses, a database is appropriate here. As well, it'll make it much easier to compare data and then generate a course to store for the student, based upon the comparison we'll make between the student and courses available for their particular year/semester. You could even take it as far as keeping track of the courses they've taken so you're not assigning an already taken course to them, etc... As Tashi said though, we need more specifics on what you're trying to do and the specifications/rules/requirements that go along with it all. For example, are the pre-reqs to take a course? If so, you don't want to include it in the listing unless the student has already taken the pre-req. Is a course ONLY offered during a particular semester? etc... You get the idea. Anyways, I still recommend that you finish going through Java and SQL so you have a better understanding of all this, as well as the means to achieve your goal.
6th Apr 2018, 5:42 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 10
Hard to say with that few information... But you need at least two classes, Student and Course and need a 1:n relation (one student can have multiple courses). The Course class needs a field for the semester in which it has to be assigned and the Student class a field for the current semester of the student. I'd stream the courses and then map it by matching year/semester to the students. But a simply switch/case statement can manage the mapping/assigning as well.
6th Apr 2018, 5:20 PM
Tashi N
Tashi N - avatar