Top Banner
부부부부부 부부부부부 부부부 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at P Page 1 Analysis & Design of Information Systems Analysis & Design of Information Systems Development of the Messenger Development of the Messenger System System Ta Suong Phung, Lee SunHwa, Kim ChangBong Review:6 부부 : 2008.06.10 부부
39

부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Dec 26, 2015

Download

Documents

Willis Holland
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

부산대학교 산업공학과 대학원

Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Department of Industrial Engineering at PNU.Page 1

Analysis & Design of Information SystemsAnalysis & Design of Information Systems

Development of the Messenger Development of the Messenger SystemSystem

Ta Suong Phung, Lee SunHwa, Kim ChangBong

Review:6날짜 : 2008.06.10

표지

Page 2: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 2

Contents of the Term Project

1. Project Management1. Conference Records2. Schedule

2. The Thesis1. Select Target System2. Basic Function3. Organization

3. Analysis of the System1. System Running

Process2. System Module3. Selection of the

Compiler4. Design of the System

1. System Modeling2. GUI Design3. D/B Design

5. Implementation of the System1. GUI Development2. Module3. Messenger S/W

6. System Open1. List of the Problems2. Make up for the Weak

Points7. Event

1. 5/13(Problem Statement)

2. 5/27(Analysis & Design)

3. 6/10(System Open)

Page 3: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 3

1. Project Management-Conference Records

DepartmentIndustrial

engineeringDate 2008.5.7 ~

Meeting place

Seminar Room 616Attendant

Ta Suong Phung, Lee SunHwa, Kim ChangBong

Objective Development of the Messenger System

2008.5.7 12:00PM Objective discussion

2008.5.7 3:00PM Selection of Target System , Process and Modules discussion

2008.5.10 1:00PM Prepare our Document for the first Presentation

2008.5.13 4:00PM Presentation, Discussion for Modeling Design

2008.5.20 4:00PM Evaluation for Design Result

2008.5.27 4:00PM Second Presentation

2008.5.31 4:00PM Functional & Dynamic Modeling

2008.6.5 6:00PM System Test & Problem Report

2008.6.7 2:00PM System Testing & Debugging

Page 4: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 4

1. Project Management-Schedule

Detail Work 2008

Function & Process Define

JUNE

Analysis

Modeling

Implementation

System Open

MAY

(05/20)▼

(05/27) Second P resentation▼

(05/13) First P resentation▼

05/08 ▼

(06/10) Final Presentation ▼

Pre_Process

Main_Process

Post_Process

Page 5: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 5

1. Project Management-Reference Book & Source

Reference Book UML 활용 Teach yourself C, C++, Visual C++ 6.0 Step by Step Visual C++ Visual C++ .NET 프로그래밍 정복 Visual C++ 6.0 그대로 활용하기 Visual C++ Programming Bible Visual C++ .NET Programming Bible 메시지를 중심으로 한 Visual C++ .NET 이형배의 Visual C++ 6.0 Windows API 정복 Visual C++ How To

Reference Site http://www.codeguru.com http://www.devpia.com

Page 6: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 6

2. The Thesis-Select Target System

1. Some Alternative System for Term Project

Person To Person FTP (File transfer protocol)

Messenger: for chatting and transferring file

Calculator

Explorer

Database programming for Our Class: input, output, modify, delete & relation

2. We choose the target system:

Messenger => It’s very useful and interesting for all people day by day

Page 7: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 7

2. The Thesis-Organization

NAME ROLE

Ta Suong Phung

- Definition of the Basic Function- Definition of the System Module- System Analysis & Design (Object Modeling, Funtional Modeling)- Implementation (GUI)- Pilot Open & Testing- Make up for the Weak Points

Lee SunHwa

- Creation of the Conference Records- Definition of the Process- Definition of the System Module- System Analysis & Design (Dynamic Modeling)- Pilot Open & Testing- List of the Problem- User’s Manual

Kim ChangBong

- Definition of the Project Process - System Analysis & Design (Dynamic Modeling)- GUI & D/B Design- Implementation (Function & Module)- Upgrade of the System

Page 8: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 8

2. The Thesis-Basic Function

1. Basic Function of Messenger Programming

Chatting: group chat or single chat

