Free Sample: Program design and implementation paper example for writing essay

Program design and implementation - Essay Example

This report is about the design, program design and implementation of the Unix Shell program to provide a user with the following features: a) Translation of any word in the three languages to the equivalent in any of the other two (six combinations) b) Enhancement of the dictionaries to include addition, amendment and deletion. c) Encryption of a piece of text. This text could be in any of the languages and stored in a file. An encrypted output file would be produced. d) Facility to encrypt and decrypt 6-digit PIN e) Translation of a sentence from one language to another Those all the features are called in one main program and made interface to the user with menu options.

2. Design When design program modules, for each option one separate scripting language has been created here. Then they have invoked in the main menu. When analyze the problem, I have approached top down, then it has been implemented by using bottom up approach. The Figure [1-1], module structure chart will explain the overall program model. When develop a system it is important to reduce the complexity of the program. This is because it is easy to develop, understand, testing and maintain. Most of the software designs are fails because; the system’s complexity is very high. To reduce the complexity of a program, when design the system it is important to divide them into small pieces.

This is to say the modularization of program modules reduce the complexity and errors. Therefore, I have divided the given problems into small modules. The Main menu is the control program for all and it call the sub-menus, Menu1, Menu2, Menu3, Menu4 and Menu5. Then the Menu1 calls the small modules called lookup1, lookup2, lookup3, lookup5 and lookup6. The Menu5 call the small modules decfile and atma. The overall system has been fully understood by the top-down approach and it made easy to design the program modules.

3. Implementation This is about how to write the program coding and implant the program. Here the all the programs are written in bash shell. 3.1 Overview of the program The implementation is carried out by bottom-up approach. This is because; it is easy to check the errors individually when writing the program modules. First I have done the file called Dictionary1 which contains the English-French-German words (Program code-1, shows). After that lookup1 …lookup6 were implemented.

3.2 lookup1 This provides the French meaning for any given English word. First it asks the users to select option from given menu. If user wants to quit from this program they have to enter “q” or if they enter any English word, it will give the French meaning. And also if the user entered word is not found in the dictionary, it will display the message “Sorry, the word you have entered is not found in this dictionary” (see attached program test results)

The following command use to get the meaning from dictionary.  grep $INPUT Dictionary1 > found read a b c < found echo $b The lookup2, lookup3, lookup4, lookup5 and lookup6 are also implemented in the same way that lookup1 has been implemented. Lookup2: provides the German meaning for any given English word. Lookup3: provides the English meaning for any given French word. Lookup4: provides the German meaning for any given French word. Lookup5: provides the English meaning for any given German word. Lookup6: provides the French meaning for any given German word.

This program encrypts the 6-digit PIN number and make sure that it has been encrypted and again decrypt the number if user want. It is a large program and a perfect program. When encrypt a 6-digit number by using this there will not occur lost on the numbers. This is because it adds one for all the numbers before encrypting it. (See attached program code) 3.4 encfile and decfile

This program encrypts the piece of text from a file and stores it into another file. The same commands used in decfile as well to decrypt. It will ask user to enter the file name where the text stored to be encrypted and the file name to store the encrypted message. Here I have used the command “tr” as shown below to encrypt the words; it is a simplest way and made it in this way to show that it can be done in different ways.

The menu 1 actually controls all the lookups and provides choices of menu to select which lookup to be used. This called translation menu and controls all the translation activities. If the user enter the wrong choice it will display the message that says, user entered the wrong choice and when user select to quit , it will also display the message that user is leaving that sub-menu and bye. This is to say it provides great user interface to the translation programs.