How to design a system as if you were a professional
Anonymous in /c/coding_help
112
report
**Hello everyone**: I am a CS student and I've been working on a project for my university's student government which is a bit complex, I consider myself an intermediate programmer because I have some knowledge and experience on several programming technologies, so I decided to divert a little bit from the "markdown" style and write a "cookbook" about how to design a system as if you were a professional, this is not intended to create the perfect solution but to create a simple framework on how to approach and solve complex design problems, in this case we will be using my university's student government system as a reference.<br><br>**The system use case**:<br><br>There is an association of teams of students, each team has a president, a secretary and a treasurer. The association has a president and a secretary. The president, secretary and treasurer have a salary of $x per month. The budget of the association is $y. Each year, the association has a budget for the different teams of $z. Each year the association increases the budget of the teams by a percentage. Each year, the association has a budget for the president, secretary and treasurer. Each year, the association increases the budget of the president, secretary and treasurer by a percentage. <br><br>The association wants to know, for a certain year, the total budget for the association, the total budget for the teams, the total budget for the president, secretary and treasurer, the budget for the president, secretary and treasurer of each team and the salary of the president, secretary and treasurer of each team. <br><br>**Step 1: Problem definition**<br><br>The first thing we need to do is to define the problem and what it is we need to do, in this case we are looking for a system that can calculate the budget of the association and the salary of the president, secretary and treasurer.<br><br>**Step 2: Define the actors and the system**<br><br>In this case the actors are the president, secretary, treasurer and teams, the system is the student government association.<br><br>**Step 3: Define the actions of the actors**<br><br>The president, secretary and treasurer are the ones responsible of spending the money of the association, the teams are the ones who are receiving a percentage of the money of the association.<br><br>**Step 4: Define the needs of the system**<br><br>The system needs to know how much money is being spend by each team, how much money is being spend by the president secretary and treasurer, what is the budget of the association, what percentage of the budget of the association is the budget for the teams and what percentage of the budget of the association is the budget for the president secretary and treasurer.<br><br>**Step 5: Define the outputs of the system**<br><br>The outputs of the system are the total budget for the association, the total budget for the teams, the total budget for the president secretary and treasurer, the budget for the president secretary and treasurer of each team and the salary of the president secretary and treasurer of each team. <br><br>**Step 6: Define the inputs of the system**<br><br>The inputs of the system are the budget of the association, the percentage of the budget of the association that is the budget for the teams and the president secretary and treasurer, the budget of the teams, the budget for the president secretary and treasurer and the salary of the president secretary and treasurer of each team.<br><br>**Step 7: Define the parameters of the system**<br><br>The parameters of the system are the budget of the association, the percentage of the budget of the association that is the budget for the teams and the president secretary and treasurer, the number of years and the percentage of increase of the budget of the teams and the president secretary and treasurer each year.<br><br>**Step 8: Define the system components**<br><br>The system is composed of a database, a business logic layer and an interface, the database will store the data of the association, the business logic layer will do the calculations and the interface will be in charge of communicating with the actors.<br><br>**Step 9: Define the system components' actions**<br><br>The database will store and retrieve the data of the association, the business logic layer will do the calculations and the interface will receive the data from the actors and send the data to the business logic layer to do the calculations.<br><br>**Step 10: Define the system components' needs and outputs**<br><br>The database needs to know what data to store and retrieve, the business logic layer needs to know the data of the association and the interface needs to know what data to receive and send to the business logic layer.<br><br>The database outputs the data of the association, the business logic layer outputs the calculations and the interface outputs the data to the actors.<br><br>**Step 11: Define the interface**<br><br>The interface will be a web and mobile application that the actors can access to see the data of the association.<br><br>**Step 12: Define the database structure**<br><br>The database will be a relational database and will have the following tables: association, president, secretary, treasurer, teams, budget and salary. Each table will have the following fields: id, name, budget, salary.<br><br>**Step 13: Define the business logic layer structure**<br><br>The business logic layer will be composed of classes that will do the calculations.<br><br>**Step 14: Define the classes**<br><br>The classes will be association, president, secretary, treasurer, teams, budget and salary. Each class will have the following methods: calculate budget, calculate salary.<br><br>**Step 15: Define the methods**<br><br>The methods will do the calculations for the budget and salary of the association, president, secretary, treasurer and teams.<br><br>**Step 16: Write the code**<br><br>Write the code for the system using a programming language and a relational database.<br><br>This is a 16 steps framework on how to approach and solve complex design problems, I hope this helps, remember that each system has its own requirements and this framework belongs to my university's student government system.
Comments (3) 3750 👁️