Send & Receive file

Show Webcam

Voice chat

Connect to blog, mail...

2. For limited time, we just focus on 2 main basic function

Chatting: single chat

Send & Receive file

Page 9: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 9

3. Analysis of the System-Running Process

Run Messenger Program

Register Friend list: ID, IP, description

Double Click on the Friend Name

New window appear

Connect to the friend

Chatting

Transfer file (if needed)

Close the window (end of chatting)

Page 10: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 10

3. Analysis of the System-System Module

For a messenger programming, we need some system module:

Manager List

State check

Chatting Module

Transfer Module

Open

Select file

Sender

Check result

Page 11: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 11

3. Analysis of the System-Selection of the Compiler

We have developed our Team Project Program using C++ with .Net

There are some reason as follows

Team Member have not experience with JAVA

We have message source that developed C++

C++ provide with excellent function for CLASS Definition

Member Function and Member Variables

OOP (Object Orient Programming)

Visual GUI

Class Management with Tree Structure

Page 12: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 12

4. Design of the System –System Modeling(Object)

Identify Object:

Path

Messenger Management

Page 13: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 13

4. Design of the System –System Modeling(Object)

Data dictionary:

User: the person directly using the messenger programming

IP: the IP address for connecting to Internet ID: the user name in the messenger program Friend List: the list of friend for each ID user name File transfer: the file needed to transfer between

the user and friend Path: the address of the file Messenger Management: control the messenger list

(delete or add friend) Chatting conversation: the content of chatting Chatting sentence: sentence in the content of

chatting Word: each chatting sentence composes of many words

Page 14: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 14

4. Design of the System –System Modeling(Object)

Identify Association

Page 15: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 15

4. Design of the System –System Modeling(Object)

Attribute of object

Page 16: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 16

Event Classes and Attributes

4. Design of the System –System Modeling(Dynamic)

Running Program (File)

Show Tray Menu (IP, ID, User)

Show Main Menu (Pop-Up Menu)

Send Instant Message (Chatting Window)

Deleting List (IP, ID, User)

New Friend (IP, ID, User)

File Trans (Path, File Transfer)

Checking Online (IP)

Chatting (Keyboard, Chatting Sentence, Word)

Page 17: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 17

4. Design of the System –System Modeling(Dynamic)

Event Trace

User FriendMessenger

Double click Messenger File

Show Program

Right Click on “Name”

Show Main GUI

Select “Send Message”

Check Status

Return Status Result

Show Friend Status

Key inSend Message

Key In

O.K?

Select “File Trans”Show Message

Show Message

Select FileSend File

Select “Cancel”

End Program

Page 18: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 18

4. Design of the System –System Modeling(Dynamic)

State diagram Review 1

IdleRegister

tray

Running P/Gdo: Show Friend List

Checking Online State

ClosingWindow

Chatting Window

Connecteddo: Chatting

Disconnection

Double click

Double click

Click “CANCEL”Double click on “Name”

StateOff

State On

Connection

Key In

Click “CANCEL”

Waiting Mode

Double click

Failure Connection

do: Show Message

Waiting Mode

File Searchdo: Show DirectoryClick

“TRANS”Select

File

Acceptable Checking

ClosingWindow

Not success

Accept

Not Accept

do: Failure Message

Click “O.K”

do: O.K Message

success

Click “O.K”

Minimum P/G

Page 19: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 19

4. Design of the System –System Modeling(Dynamic)

State diagram Review 2

Idle(ICON

)

Register tray

Running P/Gdo: Show Friend List

Show Main Menu

ClosingWindow

Chatting Window

Left Click

Click “CANCEL”

Right Click on “Name”

StateOff

SendMessage

Waiting Mode

Double click

Failure Connectiondo: Show Message

Waiting Mode

P/G Stop

Checking Online State

State On

Delete Friend

Deleting List

Friend Windo

w

ConnectionConnecteddo: Chatting

do: Not AcceptMessage

Key In

File Send

New Friend

Clink“O.K”

Add Friend

File Searchdo: Show Directory

SelectFile

Acceptable Checking

File SendingProcess

Accept

do: O.K Message

Not Accept

Click “O.K”

Right ClickTray Icon

Show Tray MenuShow

