Assignments and self-evaluation
Description and self evaluation of assignments (Mid-module and System Implementation).
Description and self evaluation of assignments (Mid-module and System Implementation).
In my mid-of module assignment I did my best to create a system design for self-checkouts, however I made a few mistakes that makes my proposal inefficient. These gaps in my implementation are as follow:
1) I did not provide multiplicities for all relationships, basically between Staff and Product Classes.
2) Staff should not have subclasses. I reckon it was not necessary and I would remove Salesman subclass.
3) Moreover, I misunderstood the idea of staff and warehouse. These two classes should be separated, because they have different tasks in this system design. The thing I confused in my proposal was creating classes for different type of employees who work in the supermarket (Warehouse subclass). I should have focused on proper implementation of actions and data management rather than finding correlations between real employees and potential classes that would represent them.
4) It was pointed me out that Order class is composed of two subclasses rather than of superclass Product. And this comment is justified, because it simplifies the code, and it is obvious if Parent class is associated to Order class, so do subclasses.
I think I did a good job in creating proper methods that could be used to implement good software solution for making, editing and completing order with additional options like paying by different methods, collecting loyalty points or checking the age limit if prohibited products are purchased. Around Order Class I successfully described relationships and I applied encapsulation approach (with private and public variables) where it was necessary.
In my system implementation, I successfully applied object oriented programming to create a working script for booking appointments for a surgery. The main features are as follow:
a) I created all required classes with relationships that were shown on the class diagram.
b) I used variety of OOP approaches like: Inheritance, Polymorphism (f.i. magic methods), variety of class methods (including static methods).
c) I made testing script using built-in Python unittest library.
d) I added some changes that I described in My README file about system design to be able among the others implement find_next_available() method.
e) I used PEP8 style in my code.
f) for simple actions like sorting I used a python built-in method. For complex task like in find_next_available() method, I create my own algorithm.
Improvements that might have been made:
a) I could have used Method Overwriting for the graphical representation of objects in HealthcareProfessional Class to simplify my code.
b) Lack of experience may be seen in coding style. Many statements or logic in my code might have been written easier.
c) Some changes that I have applied in the system design, made my code more complicated (like in find_next_available() method). However, I still believe that without this particular change, I could not provide a working method in this case.
Learning outcomes:
1) Class Diagram are very useful to create the script. I had guidelines that I follow and a bright vision how the system should work.
2) I experienced in practice relationships between classes and how they look form inside of classes at the programming level.
3) I used variety of OOP features in practice.
4) For the first time, I could test my code by writing tests to follow any gaps and inconsistency in my code.