project requirements analysis

Introduction

In the previous tutorial, we received the requirements of our project: we need to build an application that will help us manage a lemonade stand. The first step in software development is conducting a project requirements analysis in order to clarify what needs to be built and to make sure that the product developed will be both useful and efficient. There are many tools and methods available for this type of analysis, and our goal is to explore a few of them.

Lemonade application project requirements analysis

What do we create?

First of all, we need to remember the given problem:

The main goal of the application is to sell lemonade. There are many types of lemonades made using a variety of recipes that combine a number of products. We need to keep track of our stocks of products and of our suppliers. A product has a name, a quantity stock, a price, and is provided by a single supplier. A supplier has a name and an email address used as a point of contact when our stock of products is almost empty. Our application should manage the deposit by adding, removing, modifying, and listing the products and suppliers.

Our application should be able to read a file containing a list of lemonades recipes, each made from a certain number and combination of products. Each type of lemonade will have a different name, a selling price and a list of required products.

Now that we can handle our stocks and recipes, we need to start selling. When a customer comes, we should be able to create an order to sell the lemonades. For each order, we need to ask the customer what lemonade he wants to buy and the quantity and we need to calculate the total price. When a lemonade is sold, the product stock should be updated according to the recipe.

At the end of the day, we need to do some reporting. First, we should be able to generate a daily sales report and secondly, we need to identify which products have low stock levels.

Every operation performed in our application must be saved even if we shut down our computers. All our data should be stored in text files and any data entered by a user must be validated.

In the real world, problems are often described in natural language. Because of that, in the process of making software. an important and complex step emerges – the project requirements analysis. This analysis will ensure that we will accurately translate the needs into a functional software product.

Functionality analysis software

How do we create it ?

First, we need to define what is the purpose of our application. 

We will have a user, a lemon stand administrator, who will use the application in order to manage the suppliers, the products, the lemonades types and the orders. Imagine there is a a physical lemonade stand somewhere and a person uses a computer to manage all these operations. 

We need to read the requirements and start thinking about how we can develop software to solve the problem.

As far as technology is concerned, we plan to use only plain Java. Therefore, we don’t need to worry about what kind of database we should use or what type of application the user should use.  For now, we will build a simple multi-layer console application with a menu and some commands to solve our problem.

Lemonade application

Because we clarified the purpose and the technology, we can go to the next step: let’s try to analyze the problem and the requirements.

There are many of ways to analyze the business and break down the high-level requirements into smaller and more manageable pieces (use-cases, diagrams, mockups, etc.). One efficient method to rewriting the requirements as user stories.

A user story is an concise description of a functionality of a software system from an end-user perspective. A typical user story follows a simple template:

 

“As a [type of user], I want [some goal or functionality] so that [some benefit or reason].”

In our case, we can write the first user story like this:

“As a lemon stand administrator, I want to be able to add products so that I can manage my deposit.”

If we analyze our requirements we can discover a few user-stories:

  • As a lemonade stand administrator I want to add, remove, update, display all suppliers so that I can manage my deposit.
  • As a lemonade stand administrator I want to add, remove, update, display all products so that I can manage my deposit and create lemonade types.
  • As a lemonade stand administrator I want to create a lemonade recipe so that I can sell the lemonade.
  • As a lemonade stand administrator I want to create an order so that I can keep track of my sales.

These user stories can help us imagine how the application should look: we need to create an application that displays a menu and asks the administrator what operation is required.

Lemonade stand project requirements analysis

We can imagine how the application should look and how the user should interact with it. It is good practice to create a mockup of the User Interface before starting to code.

A mockup is a visual representation or model of a product, design, or an interface that allows designers and developers to visualize how the final product will look and function.

Our console application menu can look like this:

Console application mockup menu

 

And if the user chooses the first option, the submenu can look like this:

Application supplier mockup menu

 

Now that we know how our application should look and behave, we can begin working on it!

Time to practice

Try to create user stories for the last 2 functionalities from our requirements.

When you are ready, you can check them bellow:

As a lemon stand administrator, I want to be able create a sales report for each day so that I can deliver my products.

As a lemon stand administrator, I want to be able create a stock report so that I can contact my supplier for new products.

Key points

  • we usually receive our requirements in natural language
  • before we start coding, it is good practice to conduct a project requirements analysis
  •  there are many ways to analyze the requirements but we used user stories
  • during this phase you can create a mockup of your application

Conclusion

In this introductory tutorial we conducted a project requirements analysis step. Initially, we received our specifications in natural language, which we then transformed into user stories. These helped us create a visual representation of our application. In the next tutorial we will start working on our application by learning how to create the first entity.