【Software Engineering】Course Design Inventory Management System


An overview of curriculum design

1.1. Purpose

For specific software engineering projects, comprehensively master the methods and technologies of software engineering management, software requirements analysis, software preliminary design, software detailed design, software testing and other stages. Through the practice of this course design and the preparation and summary before and after, review, comprehend, consolidate and apply the software development methods and knowledge learned in the software engineering classroom, and further understand and master the theory of software development model, software life cycle, software process, etc. The significance and role in the process of software project development, improve the comprehensive ability of software engineering, improve the management ability of software projects, and lay a solid foundation for engaging in software development and design.

1.2. Tasks

Fully understand the inventory management system, conduct system demand analysis, feasibility analysis, design, testing, and complete course design. Fully understand the whole process of software engineering, review, comprehend, consolidate and apply the software development methods and knowledge learned in the software engineering classroom.

1.3. Development environment:

Microsoft Visual C++、 SQL Server 2019 、 Windows 10、codeblocks

2. Demand analysis and feasibility analysis of the project

2.1. System Feasibility Analysis

Inventory management system can be applied to all aspects of life, such as: various commodities in supermarkets, books for book management. Take the commodities in the supermarket as an example, the daily quantity of goods purchased and shipped is also extremely large, and it cannot be completed simply by manual recording, which will be extremely confusing. Then at this time, a small inventory management system can solve this problem. Not only this, you can also analyze the daily shipments to determine which product is more popular, which product is more, and which product is less.
Using modern informatization and intelligent management mode, it solves the problem that commodity inventory information is easy to lose, forget, and difficult to save and manage in daily life, so that merchants can understand commodity inventory information more comprehensively and intuitively. make the right decision.
The inventory management system provides users with a friendly interface, convenient operation, and meets the needs of merchants for incoming and outgoing management. Make users more convenient and quick to use.

2.2. System requirements analysis

2.2.1. System target design

The overall goal of system development is to realize the systematization, standardization and automation of warehouse management.
Unified management of all commodities in the warehouse (including commodity name, code, manufacturer, production date, total quantity, outbound volume, inbound volume, and price)
Provides a convenient query method. Such as: commodity name, code, manufacturer.
Provides modifications to product information.
Provides query for product information.
Provide daily outbound, inbound statistics and sorting.
Provide commodity out and in-warehouse functions.

2.2.2. System functional requirements analysis

(1) Commodity management: commodity name, code, manufacturer, production date, total quantity, outbound, inbound, price, etc.
(2) System management: commodity in and out, query modification, statistical sorting, etc.
The system that meets the above requirements mainly includes the following subsystems
(1) Login subsystem: This system mainly includes the login function.
(2) Management subsystem: This subsystem mainly includes the operation of the commodity by the administrator.

The following figure shows the main functional modules of the inventory management system:
insert image description here

Figure 1: Inventory management system functional block diagram

2.2.3. System function description

(1) Warehousing of goods. After the goods are put into storage, the storage quantity changes, the total quantity += storage quantity.
(2) Goods out of the warehouse. After the goods are shipped out, the out-of-stock quantity changes, the total quantity += out-of-stock quantity.
(3) Inquire about products. Get the name, code, manufacturer, production date, total quantity, outbound quantity, inbound quantity, price, etc. of the queried commodity.
(4) Modify the product. Modify the product's name, code, manufacturer, production date, total quantity, outbound quantity, inbound quantity or price. Part of it can be modified, or all of it can be modified. Change as needed.
(5) Daily inventory. Carry out a total inventory of the outbound and inbound quantities of various commodities in one day, so as to make tomorrow's purchase decision.
(6) Inventory sorting. Sort the goods in and out of the warehouse, and it is more simple and intuitive to find out which goods sell well, and which goods should be purchased more.
(7) Exit the system. Return to the main menu page.

2.2.4 Data flow diagram of the system

insert image description here
insert image description here

Figure 2: DFD Diagram of Inventory Management System System

3. Project outline design

3.1. System modeling design

3.1.1. Introduction to UML

UML is a powerful, object-oriented modeling language for visual system analysis. It adopts a complete set of mature modeling techniques and is widely applicable to various application fields. Its various models can help developers better understand business processes and build more reliable and complete system models. In this way, users and developers can achieve the same understanding of the description of the problem, so as to reduce the semantic difference and ensure the correctness of the analysis.

3.1.2. System use case analysis

The ER diagram of the warehouse management system is as follows:
insert image description here