MessengerSelect Show

ClosingP/G

Program

Select Exit

Closing ChatWindow

Click “CANCEL”

Page 20: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 20

4. Design of the System –System Modeling(Dynamic)

Idle(ICON

)

Register tray

Running P/Gdo: Show Friend List

Show Main Menu (Multi Thread)

ClosingWindow

Chatting Window

Left Click

Click “CANCEL”

Right Click on “Name”

StateOff

SendMessage

Double click

Failure Connectiondo: Show Message

Waiting Mode

P/G Stop

Checking Online State

State On

Delete Friend

Deleting List

Friend Windo

w

ConnectionConnecteddo: Chatting

do: Not AcceptMessage

Key In

File Trans

New Friend

Clink“O.K”

New Friend

File Searchdo: Show Directory

SelectFile

Acceptable Checking

File SendingProcess

Accept

do: O.K Message

Not Accept

Right ClickTray Icon

Show Tray MenuShow

MessengerSelect Show

ClosingP/G

Program

Select Exit

Closing ChatWindow

Click “CANCEL”

Add Friend

InputData

State diagram Review 3

Page 21: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 21

4. Design of the System –System Modeling(Dynamic)

Idle(ICON

)

Register tray

Running P/Gdo: Show Friend List

Show Main Menu (Multi Thread)

ClosingWindow

Chatting Window

Left Click “Show Messenger”

Click “CANCEL”

Right Click on “Name”

StateOff

SendMessage

Double click

Failure Connectiondo: Show Message

P/G Stop

State On

Delete Friend

Deleting List

Friend Windo

w

ConnectionConnecteddo: Chatting

do: Not AcceptMessage

Key In

File Trans

New Friend

Clink“O.K”

New Friend

File Searchdo: Show Directory

SelectFile

Acceptable Checking

File SendingProcess

Accept

do: O.K Message

Not Accept

Right ClickTray Icon

Show Tray MenuShow

MessengerSelect Show

ClosingP/G

Program

Select Exit

Closing ChatWindow

Click “CANCEL”

Add Friend

InputData

State diagram

Review 4Checking

Online State

Chatting Window

Page 22: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 22

4. Design of the System –Functional Modeling

Data Flow diagram

Page 23: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 23

4. Design of the System –GUI Design Review1

Messenger

Minimize

ID Name IP Address

Description

TSPhund Ta Suong Phung xx.xx.xx.xx Friend

SHLee Lee SunHwa xx.xx.xx.xx Friend

CBkim Kim ChnagBong xx.xx.xx.xx Friend

Right Click!

Chatting

CANCEL

Chatting Result

Input Text

1

3

File Accepted

Show Directory

File Selection

OK

Accept Not

4

2 Send Instant Msg

Delete Friend

Friend Save

New Friend

File Trans

Page 24: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 24

4. Design of the System –GUI Design Review2

Messenger

Minimize

ID Name IP Address

Description

0 TSPhund Ta Suong Phung xx.xx.xx.xx Friend

1 SHLee Lee SunHwa xx.xx.xx.xx Friend

0 CBkim Kim ChnagBong xx.xx.xx.xx Friend

Right Click!

Chatting

CANCEL

Chatting Result

Input Text

1

3

File Accepted

Show Directory

File Selection

OK

Accept Not

4

2 Send Instant Msg

Delete Friend

Friend Save

New Friend

File Trans

On-line status for

Friend

Page 25: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 25

4. Design of the System –D/B Design

File Name: FriendList.txt

Ta Suong Phung; 192.163.125.12; FriendLee SunHwa; 192.163.125.12; FriendKim ChangBong; 192.163.125.12; Friend......

When Program Running, The Program read Friend list from text file that named “FriendList.txt”The Character‘;’means that divide symbol for each text

Messenger

Minimize

ID Name IP Address Description

TSPhund Ta Suong Phung xx.xx.xx.xx Friend

SHLee Lee SunHwa xx.xx.xx.xx Friend

CBkim Kim ChnagBong xx.xx.xx.xx Friend

Page 26: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 26

5. Implementation of the System–GUI Development

Main Messenger GUI

Main Chatting GUI

Register Friend GUI

File Trans Status GUI

Page 27: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 27

