Pardon the title, it's a bit hard to properly explain what I need help with, but I'll give it a go.
I'm working on a Java project, an order management application. I've got several classes for the different types of functionalities in the application, e.g. an Order class, a Client class, a Task class, etc. Each of these tasks have methods that pertain to the things they do, e.g. the Order class has a method called newOrder()
- you get the point.
There's been a change now and I need to add something new to the application: there's supposed to be three different types of accounts from which you can access the application: Admin, Project Manager or Developer. Each of these accounts will have different types of access to the functionalities of the application. Admins and project managers will have similar levels of acccess, but the developers will only have access to projects (orders) where they have been given access by an admin.
I'm in the stage where I'm drawing up the UML diagram for this and I'm really struggling with how I'm supposed to visualise this. My first thought was to create a User class and three subclasses (Admin, Project Manager & Developer) that all extend to the User class. Each of those three classes will include the methods for what they're allowed to do, e.g. the Admin and the Project Manager classes will have the method newOrder()
but the Developer class won't have that.
I'm sure you can tell that I'm quite new at this, but any help you can give me at this point is very appreciated!
This is base of OOP thinking. You have already identified the required Objects and verge of identifying Properties and Actions. You need to get the requirement right from different sources then identify the possible actions for Developer, PM & Admin object(Actor). Now, of course, set of common actions can be moved to User (Parent).
I feel , your thinking is going right direction, just need to get more clarity on requirement to identify right set of actions which will turn into series of methods.
Steps of doing UML Design could be ...
Note, start with Simple and minimum detailing then, evolve from there. You are on right track already.