© Infosys LimitedOOP - Project Design Document

COPYRIGHT NOTICE

All ideas and information contained in this document are the intellectual property of Education and Research Department, Infosys Limited. This document is not for general distribution and is meant for use only for the person they are specifically 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

ElectronicsCity

Hosur Road

Bangalore - 561 229, India.

Tel: 91 80 852 0261-270

Fax: 91 80 852 0362

Table of Contents

1.BACKGROUND

2.High Level Design

3.Class Diagram

4.Detailed Design

4.1.Login class

4.2.Menu class

4.3.Department class

4.4.Employee class

CONFIDENTIALPage 1

© Infosys LimitedOOP - Project Design Document

1.BACKGROUND

This project is a telephone directory maintenance system for a company. The company maintains department and employee details.

2.High Level Design

This section describes the high level design of the telephone directory maintenance system. The system has the following modules:

  1. Login: Accepts the user id and password. Validates the user id and password. 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
  4. Adding a new Department
  5. Updating an existing department
  6. Viewing the department

3.Class Diagram

4.Detailed Design

This section describes the detailed design of the various modules in the telephone 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 the class member’s login_id and password.
Calling Function / main
Functions called by this function / None

Method:checkCredentials

Scope / Public
Parameters / Connection con
Return Values / boolean – true or false
Description / Reads the Login_table and compares the values entered by the user (stored in the class member’s 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 user’s input using the nextInt() method of Scanner object. Until the user types in a selection, control will 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 Maintenance sub-menu. Then waits for user’s input using the nextInt() method of Scanner object. Until the user types in a selection, control will not be returned to the calling function.
Calling Function / main
Functions called by this function / drawBanner

Method: fnEmpMaintMenu

Scope / public static
Parameters / None
Return Values / None
Description / Displays the Employee Maintenance sub-menu. Then waits for user’s input using the nextInt() method of Scanner object. Until the user types in a selection, 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 waits for user’s input using the nextInt() method of Scanner object. Until the user types 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 user’s input using the nextInt() method of Scanner object. Until the user types in a selection, control 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, fnTelDirMaintMenu, 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 department 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 / Checks 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. Blank space, hyphen (-) and ampersand (&)

Calling Function / addDept
Functions called by this function / None

Method: checkDuplicateDeptName

Scope / private
Parameters / String – deptName, Connection - con
Return Values / boolean – true or false
Description / Checks whether the department name already exists in the department_table
Calling Function / addDept
Functions called by this function / None

CONFIDENTIALPage 1