-
Notifications
You must be signed in to change notification settings - Fork 2
Domain Model
-> Access Domain Model here
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec consectetur egestas nisi, id gravida neque interdum Fusce tellus leo, posuere in nibh a, tincidunt congue nisi. Quisque leo elit, dictum at mauris dignissim, volutpat laoreet tortor. Vivamus ut metus purus. Aenean et bibendum lorem, eget scelerisque nisl. Quisque eu pharetra turpis. Morbi porta ullamcorper tempor. Nam tincidunt euismod arcu, vel cursus sapien consequat id. Maecenas quis justo tincidunt, maximus ligula eget, accumsan enim. Pellentesque posuere ligula ut nulla dignissim imperdiet. Cras commodo in lacus vel sollicitudin. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce viverra nulla ac risus pretium consequat. Sed tempor bibendum nibh, at rhoncus lorem consequat
Key Decisions:
-
We make review an abstract class. When we are making the draft of the domain model, the tutor review and student review were two separate classes. We just simply connected tutor review to Tutor and student review to Student. But if the domain model were like that, the domain model will be too complicated. So we change the model. We create a new abstract class called Review and connected it to the User class because every user should have reviews. But different from student review, the tutor reviews should also have a rating. So, the Review class has one attribute called review and the tutor review class has one attribute called rating. The student review class doesn't have any attributes.
-
We make Availability a separate class. If the availability is an attribute in the Room and Tutor class, it will be too difficult to do the later coding. So we create an abstract class called availability. The only attribute in that class is availability, which is an array. There will be at most 12 hours a day and we divide it into 24 slots. Each slot stands for half an hour. There will be 120 elements in the array and each element is a Boolean. If the boolean is 1, it means that the room or the tutor is available in that half an hour.