5. Implementation of the System–Module

24 Class Type are implemented

Program Source (head & cpp)

Page 28: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 28

5. Implementation of the System–Module

Manager List Class Definition

Class Name: CNewFriendMember Function

OnInitDialogOn Ok

Member Variablesm_strIdm_strIntroducem_strIpm_strName

/////////////////////////////////////////////////////////////////////////////// CNewFriend dialog

class CNewFriend : public CDialog{// Constructionpublic:

CNewFriend(CWnd* pParent = NULL); // standard constructor

// Dialog Data//{{AFX_DATA(CNewFriend)enum { IDD = IDD_DIALOG_NEWFRIEND };CString m_strId;CString m_strIntroduce;CString m_strIp;CString m_strName;//}}AFX_DATA

// Overrides// ClassWizard generated virtual function

overrides//{{AFX_VIRTUAL(CNewFriend)protected:virtual void DoDataExchange(CDataExchange*

pDX); // DDX/DDV support//}}AFX_VIRTUAL

// Implementationprotected:

// Generated message map functions//{{AFX_MSG(CNewFriend)virtual void OnOK();virtual BOOL OnInitDialog();//}}AFX_MSGDECLARE_MESSAGE_MAP()

public:afx_msg void OnBnClickedOk();

};

Page 29: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 29

5. Implementation of the System–Module

Manager List Functon Definition

if(File.Open("FriendList\\FriendList.txt",CFile::modeCreate | CFile::modeWrite)!=0){ CNewFriend *pdlg = new CNewFriend();

pdlg->DoModal();CFriend Friend;Friend.m_strId = pdlg->m_strId;Friend.m_strIp = pdlg->m_strIp;Friend.m_strName = pdlg->m_strName;Friend.m_strIntroduce = pdlg->m_strIntroduce;

CFriend *pFriend = new CFriend;*pFriend = Friend;

CString temp = pFriend->GetTotal();File.Write(temp,temp.GetLength());File.Write("\n",1);delete pdlg;delete pFriend;

}File.Close();

Class link with GUI

Page 30: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 30

5. Implementation of the System–Module

State check

Class Definition

class CMessenger{//functionspublic:

CMessenger(CListControl *pListControl);virtual ~CMessenger();bool Initiate(SINGLELIST *pSingleList);bool NewCheckList();bool DeleteCheckList();void ConnectionState();bool SendFileInfo(CString Ip,CString FilePathName);

//variablespublic:

//CCheckTransferm_CheckTransfer;

CCheckWaitm_CheckWait;

SINGLELIST*m_pSingleList;

SINGLELISTm_CheckList;

CListControl*m_pListControl;

CCriticalSection*m_pCritical;CWinThread

*m_pCheckStateThread;CFileThread

*m_pFileThread;bool

m_bCheckState;};

UINT CheckStateThread(LPVOID pParam);

#endif // !defined(AFX_MESSENGER_H__B70377BD_30B6_45CD_B1DA_A226E29E9954__INCLUDED_)

Page 31: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 31

5. Implementation of the System–Module

Class Definition

/////////////////////////////////////////////////////////////////////////////// CChatThread

IMPLEMENT_DYNCREATE(CChatThread, CWinThread)

CChatThread::CChatThread(){}

CChatThread::~CChatThread(){}

BOOL CChatThread::InitInstance(){

// TODO: perform and per-thread initialization herereturn TRUE;

}

int CChatThread::ExitInstance(){

// TODO: perform any per-thread cleanup herereturn CWinThread::ExitInstance();

}

BEGIN_MESSAGE_MAP(CChatThread, CWinThread)//{{AFX_MSG_MAP(CChatThread)// NOTE - the ClassWizard will add and remove mapping macros

here.//}}AFX_MSG_MAP

END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////// CChatThread message handlers

bool CChatThread::Initiate(){

if(!m_ChatWait.Initiate())return false;

return true;}

Chatting Module Create

Thread

ChatTransfer

Page 32: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 32

5. Implementation of the System–Module

Chatting Module Create

Thread

ChatTransfer

Class Definition

Class Name: CchatTransferMember Function

ConnectReceiveSend

Member Variablesm_pFilem_pMsgm_state

