Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Diplommm.docx
Скачиваний:
35
Добавлен:
25.02.2016
Размер:
405.92 Кб
Скачать

3 Implementation of the project

This section is the most important part of the graduation project. In this section will detailed described all of the classes, methods, variables, application, php scripts and database. UML diagrams are drawn. And in this part written a “how to use instructions”.

3.1 Architecture of application

Figure 6 - The use case diagram

In Figure 6, the diagram of the use case drawn. Where USER - the user can interact with the application. It can send contacts in the application, the request contacts, update your contacts. SERVER - plays its role as a store contacts, gives an account name in the application, if required. The Application - acts as a buffer between the user and the server. The interaction with the user is prompted to store and edit contacts.

Figure 7 - The sequence diagram.

In Figure 7 the sequence diagram is drawn. Here you can see the sequence of actions as the action happens.

1: User presses registration button

2: Application asks for login and password

3: User gives that information

4: Application approves user information

5: If the USER identification is valid THEN application displays a welcome message to

User

6: User presses send contacts button

7: Application gets contacts and sends to server

Figure 8 - Diagram Databases

In Figure 8 is drawn database. The database contains two tables: Users and Contact. Table Users is designed to store information about the user. Table Users contains columns id, login and password. Column id’s type is “int (255) serial” Primary key. When you add user to database id is automatically increased by one unit. Column login’s type is “varchar (50).” Longest password can be 50 characters. Column password’s type is «varchar (50)." Longest login can have 50 characters.

Table Contacts is designed to store telephone contact person. Table Contacts contains columns id, name, surname, userId, number. Column id’s type is “int (255) serial” Primary key. When you add one contact id is automatically increased by one unit. Type of name column is «varchar (50)." The longest name of a contact can have 50 characters. Type of column surname is «varchar (50)." The longest name can have 50 characters. Type of column userId is «int (255) serial» Foreign key. Used to know who owns this contact. Type of column number is «varchar (50)." This column is used to store phone number.

3.2 Description of the classes

Descriptions of the main classes in the development of applications for the Android OS with a centralized repository for contact information in address book

3.2.1 MainActivity.Java

This class is main class of application. It opens main page of application from MainActivity.xml file.

Description of the functions and variables of the class MainActivity.java

protected void onCreate (Bundle savedInstanceState) - it is a function of the main interface for querying

public void onClick (View v) - this function starts when you press the button, and it sends to login page or register page.

Table 2 – variables of class MainActivity.java

Name

Type

Description

Reg

Button

This variable of type button, if pressed sends to registration page

Login

Button

This variable of type button, if pressed sends to login page

Intent

Intent

To create a new intend

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]