Lab 2 - Requirements Specification, Modeling, Planning
During this homework you will produce a part of the SRS - Software Requirements Specification, the initial design of the Domain Model and create the project plan. In this lab, you will be working with the existing project from bitbucket. You will figure out what needs to be updated so that all the requirements are fulfilled.
First, you need to understand the existing project. You will not make any changes to the source code in this lab, but you will need to understand how the project is organized to plan how to address the requirements defined in the previous lab. Integrated Development Environments (IDEs), such as IntelliJ IDEA or Eclipse, usually facilitate developers' tasks such as inspecting existing projects.
JAVA and your favourite IDE (IntelliJ or Eclipse) should already be quite familiar to you from previous courses. During the next labs, your chosen IDE becomes your main development tool. You will keep your code in the already well-known Bitbucket repository. The same environment where you published analysis documents produced during the previous labs.
IDE Installation
Downloading and installing the required components:
- JAVA SE Development Kit 11 (LTS)
- Install your favorite IDE in case you have not already done it
- Eclipse. For labs, it is enough to have just an Eclipse IDE for Java Developers
- Do not forget to properly set the installed JDK as default JRE in Eclipse:
- Go to Window > Preferences > Java > Installed JREs > Add…
- Choose "Standard VM". Next, point the JRE home path to your JDK installation folder (for example, C:\Program Files\Java\jdk-11.0.4)
- Make your JDK the default environment
- Apply and Close
- Install the required Eclipse extensions:
- Gradle. This plugin is already included by default in Eclipse; however, make sure it is correctly installed. Go to Help > Eclipse Marketplace... > Type "Gradle" in the find box > check if "Buildship Gradle Integration 3.0" is installed
- Scene builder - This is not really an extension, but will be used with Eclipse. Set the path to Scene Builder in the Eclipse preferences window (Window > Preferences > JavaFX)
- Do not forget to properly set the installed JDK as default JRE in Eclipse:
- IntelliJ IDEA. Download it from https://www.jetbrains.com/idea/download
- We strongly recommend you to get the Ultimate edition of IntelliJ IDEA by getting an academic license https://www.jetbrains.com/student/
- IntelliJ IDEA should be already configured to work with JAVA 11. However, you can check it in the "Switch IDE Boot JDK" Window (Press Ctrl+Shift+A > Type "Switch IDE Boot JDK" > Enter)
- Gradle and JavaFX support should be already installed in both community and ultimate editions. However, you can check it in the Plugin settings window (File > Settings > Plugins)
- Scene builder - This is not really an extension, but will be used with IntelliJ IDEA. Set the path to Scene Builder in the Settings window (File > Settings > Languagues & Frameworks > JavaFX)
- Eclipse. For labs, it is enough to have just an Eclipse IDE for Java Developers
Once you have installed the IDE, you can then download the project and import it by choosing import as a Gradle project. This should create 3 projects: pos, SaleSystemCLI and SaleSystemGUI. SaleSystemCLI is the commandline interface, SaleSystemGUI the graphical interface and pos the core project that is used by both interface projects.
To run the project, open up the view Gradle Tasks. Then double click under the interface project you would like to run the task “run”. You will learn what gradle is and why we are using it in the next lab. For this lab being able to run the project should be enough. If you run into any problems ask your supervisor.
NB: If you decide to use IntelliJ IDEA, you may face a problem while you are running the CLI version of the POS System. In this case, remember that you can always run the POS System from the Command Line using the command gradlew :SaleSystemCLI:run
.
Requirements Specification
During the first homework, your team gathered functional requirements. Now, you need to choose 5 of them and create 5 use cases that cover the 5 chosen requirements. You must choose the most important business requirements. Each use case must have at least the following parts covered:
- Title
- Precondition
- Primary Actor
- Main Success Scenario
- Extensions - possible alternatives of the main success scenario
Note that we are asking for textual use case descriptions.
Produced use cases should be delivered by Bitbucket wiki. All use cases must have the same type of template.
Modeling
This is the first step towards the understanding of how to build your POS application. Till this point, we were focused on what functionality an application should support. As we will produce our POS application with an OOP language, we will practice modelling with domain model (model classes).
Since part of the application is already written, you will be able to use the code to generate a class model for the existing code. Once you understand the existing code, you just need to update it by adding new classes that will cover the requirements defined in the previous lab. The new classes (those are not in the existing source code) should be highlighted in the diagram with a different colour so your supervisor can identify your changes quickly.
To create a class model of the existing code, you can use a modelling tool.
- If you are using Eclipse, you might install the Amateras Modeler plugin (Help > Install new software… > Work with https://takezoe.github.io/amateras-update-site/ > check Amateras Modeler). To create a class model of the existing code you can create a new class diagram, and then drag-and-drop all the classes in the project into the class diagram.
- If you are using IntelliJ IDEA Ultimate, you might use the included UML support. See documentation.
- If you are using IntelliJ IDEA Community Edition, you should install another tool for creating UML diagrams since only the Ultimate version provides UML support. In this case, you might use StarUML with the Java plugin (Tools > Extension Manager > Search for “Java” > Install). Once you have installed them, you will be able to generate your model from Java source code (Tools > Java > Reverse Code…)
The POS project consists of 3 modules: the core, SaleSystemGUI, and SaleSystemCLI. All these modules should be represented in one class diagram. Your task is to analyse the class diagram and determine how it has to be updated so that all the functional requirements could be met.
How to Model?
- List class candidates
- Add them to the class diagram
- Add links
- Add attributes
- Add methods/operations
Note: In a Domain Model methods/operations are not needed; however, since you generate part of the model from existing code, for that part you should show the (most important) methods.
How to Find Classes?
- Previous experience
- Go through all requirements and finding there nouns (bill, payment, customer, ...)
- Categorize classes based on the domain
- Physical objects (cash register, ...)
- Specifications (product, ...)
- Locations (store, ...)
- Transactions (order, ...)
- Roles (cashier, ...)
How to Find Links?
- Previous experience
- Categorizing
- A is B's physical part (CashDrawer – CashRegister, ...)
- A is B's logical part (BillRow – Bill, ...)
- A is physically inside B (CashRegister – Store, ...)
- A belongs to B during some transaction or report (OrderedProduct - Order, ...)
- A is B's member (StoreManager - Store, ...)
- A uses/manages B (Cashier – POSTerminal, ...)
Model Submission
The domain model shall be delivered as a class diagram in image file format (jpg, png or gif) or PDF. You can embed the image in your project wiki. The domain model must contain classes, links between classes (associations), class attributes (with attribute type specified - like String, Int, Date,..) and methods.
Planning
At this point, your team has produced and analyzed a lot of requirements (user stories) and can proceed to the next step - initial project plan. Since part of the application is already developed, you should now run the application to see which parts of the functional requirements are not yet implemented. Tasks needed to implement the missing requirements should be listed in the project plan. In addition, you should include in the plan those tasks needed to test the software such as writing unit test cases. You should regard this project plan as the actual plan that you are going to fulfil in the next labs.
Your initial project plan must be composed of three main aspects, dividing your work into the following three releases:
- Functionality needed for the first stage: creating the team and warehouse tab. (Lab 3).
- Functionality needed for the application to perform as required with the exception that data does not have to persist closing and reopening the application - i.e. no database support yet needed (Lab 4).
- Functionality needed for database integration (Lab 5).
Listed parts of your work/development must be added as tasks to your project. Tasks are small and simple pieces of work needed to achieve the aims described in the requirement. Each of the requirements will need a bunch of the smaller tasks needed to satisfy it. In other words, you should divide the work behind each of the requirements into smaller meaningful and independent tasks. Remember that the functionality has also to be tested; thus, the work behind the requirements also includes testing tasks. Each task must have at least the following parts:
- Description (what must be done) in the title
- Effort Estimation (in person-hours)
- Assignee
- Priority
- Release as milestone
You need to divide your tasks between your team members. You need to cover all unimplemented requirements for your application and assign priorities based on at least the following priority classes (if you wish you can add more classes):
- Major - Really essential
- Minor - Nice to have
You should keep track of each person's allocated time, as this should be reasonable for each homework.
Keep track of your plan by using a tool
To support the management of the requirements and tasks of your project, you can choose one of two options:
- (1) using the Bitbucket issue tracker. This is a issue tracker that is already integrated into Bitbucket and offers basic functionally.
- (2) using Jira Issues (Jira Cloud). This is probably the best option if you succeed in enabling the Jira issues integration during the first lab.
Based on your choice, here are some instructions on how you can use the tools to create and manage your plan:
(1) Using the Bitbucket issue tracker:
- To add an issue tracker to your Bitbucket repo, go to Settings > "Issue Tracker Settings" > Choose “Private issue tracker”
- To create tasks, create issue reports of type "task" containing the required information.
- To set up releases, go to Milestones and add releases as milestones (Lab3, Lab4 and Lab5).
When creating tasks, if you have used Bitbucket wiki pages to write your user stories, you should add the task number next to the functional requirement in the Bitbucket wiki as “#<task number>”. This lets Bitbucket link all tasks to functional requirements and you can easily keep track of which functional requirements have been implemented.
(2) Using Jira Issues (Jira Cloud)
If you enabled the integration of Bitbucket with Jira Issues (Jira Cloud) during the first lab, your project has an assigned domain such as [domain].atlassian.net, where [domain] is the name you chose. The interface of Jira offers several ways to create tasks, but here is some guidance:
- To create tasks, go to your project site (domain.atlassian.net) and select your project. Then, click on the story where the task you are creating belongs to. In the details of the user story, scroll down to the section "Sub-tasks" and click on "create Sub-Task". Here is image with the steps. Complete the required information.
- To set up the releases, you can simply add a label with the corresponding name, for example, "Lab3"
You should cover all the missing requirements with at least 50 tasks!
Summary
Your team must submit the results of the following tasks:
- Use case descriptions (specifications) for at least 5 important requirements (2p)
- Class diagram (use the suggested modelling tools to generate the class model and update it) (4p)
- Tasks in the Bitbucket issue tracker or Jira issues (Jira Cloud) with links to the requirements (user stories). At least 50 tasks are expected, including both development and testing tasks (4p)
Detailed instructions for the three listed tasks are provided in the sections above.
You also need to add a link to the second homework solutions to the project readme page. This is considered as a homework submission.
NOTE: In the assessment/consultation lab you must be able to show partial solutions of all tasks.