File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes OO, Patterns, UML and Refactoring and the fly likes Class Diagram - How to model requirements  ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Class Diagram - How to model requirements  ??" Watch "Class Diagram - How to model requirements  ??" New topic
Author

Class Diagram - How to model requirements ??

Robin Davies
Ranch Hand

Joined: Dec 26, 2003
Posts: 64
I am having difficulty modelling the requirements below. I am trying to draw a class diagram. However, I find it hard to model this information in a correct way. Please could you suggest, how I could add classes, and relationships to complete the class model from the information presented below.
The following information was obtained from an interview with the Head of School.
(The system I am trying to design is a University Attendance System.)
There are 35 schools in the university in total each one has about 20 lecturers. The school of chemistry is fairly typical of all schools in the university and runs 2 postgraduate courses and 2 undergraduate degrees. Each student can be allocated to a particular year of a course. Each year of a course consists of a number of course units, which all students for that year have to take. A course unit is made up of a set of timetabled teaching sessions, each one being allocated to a University teaching room, and to an individual lecturer. A student will always have to submit several individual assessments for a particular course unit.
I have the following classes:
Schools Class
Courses Class (aggregation schools)
Course_Units Class (aggregation Courses)

User Super Class
Student Sub Class (INHERITS FROM USER)
Lecturer Sub Class (INHERITS FROM USER)


BSc, MSc
william kane
Ranch Hand

Joined: Nov 21, 2000
Posts: 260
Originally posted by Robin Davies:
I am having difficulty modelling the requirements below. I am trying to draw a class diagram. However, I find it hard to model this information in a correct way. Please could you suggest, how I could add classes, and relationships to complete the class model from the information presented below.
The following information was obtained from an interview with the Head of School.
(The system I am trying to design is a University Attendance System.)
There are 35 schools in the university in total each one has about 20 lecturers. The school of chemistry is fairly typical of all schools in the university and runs 2 postgraduate courses and 2 undergraduate degrees. Each student can be allocated to a particular year of a course. Each year of a course consists of a number of course units, which all students for that year have to take. A course unit is made up of a set of timetabled teaching sessions, each one being allocated to a University teaching room, and to an individual lecturer. A student will always have to submit several individual assessments for a particular course unit.
I have the following classes:
Schools Class
Courses Class (aggregation schools)
Course_Units Class (aggregation Courses)

User Super Class
Student Sub Class (INHERITS FROM USER)
Lecturer Sub Class (INHERITS FROM USER)

Before jumping to classes you need to figure out what information is of value to the attendence system you are trying to build.
I think you need get answers to questions like
At what level is the attendence calculated?Does the client want a daily attendence report?Does the client want the attendence at a course/teaching session level?
All in all you need to figure out exactly what the client wants from your system.You can document the same as use cases.
Hope that helps....


Help me!Help you!!!
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
I am having difficulty modelling the requirements below.
As indicated by the previous poster, that's largely because these are not really "requirements" at all, they are just a few notes about some of the data the system is supposed to hold. Major omissions include all the behaviour (as indicated previously) and any information about constraints or relationships between these data items.
As it happens, I have worked on a system to run a school/college attendance system, and if you are not careful you will have serious problems if you progress with the class model you are suggesting.
There are 35 schools in the university
OK. You have a "School" classs, but you don't mention any kind of "University" class. If you don't have one, how might you locate the collection of "School" objects?
in total each one has about 20 lecturers. The school of chemistry is fairly typical of all schools in the university and runs 2 postgraduate courses and 2 undergraduate degrees. Each student can be allocated to a particular year of a course.
Before you progress further, you need to ask some searching questions about overlaps. Would it ever be possible for one student to be allocated to more than one course? Would it ever be possible for a lecturer to also be a student (I'm both a Lecturer and a Student at the college where I teach, for example!) What might happen if a Student graduates and takes up a position as a Lecturer? What might happen if a Student decides to change courses? Is your system only intended to model the current situation, or should it keep some "history" of status changes, achievement dates, resubmissions etc.
Each year of a course consists of a number of course units, which all students for that year have to take. A course unit is made up of a set of timetabled teaching sessions, each one being allocated to a University teaching room, and to an individual lecturer. A student will always have to submit several individual assessments for a particular course unit.
The same kind of questions occur here. How many "units" might a student be taking at one time? Can a Lecturer teach more than one course at a time? Can a Lecturer teach courses from more than one School? How will the system track if Lecturer is "off sick" and a lesson is taken by another lecturer? Is the system intended to track indivisual student attendence at lessons? What happens if a lesson is cancelled? What happens for sessions only applicable to some students from a course (such as tutorials)? Can a lesson ever have more than one Lecturer associated with it? What about support staff, lab technicians, etc?
These are just a few of the questions which came into my head when I saw your "requirement". Before you attempt any kind of data model or class structure, I strongly suggest that you consider such questions, and think hard to find others I have not listed.
Good luck. Please keep us informed about your progress, and we'll try to help where we can.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Robin Davies
Ranch Hand

Joined: Dec 26, 2003
Posts: 64
Thanks for your advice, I will keep you posted as I progress.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Class Diagram - How to model requirements ??