About English dictionary development document 1 Overview 1.1 Development Background
As a general language, some words have become common words and are directly applied to Chinese. However, it is difficult to read new terms or terms that involve certain specialized fields. Traditional Chinese and English dictionaries have been updated for a long time, which is difficult to carry and expensive. It is not suitable for modern people with fast pace of life. On the contrary, electronic dictionaries are easy to carry, convenient to query, and efficient to meet the needs of modern people. With the continuous advancement of science and technology, the android system has gradually become the mainstream software at present, and the electronic dictionary has gradually applied the system to its own design, and achieved good results.
1.2 Development Goals
Basic system functions:
1. log on to the system. User logon and Administrator Logon. The User Logon function allows you to retain usage traces and manage personal word applications. The Administrator logs in to enable developers to update English vocabulary, update the system, and fix system vulnerabilities and errors in a timely manner.
2. Custom vocabulary. User-Defined words that have been logged on to the system can be used to record the meaning of words or words that have not been entered by the system.
3. query function. English to Chinese (English. You can enter the word you want to query and click search to view the meaning, example sentences, and pronunciation of the word.
4. Single-statement-based function. Allows you to create a new word list. You can delete words in the word list created by a user to add or write custom words.
1.3 references
English dictionary software-youdao dictionary. The software is an open-source project. The source code can be used by the public, and the use, modification and issuance of the software are not restricted by the license. This improves the efficiency of software development. As a free translation software, youdao dictionary has a simple interface and powerful functions. Therefore, this team mainly draws on the functional code of word query.
1.4 Design Principles
The application prospect of electronic dictionaries is very broad. In order to make it easier for users to use and achieve better results, designers should consider many aspects in the software design process. Therefore, the database structure design has a direct impact on the efficiency and implementation of the application system. The database system requires the following features: reasonable structure, low data redundancy, and strong independence. Create, modify, and Query files quickly and accurately.
Commercial software development requires good portability. PowerBuilder can be used for cross-platform development or cross-platform software release.
Adaptiveserveranywhere is a database management system provided by PowerBuilder. It has the following benefits:
Adaptiveserveranywhere is already a complete database management system. Therefore, in the project development stage, a single machine can be used to develop large database applications without connecting them to the large database management system in the network.
2. Demand Analysis 2.1 requirement statement
At present, some common electronic dictionaries on the market are mainly divided into the following types:
1. PC-based electronic dictionary. This kind of electronic dictionary has poor mobility and has great limitations on its use.
2. Special electronic dictionary. This type of electronic dictionary is mainly used by teenagers. Such products are independent electronic products that are rarely carried with you. In addition, this product is rarely used by middle-aged and elderly people.
3. embedded electronic dictionary. This electronic dictionary can be installed on mobile devices that are frequently used, such as mobile phones and tablets. Easy to carry and query.
Therefore, in order to meet user needs, the team developed the word query and display function of the electronic dictionary and the new word addition function.
1. You can select the word query and create a word base on the software interface.
1. Word query. When a user needs to query, the software must provide all information about the word: Meaning, example sentences, and pronunciation. So that the user can obtain the required information.
2. Create a word base. After creating a word base, you can add the words and definitions entered in the system, or add custom words and definitions.
2.2 operation cases
Enter the user name and password in the logon window. You can select a word selection module, such as "apple", enter "apple" in the word query area, and click query. The"Apple N. Apple; treasure; guy ."
When you select the word base function, you can select "add" and "delete ". After "add" is selected, you can select and add words in the system, or you can add custom words directly on this page. For example, add "apple ". You can perform the previous step and click Add. The page displays"Apple N. Apple; treasure; guy ."When performing the delete operation, you can click the delete key to delete the words to be deleted.
2.3 function division
1. Chinese-English Translation function: This function allows you to query Chinese words from English words. When you enter the first character, the words starting with this character are displayed in the data window below. You can click it to display the Chinese explanation of the word. That is to say, you do not need to enter all words that the user wants to search for. The System Displays all words that the user may want to query based on the input prompt.
2. New User Registration: new users can be registered, but existing user registration is not allowed. If the two passwords of the registered users are inconsistent, the system cannot pass the verification.
3. User Logon: User Authentication interface. After logging on to the correct user, you can enter the function Selection window. The history window displays the corresponding historical records.
4. Set the word base: You can set the word base here. When a user logs on, his/her word base is empty. He/she must add a word in his/her topic settings before browsing.
2.4 Runtime Environment
Operating System: Windows 7
Programming tools: Visual Studio 2013
Running requirement Configuration:
AMD A8-7100 radeon R5, 8 compute cores 4C + 4G 1.80 GHz
Memory size: 4.00 GB
System type: 64-bit Operating System
3 Overall Design 3.1 system modeling 3.1.1 hierarchical Block Diagram
3.1.2 ERTU (entity-contact diagram)
3.1.3 class diagram design
3.2 interface design internal Interface Design
In order to realize the organic connection between classes in the system and between each element, in terms of internal interfaces, each module transmits information through function calls, parameter transmission, and return values. The information transmitted by the interface is operated on each data through the struct pointer to implement various functions.
3.3 Database Structure Design
The software is designed with three databases. One local database is used to store users' personal new words, and the account database is used to store account information of each user. Another database is the core of the software, used to store words. Each database stores data in the form of files. When the software runs, it calls a function to open a file to exchange data.
3.3.1 database E-R Diagram
3.3.2 database Logic Design
Name |
Type |
Length |
Primary Key |
Account |
String |
20 |
Yes |
Password |
Char |
16 |
No |
Word |
String |
-- |
Yes |
Meaning |
String |
-- |
No |
2.5 error handling
When you use the software, you can upload the error message to the administrator if an unknown error occurs. Then, the Administrator regularly handles various errors and fixes bugs, then release the new version at the right time to upgrade the software.
2.6 security and confidentiality Design
For user information security protection, we use a password to log on, and set strict permission restrictions for account information management. For the security design of the database, we will adopt unique data encryption measures to encrypt the data and then enter it into the database. We also need a unique decryption method when extracting data, decrypts data to greatly protect data security.
4. Detailed design of the 4.1 program flowchart
1. Logon
Before using this dictionary, You need to log on to the dictionary. users or administrators can use the corresponding functions based on the type of Logon account.
2. Administrator
The Administrator is responsible for effectively and reasonably managing the word library and account library databases.
3. User
Users can use functions such as registration, logon, word query, and addition of local (personal) Word libraries.
4.2 writing pseudocode
1. header file
# Include <iostream>
# Include <stdlib. h>
# Include "user. H"
# Include "Administrator. H"
Using namespace STD;
2. encapsulation of nodes and Classes
Nodes storing entries:
Typedef struct lnode {
String word;
String phonogram;
String meaning;
Struct lnode * next;
} Lnode, * linklist;
Base class base
{
PRIVATE:
String account;
Char password [16];
Public:
Void serachc ();
}
Subclass class user: public Base
{
Public:
Void Add1 ();
}
Subclass class administrator: public Base
{
Public:
Void ADDC ();
Void deletec ();
Void changec ();
Void addz ();
Void deletez ();
Void Changez ();
Void serachz ();
}
3. Main Program dictionary. cpp
Int main (void)
{
Cout <"Welcome to Haha English-Chinese dictionary" <Endl;
Cout <"======================================== ====================== "<Endl;
// The program runs and stores the entries in the word library in the linked list for future use.
File * FP1, * fp2, * fp3;
FP1 = fopen ("single library .txt", "R + ");
L = (linklist) malloc (sizeof (lnode ));
Char T = fget (FP );
// Then, the boundary of words, phonetic symbols, and interpretation is determined based on the t ascii code.
// Four messages are stored on each node.
Word phonogram meaning * Next
Cout <"Login or registration? "<Endl;
// Login:
If (strcmp (input account name, an inventory account) = 0
&&
Strcmp (enter the account password and the inventory password) = 0)
{
Logon successful
}
Else
{
Logon Failed
Return 0;
}
// Register
Cin> "account name and password ";
// Submit an account registration application to the Administrator and save the applied account information
Fp2 = fopen ("account information .txt", "W + ");
User Interface user. h
Administrator interface. h
Fclose (FP );
Return 0;
}
4. User. h
Void base: serachc (linklist L)
{
Cout <the word to be queried;
// Use the strcmp () function to compare the word and the word to be queried from the Start Node of L.
// Use the pointer * P to point to the matching Node
Cin> P-> word, p-> phonogram, p-> meaning
}
Void User: Add1 ()
{
Fp3 = fopen ("My word .txt", "W + ")
// Each user corresponds to a local word library. This text file can be considered as a small part of the word library.
Fwrite (word, phonogram, meaning, fp3 of new words );
}
5. administrator. h
(1) word library management:
Void administrator: ADDC (linklist & L)
{
// Locate the position of the added word in alphabetical order
Fwrite (word, phonogram, meaning, FP1 for words added );
}
Void administrator: deletec (linklist & L)
{
// Use the serachc () function to find the word to be deleted
Delete the corresponding node in the linked list
Use FP1 to delete the word from the word library
}
Void administrator: changec (linklist & L)
{
// Use the serachc () function to find the word to be modified
Modify the corresponding node in the linked list
Use FP1 to re-write the word to the word library
}
(2) Account Management:
Void administrator: addz (){}
Void administrator: deletez (){}
Void administrator: Changez (){}
Void administrator: serachz (){}
Otherwise, there will be a major vulnerability in account management.
5. Implement 5.1 coding 5.1.1 code conventions
1) nodes storing entries
Word: English words in the word library
Phonogram: phonetic alphabet of words
Meaning: Chinese Translation
2) base class
Account: User Account Name
Password: Account Password
Serachc (): Query word Functions
3) User
Add1 (): the user's operations on his/her own word Base
4) Administrator
ADDC (): the Administrator adds words to the word library.
Deletec (): the Administrator deletes a word from the word library.
Changec (): the Administrator modifies an entry in the word library.
Addz (): the Administrator adds a new account to the account information library.
Deletez (): the Administrator deletes an account from the account information library.
Changez (): the Administrator modifies the information of an account.
Serachz (): the Administrator searches for information about an account in the account information library.
5.1.2 coding principles
1) the code is simple, clear, easy to read, and unambiguous;
2) The code format is standardized, and the indentation of the same level of code should be unified, which is also convenient for reading the Code;
3) do not place redundant statements on one line and place its branches;
4) The name of a variable must be easy to understand and cannot be confused with other variable names in this program.
5.2 test points logon test points
1) User Registration: test whether the user can customize the user name and password, whether to submit the application to the Administrator, and whether the user can log on to the Administrator after the Administrator passes the application.
2) user login: test whether the user can log on normally. If the password is incorrect, check whether the program has a follow-up response.
3) query a word: After a standard word is entered, can the entry information be displayed normally? For example, if you enter an apple word, can ['be displayed ['? P? L] n. if you enter a regular word but no such word in the word library, can you remind the dictionary that this word does not exist? If you enter an invalid word, can you remind the user that the entered format is incorrect, enter again, for example, wye6t.
4) Management of the user's word base: test whether the user can add or delete the word base normally.
5) Word Library Management: test whether the administrator can add, delete, modify, and query words in the word library. After the operation, the user can verify the operation result.
6) management of user information library: test whether users can receive registration and modification requests, and whether user information library can be added, deleted, modified, and queried.
5.3 test results and summary
Through tests, we have perfected the program to a certain extent. During the test, we found our own shortcomings and accumulated experience from the deficiencies, the ability to write code has been improved. At the same time, because the test provides a lot of help for code improvement, we have realized the importance of testing for a program, and testing is essential, it will give us a clearer understanding of our code and the integration of code in the era of teamwork programming. It can be said that code is affirmed only when we pass the test.
6 maintenance 6.1 Maintenance Method
Software maintenance is a term used in software engineering. It refers to software modifications made after a software product is released due to correction errors, performance improvement, or other attributes. Software maintenance mainly refers to the modification of some or all of the applications based on changes in demand or hardware environment. The source program should be fully utilized during modification.
There are generally four types of software maintenance activities:
1) corrective maintenance
Corrective maintenance refers to correcting errors that have occurred in the system development phase and have not been found in the system test phase. In this respect, the maintenance workload accounts for 17% of the total maintenance workload ~ 21%. Some of the errors found are not very important and do not affect the normal operation of the system. The maintenance work can be performed at any time. Some errors are very important and even affect the normal operation of the entire system, its maintenance work must be planned, modified, and reviewed and controlled.
2) Adaptive Maintenance
Adaptive maintenance refers to the changes made when software is used to adapt to changes in information technology and management requirements. The maintenance workload accounts for 18% of the total maintenance workload ~ 25%. Due to the continuous decline in computer hardware prices, various types of system software are constantly outputted. People often need to upgrade the system to improve the system hardware environment and operating environment; the constant changes in the external market environment and management requirements of enterprises also enable managers at all levels to constantly propose new information requirements. These factors will lead to adaptive maintenance work. The maintenance work should also be carried out in a planned and step-by-step manner like system development.
3) Excellent Maintenance
Perfection maintenance is a modification made to expand functions and improve performance. It mainly refers to adding some features and performance characteristics that are not specified in the system analysis and design phase to existing software systems. These functions are necessary to improve the system functions. In addition, it also includes improvements to processing efficiency and programming. Maintenance accounts for 50% of the total maintenance work ~ 60%, a large proportion, is also an important aspect related to the quality of system development. In addition to planned and step-by-step maintenance, you must add relevant documents to the previous documents.
4) Preventive Maintenance
Preventive Maintenance in order to improve the reliability and maintainability of application software, in order to adapt to future changes in the software and hardware environment, new preventive functions should be proactively added, so that the application system can adapt to various changes without being eliminated. For example, you can change the dedicated report function to generate a general report to adapt to future report format changes. The maintenance workload accounts for about 4% of the total maintenance workload.
6.2 maintenance document
The maintenance content includes the program name, the number of source program statements, the number of machine code commands, the program design language used, the date on which the program is installed, the number of running times after the program is installed, and the number of running times after the program is installed. number of failures, program change levels and names, number of source program statements added to the program modification, number of source program statements reduced by the program modification, number of "persons" paid for each modification, modify the date of the program, the name of the software maintenance personnel, the name of the maintenance application report, the maintenance type, the maintenance start time and maintenance end time, the total number of people who spent on maintenance, maintenance net income of work.
In addition to the above maintenance, the English dictionary software also requires a lot of "people" to maintain the word database. It is a very complicated process to add, delete, and modify a large number of entries in the word database. In addition, the management of users' account and password databases is also very careful, and the workload of administrators is also very complicated.
Team summary:
CAPTAIN: Yan xinming
Members: Yang Jianhua, Wang linfeng, Liu Yang, Zeng hongxin
Division of labor: each person is responsible for what they can, and the team leader is responsible for integrating all parts. Although the capabilities are limited, each person tries his/her best to complete the assignment of the team.
Pleasant cooperation !!! Pai_^
Team assignment 2