Design: Design patterns used, Conformance to SOLID, Class Diagram - Tonio-KhAn/Academic-Advisor GitHub Wiki

Design

app

link to javaDoc

link

Design patterns used

Composite pattern

The composite pattern was used to define the students and also the courses. With this pattern we were able to create list of students and easily add students to the list. This was the same for the course as we made a list of courses and was able to easily add them.

Command pattern

The command design pattern can be seen in many places throughout the code one of these places is the FileAdder operation now this pattern allows a coder to easily switch out the type of file and add a new class for adding files

Conformance to SOLID

Single Responsibility

Each class is only given responsibilities which is relevant to it self. GetRecomendation only does one thing which is get recommendations, while get courses only get courses and the file adder only adds a file to the system. This can also be seen in the System class where it only has methods to update itself. The IndividualStudent Class and IndividualCourse Class also follows this principle as they are given no extra responsibilities. Open/Closed Principle This principle can be seen being followed at the FileAdder Class as this class is closed for modification but is open for modification and allows a coder to simply and a new class to read in a new type of class once it extends FileAdder.

Dependency Inversion Principle

this principle was followed with the FileAdder Class as the lower level abstractions were separated into CourseFileAdder and StudentFileAdder

Class Diagram

classd link to full size diagram