You are on page 1of 4

COPYRIGHT NOTICE All ideas and information contained in this document are the intellectual proper ty of Education and

Research Department, Infosys Limited. This document is not f or general distribution and is meant for use only for the person they are specif ically issued to. This document shall not be loaned to anyone, within or outside Infosys, including its customers. Copying or unauthorized distribution of this document, in any form or means including electronic, mechanical, photocopying or otherwise is illegal. Education and Research Department Infosys Limited Electronics City Hosur Road Bangalore - 561 229, India. Tel: 91 80 852 0261-270 Fax: 91 80 852 0362

Table of Contents 1. 2. 3. BACKGROUND 1 HIGH LEVEL DESIGN CLASS DIAGRAM 2 1

4. 4.1. 4.2. 4.3. 4.4.

DETAILED DESIGN 3 LOGIN CLASS 3 MENU CLASS 3 DEPARTMENT CLASS EMPLOYEE CLASS 6

1. BACKGROUND This project is a telephone directory maintenance system for a company. The comp any maintains department and employee details. 2. High Level Design This section describes the high level design of the telephone directory maintena nce system. The system has the following modules: 1. Login: Accepts the user id and password. Validates the user id and passw ord. If valid then main menu is displayed. Otherwise a suitable error message is displayed. 2. Menu: Displays the Menu for the Empolyee Information System and prompts the user for choice. On entering a valid choice calls the appropriate method. If invalid choice is entered appropriate error messages are generated. 3. Department Maintenance: Contains methods to implement the functionality of the Department maintenance. Provide the following operations a. Adding a new Department b. Updating an existing department c. Viewing the department

3.

Class Diagram

4. Detailed Design This section describes the detailed design of the various modules in the telepho ne directory system. 4.1. Login class Method : getInput Scope Public Parameters Scanner scanner Return Values None Description Prompts the user for user id and password and assigns them to th e class members login_id and password. Calling Function main Functions called by this function None Method : chec Credentials Scope Public Parameters Connection con

Return Values boolean true or false Description Reads the Login_table and compares the values entered by the use r (stored in the class members login_id and password) with the ones in the table. Calling Function main Functions called by this function None 4.2. Menu class Method : fnMainMenu Scope public static Parameters None Return Values None Description Displays the main menu. Then waits for users input using the next Int() method of Scanner object. Until the user types in a selection, control wil l not be returned to the calling function. Calling Function main Functions called by this function drawBanner Method : fnDeptMaintMenu Scope public static Parameters None Return Values None Description Displays the Department rs input using the nextInt() method of selection, control will not be returned Calling Function main Functions called by this function

Maintenance sub-menu. Then waits for use Scanner object. Until the user types in a to the calling function. drawBanner

Method : fnEmpMaintMenu Scope public static Parameters None Return Values None Description Displays the Employee Maintenance sub-menu. Then waits for users input using the nextInt() method of Scanner object. Until the user types in a se lection, control will not be returned to the calling function. Calling Function main Functions called by this function drawBanner Method : fnTelDirMaintMenu Scope public static Parameters None Return Values None Description Displays the Telephone Directory Maintenance sub-menu. Then wait s for users input using the nextInt() method of Scanner object. Until the user ty pes in a selection, control will not be returned to the calling function. Calling Function main Functions called by this function drawBanner Method : fnReportsMenu Scope public static Parameters None Return Values None Description Displays the Reports sub-menu. Then waits for users input using t he nextInt() method of Scanner object. Until the user types in a selection, cont rol will not be returned to the calling function. Calling Function main Functions called by this function drawBanner Method : drawBanner Scope private

Parameters None Return Values None Description Displays the page banner Employee Information System Calling Function fnMainMenu, fnDeptMaintMenu, fnEmpMaintMenu, fnTelDirMai ntMenu, fnReportsMenu Functions called by this function None 4.3. Department class Method : getCurrentDeptCode Scope public Parameters Connection con Return Values int currDeptCode Description Reads the Department_table and returns the last dept_code (the d epartment code of the latest department that was added) Calling Function main Functions called by this function None Method : validDeptName Scope private Parameters String deptName Return Values boolean true or false Description Chec s whether the department name is grater than equal to three charchters and less than equal to 15 characters. Also checls that th department name contains the following charchters only 1. a z 2. A Z 3. Blan space, hyphen (-) and ampersand (&) Calling Function addDept Functions called by this function None Method : chec DuplicateDeptName Scope private Parameters String deptName, Connection - con Return Values boolean true or false Description Chec s whether the department name already exists in the departm ent_table Calling Function addDept Functions called by this function None