E2E Paaper B& W
E2E Paaper B& W
E2E Paaper B& W
Every system has an acceptance depending on its efficiency and effectiveness. In this introductory chapter the system requirement, its goal, objective, scope, significance, advantage etc is briefly described.
1.1 Overview
"A dictionary is a list of words with their definitions, a list of characters with their glyphs or a list of words with corresponding words in other languages." There are different kinds of dictionaries available online, offline (printed version, Desktop) and for Cell phone. Some of the dictionaries deal with the mapping of words from one language to other language. There are also dictionaries that work with in the same language that gives the meaning of a word with another simplified word expression. There are many countries that have their own dictionary to translate foreign language to their local language and vice versa. It helps them to learn and understand the foreign language in an easy way. Therefore, English to English dictionary plays the biggest role in understanding and learning the international language to all the people of any nationality and language. In this age of technology everyone wants to gate a great service from smaller and mobile devices. This is why the size of PCs are becoming smaller and cell phones are becoming powerful almost a PCs. A J2ME mobile dictionary is a process that facilitates translation service using a JVM enabled cell phone. It is typically managed searching environment with a navigation menu and icons giving access to automated tools and content pages. The only thing a J2ME mobile dictionary needs is a JVM enabled cell phone. Therefore, as long as we can get the translation of a word any time any where, there is no need to buy different dictionaries or ask somebody to translate a word. The printed version of the dictionary has the following drawbacks: It is time consuming - locating the required word takes a lot of time and the user has to pass different stages i.e. first he/she has to locate the first letter of the word and then to locate the second, the third till the last letter of the word. Users should have the dictionary at hand; the users should have to carry the dictionary with them. Many people don't feel comfortable time and place to have the dictionary with them. User should have a means to get the dictionary, buy or lend. The dictionary is not available any time any where; availability of the dictionary is limited. May be damaged and unable to find the required word. Some of the page may not be available because of different reason. Using the printed version of the dictionary has been only means of getting word translation, but now it is not convenient means especially in today's rashly world and due to the above mentioned drawbacks. The desktop and online version of the dictionary has the following drawbacks: User must have a PC. For online dictionary user must have an internet connection. Offline or online dictionary software are expensive. The operation speed depends on PC capability and internet connection.
The other means of getting word translation is using Java based Mobile (for Cell Phone) dictionaries. This dictionary solves some of the drawbacks of the printed and online version dictionaries. J2ME dictionaries for cell phone provide the following advantages: Fast searching facility. It is available any time any where. Users don't need to buy or lend. Free from damage unless the system is down. Different means of displaying the meaning of the word.
Forasmuch as it is mentioned that, this dictionary helps every user to learn the unique international language. The outcome of this project is that, any people can make use of this dictionary to learn international language very easily and able to communicate with each other world wide.
The system should provide the related search result of searched word. The system should provide an appropriate error message.
Figure 8: Sequence Diagram for Input to search for a word use case
Figure 9: Sequence Diagram for Navigate through the word list use case.
Figure 10: Sequence Diagram for Search for meaning use case.
Traceability of Requirement: The system shall be developed according to the system analysis and the design specification and it shall not incorporate any thing beyond. Otherwise newly incorporated functionality shall be documented.
End User Usability: The system shall be developed to be easy for user understanding. Especially in developing the user interface it is better to keep the user dictionary in mind.
Figure 19: Local File Access Architecture In Java 2 Micro Edition (J2ME) Dictionary, user can access the service readily available on the cell phone. The services are requested from the cell phone via this application by accessing the cell phones local file resource and which will be executed remotely by the Java Kilobyte Virtual Machine (KVM). Once the KVM is done with the execution of the request to access the resource it will return the result to the application who requests the service.
performs to ensure high coherence. The level of coupling is relatively low because the interactions between subsystems are only exchange of data. The major tasks of the dictionary shall be handled by these four subsystems. Word-Retrieval Subsystem Word-Retrieval subsystem deals with the automated and efficient population of the Word-List and activation of Display subsystem facilities of the system during the start of the application. It populates the word-list with all available words sorted by alphabetical order and visible the word-list to the user for search and navigate. Therefore, the Word-Retrieval subsystem provides the facilities Retrieve all words serially from all the word files alphabetically. Populate the Word-List or Word-Manu available for navigation and search. Activate Display subsystem. Display Subsystem Display is responsible to manage, maintain and visualize the word-list, search result, meaning, and synonym etc information. Therefore, Display subsystem provides the facilities Maintain proper user interface for various data presentation. Search and Navigation Subsystem Search and Navigation subsystem is responsible to manage and maintain the searching facilities. It provides the facility to give input and also give the opportunity to navigate through the word list to find users desired word. Therefore, Users subsystem provides the facilities Allow the user to give input using the traditional key-pad of cell phone. Auto navigation facility when user gives input from key-pad. Manual navigation facility to navigate through the word list. Meaning and Synonym Subsystem Meaning and Synonym subsystem deals with the retrieval of all the available meaning and synonym of the corresponding word in the system. It involves accessing of local file resources; as- meaning file and synonym file and identification of the corresponding synonym words. Therefore Security subsystem facilitates to Reading of specific meaning file and meaning words alphabetically to minimize the use of cell phone resource. Retrieval of the corresponding synonym indexes from specific synonym file alphabetically. Retrieval of corresponding synonym words from the word list using the synonym indexes. The Dictionary system with its subsystems is shown bellow-
Figure 20: Dictionary System Structure 3.2.4 Persistent Data Management This part of the document depicts the persistent data management process of this Dictionary project. As described in the previous sections that Local File Access architecture
will be used in this Dictionary System. That is, all the data used in this system will be stored in local resource files. For the simplicity of the project and faster accessing process different file sets will be used for storing words and their corresponding meanings and synonym indexes. To improve efficiency of the system each of the word, meaning and synonym file sets are fragmented into 26 (twenty six) files each of which will store the information of the words those starts with the corresponding letter of the alphabet. That is, the word files named wa, wb, wc wz will store the words those starts with a, b, c z respectively in an alphabetical order. Similarly the meaning files ma, mb, mc mz will store the meanings and synonym files sa, sb, sc sz will store the indexes of the corresponding words in the corresponding word files.
Figure 22: Storage structure of the Dictionary data files inside application The data inside each file is stored separated by a new line character. When there are more then one meaning or synonym for a word are separated by a slash (/) inside the file and left blank when there is no information about the word. And inside the files how data is stored is shown bellow for wa, ma and sa files only (all other files will be like this)-
Figure 23: Storage structure of the Dictionary data inside files 3.2.5 How Persistent Data are used in Application When the application starts it accesses all the word files (wa, wb, wc wz) and stores all the available words in a collection framework of Java called Vector and also records the index of the first word of each file in another Vector for the simplification of the application and to speed up. After storing in vector it populates the word list and makes visible on screen. When user searches or navigates through the word list one of the words from the list is selected and when the user wants to see its meaning and presses show button. Then it scans the first letter of the word and retrieve the corresponding meanings and synonyms from the files named with the starting letter. And it uses the word count vector elements and the index of the searched word in the list to retrieve the specified position of meanings and synonyms in the files.
Fig : Word-Retrieval subsystem when the application is loading word data. Display Subsystem Similarly as mentioned that, Display Subsystem is responsible for managing, maintaining and visualizing all the dictionary text presenting the word, meaning and synonym etc and all the components those contains those texts such as J2ME Forms, Text Field, Word-List, Alerts etc. Especially a thing is emphasized in this systems display design that, there is no convenient way to show the Text Field (with which text inputs are taken) and List (with which a set of text are shown serially) on the same screen using J2ME technology. To solve this problem Custom Item component is used to create and customize the user interface so that, Text Field and List be shown on the same screen. This is described in detail in the next chapter. The screen shot images of the display components are shown bellow-
Search and Navigation Subsystem Search and Navigation subsystem provides the facility to give input and also give the opportunity to navigate through the word list to find users desired word. It allows the user to give input using the traditional key-pad of cell phone, auto navigation facility when user gives input from key-pad and also manual navigation facility to navigate through the word list. When user navigating the word list manually then it manages the serial and appearance of the word list from sorted word collection. But when user searches through keypad; after every successful key stroke the dictionary uses an especial search technique name Indexed-Binary Search to fine the accurate or approximate word and navigates the selection of the list right there. When the user input is not exactly as the word then it selects an approximate word that starts with the users input word or next to it. The searching technique is described in the later chapter. The screen image of navigating process is shown step by step bellow-
Figure : Word-list navigation process. The screen image of searching process is shown step by step bellow-
Meaning and Synonym Subsystem Meaning and Synonym subsystem deals with the retrieval and presentation of all the available meaning and synonym of the corresponding word in the system. It involves accessing of local file resources; as- meaning file and synonym file and identification of the corresponding synonym words. When user wants to see the meaning of the selected word then only from one of meaning files is read and after some calculation it retrieves the specified meaning word or words and same way retrieves the synonym indexes. When the synonym indexes are obtained then after calculation from the word list the corresponding synonym word or words are along with their meaning are shown. If there is no synonym available for the word then only meanings are shown. The interface of this operating subsystem is shown bellow with its screen images-
***************
4.1.1 Sun Java WTK (Wireless Tool Kit) 2.5.2 Along with the Net Beans 7.0 IDE Sun Java WTK (Wireless Tool Kit) is also used as third party development software for application development. It an application development tool kit from Sun Microsystems for developing Mobile applications using Java. Mainly to run and check applicability of the system, Sun Java Emulators are used as a third party emulator by attaching it with Net Beans IDE.
Enterprise Edition (J2EE): With built-in support for Servlets, JSP, and XML, this edition is aimed at server-based applications. Micro Edition (J2ME): Designed for devices with limited memory, display and processing power. The following figure shows, the editions of Java 2 with types of device those can be programmed using these editions-
Figure : Java Editions (Platforms) and respective devices. J2ME provides a unified Mobile application development model that includes the services necessary to build enterprise-class Mobile applications. J2ME is part of the Standard Java 2 and enables you to take full advantage of the features of the common language runtime, such as type safety, OOP features (inheritance, polymorphism, encapsulation etc), language interoperability, security and versioning etc. Since J2ME has too many Mobile application development components that help to create rich, reliable, secured mobile applications and that is why it is selected as the development environment. For creating J2SE development environment JDK (Java Development Kit) 6 (V1.6), J2ME development environment Java Mobility SDK (Software Development Kit) 3.0 is used. And for running JRE6 and Java Mobility SDK Emulator and Sun Java WTK. J2SE in important for J2ME development because, J2ME inharites some features and packages of J2SE. In mobility module of J2ME the device configuration and device profile for Cell Phone CLDC (Connected Limited Device Configuration) version 1.0 and MIDP (Mobile Information Device Profile) version 2.0 is used.
Figure : Custom Text Field and custom List made up of geometric shapes.
4.3.2 Indexed Binary Search Indexed binary search is modified version of the traditional binary search where some indexes are used to search the words instead of searching the entire collection of data. In this search technique system searches using binary search within a range indicated by two indexes. As in our dictionary project all data are stored inside the file in a ascending sorted order and we are reading the files in alphabetical order so our entire word list will be a sorted list. We know that, Binary search is efficient for sorted collection. So, we will use this binary search in our application in a different fission that is we will use Indexed Binary search. The searching process is shown bellow with flowchart-
Figure : Flowchart of the Indexed-Binary search. In this dictionary project, at the starting of the application when the word data to be loaded from the word files in alphabetical orderly and storing in Java collection framework called Vector named Word-Vector then the index of each first word of the file is recorded in another Vector named Index-Vector. The Word-Vector is used to populate the word list to visualize to the users and this Index-Vector is used for this searching purpose.
Here the searching strategy of the word joy is shown with the following figure-
Figure : Step-by-step searching process for the word joy. When user types something for searching, then in this searching process it extracts the first letter of the word and retrieves its value from the Index-Vector that is the index in the Word-Vector and the next the next value from the Index-Vector if any otherwise the last index of the Word-Vector. These two values are used as the FIRST and LAST index in traditional Binary search. This feature helps us to find a word in a shorter time then Simple Binary search. And then using the file fragmentation feature (described bellow) and the Index-Vector; that is subtracting the index of the word in the Word-Vector to the FIRST we get the position of the word in the word file and so in the meaning and synonym files. Then searching up to this position from meaning and synonym file we can retrieve the meaning and synonym easily. 4.3.3 File Fragmentation As described before in the system architecture section that the persistent data for this dictionary application will be stored in local resource files. And it is also shown that a set of separate file groups are used to store words, meanings and synonyms. This is advantageous in a way of accessing the files to retrieve the information from these files. That is, we do not need to retrieve all the data from all the files. As, when we are about to search the wordmeaning of the word fortune then we do not need to search all the files. According to our storage structures the word fortune must be in wf file as it starts with the character f and its meaning and synonym will be mf and sf files respectively. And also the meaning and synonym will be at the same position of the word in the word file. Then we have to search only up to that position to retrieve the meaning and synonym. This technique will reduce the search time and make application faster.