Figure 3: ER diagram of the warehouse management system
From the use case diagram, we can see the use cases that users have for this system. Including:
(1) Commodity storage. After the goods are put into storage, the storage quantity changes, the total quantity += storage quantity.
(2) Goods out of the warehouse. After the goods are shipped out, the out-of-stock quantity changes, the total quantity += out-of-stock quantity.
(3) Inquire about products. Get the name, code, manufacturer, production date, total quantity, outbound quantity, inbound quantity, price, etc. of the queried commodity.
(4) Modify the product. Modify the product's name, code, manufacturer, production date, total quantity, outbound quantity, inbound quantity or price. Part of it can be modified, or all of it can be modified. Change as needed.
(5) Daily inventory. Carry out a total inventory of the outbound and inbound quantities of various commodities in one day, so as to make tomorrow's purchase decision.
(6) Inventory sorting. Sort the goods in and out of the warehouse, and it is more simple and intuitive to find out which goods sell well, and which goods should be purchased more.
(7) Exit the system. Return to the main menu page.

3.1.3. Hierarchical module diagram of the system

insert image description here
Figure 4: Inventory Management System Hierarchical Module Diagram

3.2 The administrator enters and exits the warehouse information

insert image description here

3.3 User entry and exit information

insert image description here

3.4 Administrators manage user information

insert image description here

3.5 Administrator enters inventory details

insert image description here

3.6 Data file design

c2.c file: system main code
c2.o file: object file

3.7 Interface Design

3.7.1. User Interface

Main interface
insert image description here

main menu
insert image description here

Goods warehousing
insert image description here

Goods out of stock
insert image description here

Inquire about products
insert image description here
insert image description here

Modify product
insert image description here

day inventory
insert image description here

Outbound sorting
insert image description here

Exit system
insert image description here

3.7.2. External interface

none

3.7.3. Internal Interface

User add in-out information interface: input, output (enter user information, commodity information, supplier information, in-stock information, out-of-stock information, return information, customer information, etc.)
User query commodity information interface: find_1, find_2, find_3 , find (the system provides three query conditions: living creature number, date, index) The
administrator modifies the information interface: change (modifies product information, supplier information, user information, customer information and other information)
Inventory commodity information interface: display ( Display commodity information)
Commodity sorting interface: shun, dao (sort according to the order of delivery)

3.8 Architecture Design

insert image description here

4. Detailed design

The inventory management system is a platform for storing commodity inventory information. The whole system is divided into 7 modules: commodity warehousing, commodity warehousing, commodity modification, commodity query, daily inventory, inbound and outbound sorting, and exit system. The detailed design method is as follows said.

4.1 Main function algorithm design

Void save(); Create text.txt and add content to it
Void read(); Read the content of text.txt and assign it to the array
Void input(); Add product warehousing information
Void output(); Add product output Library information
Void find_1(); Query product information by name
Void find_2(); Query product information by code
Void find_3(); Query product information by manufacturer
Void find(); Query product information
Void change(); Modify product information
Void display(); Inventory of product information
Void shun(); Sort products in ascending order
Void dao(); Sort products in descending order
Void quit(); Exit the system

4.2 Flow Chart of System Commodity Warehousing

insert image description here

4.3 System code

Show only part of the code

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define N 80//最大容量限定
struct a {
    
    
    char name[10];
    int numb;
    char boss[6];
    int date;
    int count;
    int price;
    int chu;
    int ru;
}goods[1];
struct a product[N]={
    
    {
    
    "ac",1,"AC",1,15,5,0,0},{
    
    "bd",2,"BD",2,10,20,0,0}};
int num=2;
void read(){
    
    
    FILE*fp;
    int i;
    system("cls");
    fp=fopen("text.txt","r+");
    if(fp==NULL){
    
    
        printf("不能打开文件!\n");
        exit(0);
    }
    i=0;
    while(!feof(fp)){
    
    
        if(fread(&product[i],sizeof(struct a),1,fp)==1)
            i++;
    }
    num=i;
    fclose(fp);
}
void save(){
    
    //保存商品的信息
    FILE*fp;
    int i;
    if((fp=fopen("text.txt","w"))==NULL){
    
    
        printf("cannot open file");
        return;
    }
    for(i=0;i<num;i++){
    
    
        if(fwrite(&product[i],sizeof(struct a),1,fp)!=1)
            printf("file write error\n");
    }
    syetem("cls");//清屏
    //printf("商品已保存!\n");
    //getch();
    fclose(fp);
}

Guess you like

Origin blog.csdn.net/weixin_48701521/article/details/123591528