/////////////////////////////////////////////////////////////////////////////// CChatTransfer command targetclass CInstantmsgDlg;class CData;

class CChatTransfer : public CSocket{// Attributespublic:

CInstantmsgDlg

*m_pMsg;int

m_state;enum State{Server,Client};

CSocketFile*m_pFile;

CArchive*m_pArchiveIn;

CArchive*m_pArchiveOut;

CWnd*m_pWnd;

// Operationspublic:

CChatTransfer(void *pClientDlg);CChatTransfer(CInstantmsgDlg *pDlg);virtual ~CChatTransfer();virtual bool Connect(CString *pIp);

void operator << (CData &data);void operator >> (CData &data);void Flush();void Send(CData *pData);void Receive(CData *pData);void Init();//It should initiate after connecting

Page 33: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 33

5. Implementation of the System–Module

Manager List

State check

Chatting Module

Transfer Module

Open

Select file

Sender

Check result

class CFileTransfer : public CSocket{// Attributespublic:

Cfile *m_pHFile;CSocketFile *m_pFile;Carchive *m_pArchiveIn;Carchive *m_pArchiveOut;CWnd *m_pWnd;CProgressDlg *m_pDlg;bool m_bReceiving;bool m_bFinish;bool m_bLast;int m_intLastCount;int m_intLastLength;int m_FileSize;int m_FileDivy;int m_CountFileDivy;int m_FileRest;DWORD m_CurFilePosition;

// Operationspublic:

CFileTransfer();virtual ~CFileTransfer();virtual bool Connect(CString *pIp);bool FileOpen(CString *pFilePathName);

void operator << (CFileData &data);void operator >> (CFileData &data);void Flush();

Page 34: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 34

5. Implementation of the System–Module

Transfer Module

Open

Select file

Sender

Check result

/////////////////////////////////////////////////////////////////////////////// CCheckTransfer command target

class CCheckTransfer : public CSocket{// Attributespublic:

// Operationspublic:

CCheckTransfer(CFriend *pFriend);virtual ~CCheckTransfer();CFriend

m_Friend;bool

m_bConnected;int

m_intTimeout;

bool Connect(CString *pIp);

// Overridespublic:

// ClassWizard generated virtual function overrides

//{{AFX_VIRTUAL(CCheckTransfer)public:virtual void OnReceive(int nErrorCode);virtual void OnClose(int nErrorCode);//}}AFX_VIRTUAL

// Generated message map functions//{{AFX_MSG(CCheckTransfer)

// NOTE - the ClassWizard will add and remove member functions here.

//}}AFX_MSG

// Implementationprotected:};

Page 35: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 35

5. Implementation of the System–Messenger S/W

Running State

Tray State

Chatting GUI-User

Chatting GUI-Friend

Send Message

Page 36: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 36

5. Implementation of the System–Messenger S/W

Add New Friend

File Send Select File

Friend Inform

Page 37: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 37

6. System Open–List of the Problems

MF71D.DLL does not exist on Ta suong Phung’s Computer(English Windows)

Solution : - Change compile option (Dynamic Link Library Static)- Copy MF71D.DLL file to same directory with *.exe

After change compile Option, Some Function dose not working as follow

Can’t control Friend Function Program Down

Solution : 1. Change compile option (Dynamic Link Library & Debug)2. Copy MF71D.DLL file to same directory with *.exe

Page 38: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 38

6. System Open–List of the Problems

In Chatting Window, Input some word and enter keyboard then friend just can see blank space

Solution : 1. Change Action State : Read Only2. Prevent “Enter Event” in

the chatting window

Just see word!!

My messenger Friend messenger

Page 39: 부산대학교 산업공학과 대학원 Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong Department of Industrial Engineering at PNU. Page 1 Analysis & Design of Information.

Department of Industrial Engineering at PNU.Copyright © 2008 Ta Suong Phung, Lee SunHwa, Kim ChangBong

Page 39

CONCLUSION

Objective of term project: base on the theory of Object-Oriented Modeling and Design, make the model for implementation.

Targeted model: messenger programming

Analysis and Design the model through:Object ModelingDynamic ModelingFunctional Modeling

Implementation: using C++

Because of the limited of time, our model still has some small problem needed to be improved in further.