You are on page 1of 43

Page |1

CAPSTONE PROJECT (PART I) REPORT

(Project Term August-December, 2012)

(ADVANCED FILE ORGANIZER)


(C#.NET)

Submitted by

(Shubham Gupta) Registration Number: 10902431


(Shilpa Aggarwal) Registration Number: 10904035
(Davinderjeet Sharma) Registration Number: 10900489

Project Group Number 2

Under the Guidance of


Miss Shilpa Narula
(Assistant Professor)

Discipline of Computer Science and Information Technology

Lovely Professional University, Phagwara

August to December, 2012


Page |2

DECLARATION

We hereby declare that the project work entitled Advanced File Manager is an authentic
record of our own work carried out as requirements of Capstone Project (Part-I) for the award
of degree of B.Tech in Computer Science from Lovely Professional University, Phagwara,
under the guidance of Miss Shilpa Narula, during August to December, 2012).

Project Group Number: 2

Shubham Gupta
10902431

Shilpa Aggarwal
10904035

Davinderjeet Sharma
10900489

(Shubham Gupta)

(Shilpa Aggarwal)

(Davinderjeet Sharma)
Page |3

CERTIFICATE

This is to certify that the declaration statement made by this group of students is correct to the
best of my knowledge and belief. The Capstone Project Proposal based on the technology /
tool learnt is fit for the submission and partial fulfilment of the conditions for the award of
B.Tech in Computer Science from Lovely Professional University, Phagwara.

Name : Shilpa Narula

U.ID : 15710

Designation : Assistant Professor

Signature of Faculty Mentor


Page |4

Index

1. Profile of the Problem..............................................................................[5]

2. Existing System

i. Introduction ........................................................................[5]
ii. Existing Software ............................................................[5-6]
iii. DFD for present system ......................................................[6]
iv. Whats new in the system to be developed? ...................[6-7]

3. Problem Analysis

i. Product definition ..........................................................[7-8]


ii. Feasibility Analysis......................................................[8-10]
iii. Project Plan ................................................................[10-11]

4. Software Requirement Analysis

i. Introduction ......................................................................[12]
ii. General Description ....................................................[12-13]
iii. Specific Requirements ......................................................[14]

5. Design

i. System Design ............................................................[15-19]


ii. Design Notations ........................................................[20-25]
iii. Detailed Design ..........................................................[25-29]
iv. Pseudo code ................................................................[29-33]

6. Technology &Tool

i. Introduction ................................................................[33-36]
ii. Programs ....................................................................[36-39]
iii. Snapshots ...................................................................[40-42]

7. References........................................................................................[43]
Page |5

Profile of the Problem:


Today it is impossible to imagine life without information, and information - without files.
By studies done by independent researches we came to know that more than 92% of
information is stored in files.

Today most of files are stored on HDD (Hard Disk Drives) that are presented in every
computer. They have size beginning from 40 000 Megabyte and hold millions of documents.
Now a days we can see Hard disk with 2 Terabytes size in personal computers that is able to
store millions of documents in variety of formats.

When we store such variety of files in our hard disk, especially if they are packed in
numerous of archives, it is extremely hard to navigate between them. People often don't
know, what files and where they are stored.

When in a folder several hundred, or even thousands of files with names like "mscore.txt",
"Calculation(10).doc", "mp396.rar", "video5.avi", "cod.zip" it will take days, or even weeks
and months to understand, what is what, rename all and move all in folders, according to
content.

The question arises here, is any solution of such heavy situation? And to Solve this situation
we came up with the idea of developing a application i.e. File Organizer.

Existing System
Introduction :

The definition for existing File Organizers is very limited. Existing file Organizers only
provide features like searching file, copying file, moving file. Existing file Organizer only
concentrate on specific file format like mp3, avi, mp4, jpeg, png. Existing file Organizers
only provide searching, copying and moving files on the basis of particular constraints. For
example searching can only by done by filename & extension of file. In Existing file
Organizers there is no sorting feature, if user want to sort the files in folders they need to
download Files Sorter application also there is no feature for locking files and folders for
this purpose user need to download Files and Folders Locking application. Existing file
Organizers does not allow us to remove duplicate files this is also done manually. No file
Organizer provide feature of organising files on the basis of all the attributes of file. So we
can see that there is no generalized application available in the market which can provide all
the features.

Existing Software :

One of the file Organizer we have studied about is Nerxy File Organizer.

Nerxy file organizer, is a very easy tool to organize audio and photo files on your system. It
scans your system for audio and photo files of particular format and will organize and rename
them to your personal settings. Nerxy file organizer will sort and move files according to
Page |6

their content and organize them into folders using options of your choice. The limitation of
this application is we can only organise music and image files. This file Organizer
automatically rename files according to predefined constraint, we can not specify how to
rename files. It only provides renaming of those files which are organised. It does not provide
option to sort files present in the folder instead it organise and sort files according to
predefined constraints.

Data Flow Diagram of Existing System

Figure 1 : Data Flow Diagram of Nerxy File Organiser

Whats new in the system to be developed ?

After studying the existing system and considering the user needs & problems, we have
decided to develop a Advanced File Organizer which can fulfil the user requirements
efficiently. In a software industry there is always space for something new, so we are first
focusing on the major tasks i.e. removing limitations of existing file Organizers and
incrementing the functionality of the system.

Searching of files on the basis of attributes names, locations, creation date, types of files
etc.
Searching of directories on the basis of all attributes, names, locations, creation date etc.
Copying of files from one location to another according to large variety of categories.
Page |7

Move of files from one location to another according to large variety of categories.
Rename files & directories according to user specified constraints.
Provides feature of locking files and directories.
Organise files on the basis of all the attributes present for a file.
Sort files & directories on the basis of attributes, names, locations, creation date, types of
files etc.
Create & Manage Logs to keep track of file and folder information.

Problem Analysis

Product Definition:

Advanced File Organizer is a system that will process all the data, that you have - audio and
video records, image galleries, software and document archives in the ideal order, giving you
ability to find information at any time. File Organizer will store all files in centralize storages
in file system, addresses for which you can specify at any time. And even more - File
Organizer will delete or move files to the specified place, that you like or dislike, need or
don't need. All is possible with flexible control system, with which it will perfectly fit to your
needs.

Objective

Search for files and folders.


Browse files and folders.
Copy files from one location to another according to category.
Move files from one location to another according to category.
Rename files & folders.
Provides feature of locking files and folders.
Arrange files from all disks into handy custom categories.
Retrieve files and folder information at any time.
Update file, folder, and disk information at any time.
Sort files, folders, disks and categories by attributes, names, locations, creation date, types
of files etc.
Create & Manage Logs.

Advanced File Organizer is organizing files with any content -

Audio records
Video records
Images
Text documents
Programs installation packs
Page |8

Archives and all files in archives


Files of any other types

Feasibility Analysis :

What are the users demonstrable needs?

User needs a system, which will remove all the above-mentioned problems that, the user is
facing. The user wants a system, which will provide ease of work, flexibility, fast file finding,
modifying, copying, removing, renaming, organising and generating the logs.

How can the problem be redefined?

We proposed our perception of the system, in accordance with the problems of existing
system by making a full layout of the system on paper. We looked at the problems and
requirements of the existing system. According to existing system we redefined the problem.

In feasibility study phase we had undergone through various steps, which are described as
under:

Technical feasibility

A study of resource availability that may affect the ability to achieve an acceptable system.
This evaluation determines whether the technology needed for the proposed system is available
or not.

Can the work for the project be done with current equipment existing software
technology & available personal?
Can the system be upgraded if developed?
If new technology is needed then what can be developed?
This is concerned with specifying equipment and software that will successfully satisfy
the user requirement.

The technical needs of the system may include:


Front-end and back-end selection

An important issue for the development of a project is the selection of suitable front-end and
back-end. When we decided to develop the project we went through an extensive study to
determine the most suitable platform that suits the needs of the organization as well as helps in
development of the project.

The aspects of our study included the following factors.


Page |9

Front-end selection:

It must have a GUI that assists users that are not from IT background.
Scalability and extensibility.
Flexibility.
Robustness.
According to the user requirement and the culture
Easy to debug and maintain.
Event driven programming facility.
Front end must support some popular back end like Ms Access,Ms SQL Server.

According to above stated features we selected C#.NET as the front-end designing and
programming.

Back-end Selection:

Efficient data handling.


Provide inherent features for security.
Efficient data retrieval and maintenance.
Stored procedures.
Popularity.
Operating System compatible.
Easy to install.
Various drivers must be available.
Easy to implant with the Front-end.

According to above stated features we selected Microsoft SQL Server as the backend.

The technical feasibility is frequently the most difficult area encountered at this stage. It is
essential that the process of analysis and definition be conducted in parallel with an assessment
to technical feasibility. It centres on the existing computer system and to what extent it can
support the proposed system.

Economical feasibility

Economic justification is generally the Bottom Line consideration for most systems.
Economic justification includes a broad range of concerns that includes cost benefit analysis. In
this we weight the cost and the benefits associated with the system and if it suits the basic
purpose of the user or organization i.e. profit making, the project is making to the analysis and
design phase.

The financial and the economic questions during the preliminary investigation are verified to
estimate the following:

The cost to conduct a full system investigation.


The cost of hardware and software for the class of application being considered.
P a g e | 10

The benefits in the form of reduced cost.


The proposed system will give the minute information, as a result the performance is
improved .

This feasibility checks whether the system can be developed with the available funds. The
Advanced File Organizer does not require enormous amount of money to be developed. This
can be done economically if planned judicially, so it is economically feasible. The cost of
project depends upon the number of man-hours required.

Operational Feasibility
It is mainly related to human organizations and political aspects. The points to be considered
are:

What changes will be brought with the system?


What organization structures are disturbed?
What new skills will be required? Do the existing users have these skills? If not, can
they be trained in due course of time?

The system is operationally feasible as it very easy for the End users to operate it. It only
needs basic information about Windows platform. Compared to the existing system the
proposed system will provide a better working environment in which there will be ease of
work and the effort required will be comparatively less than the existing system.

Schedule feasibility

Time evaluation is the most important consideration in the development of project. The time
schedule required for the development of this project is very important since more development
time effect machine time, cost and cause delay in the development of other systems. A reliable
File Organizer can be developed in the considerable amount of time.

Project Plan

Team Members : We are 3 member working together as a team.

Shubham Gupta (Project Head)

Responsibilities : As a project head I am involved in all the phases i.e. analysis, design, coding
and testing of this project, although my major responsibilities are checking progress of the
project timely, managing project resources and implementation(coding) & testing the project.

Shilpa Aggarwal :

Responsibilities: As a team member I am working on the software requirement analysis & the
graphical user interface of this project. Till now I had completed the software requirement
analysis part & will start designing of graphical user interface for the system soon.
P a g e | 11

Davinderjeet Sharma :

Responsibilities: As a team member I am working on the software system design & the
algorithm designing of this project. Till now I had completed the system design & working on
the algorithm designing for the system.

Milestones:

A milestone is an important event in the development of something (here System).We have


classified milestones as M1,M2,M3 and so on. Let us take a look on the milestones:

M1: In this milestone we had decided to complete the requirement gathering & analysis part. In
the month of September 2012 we had decided to create the project and gathered information
about the system, We analyzed various File Organizer systems available in the market and
came up with the new ideas that we can implement to increment the system functionality. Then
we started system requirement analysis phase and completed it till the end of September 2012.

M2: In this milestone we had decided to complete the system design. In the month of October
2012 we started working on the system design and completed the UML Diagram designing
work & Database table designing work till the end of the October month we had achieved this
milestone.

M3: In this milestone we have decided to complete the algorithm designing part for the system.
Till now we have completed 50% of Algorithm design and working on it. We except to achieve
this milestone till the end of December 2012.

M4: In this milestone we are going to start implementing the project. Coding part of the system
will we started & completed in this milestone. We will start coding in the beginning of the
month of January 2013 and except to achieve this milestone till the end of February 2013.

M5: In this milestone we are going to start the testing & debugging phase of the project. This
will we started in the beginning of March 2013 and expected to complete till the end of March
2013.After this our project is ready for distribution and we will release it in April 2013

September October November December January February March

Requirement System Algorithm Algorithm GUI Design Coding-II Testing &


Gathering &
Design Design 1 Design 2 & Coding-I Debugging
Analysis
P a g e | 12

Software Requirement Analysis


Introduction:

Softwares are an essential part of big systems. This makes a requirement to make different
software products, to easy the complicated tasks. For developing software, the software
development team undergoes an approach to software development progressing through:
analysis, design, coding, testing and support. And this phase works with the analysis of
software requirement, telling how the Advanced File Organizer is going to help user to
manage his/her system and decrease the work load.

This phase deals with analysis of what kind of application is to be developed to solve what all
problems and what platform, language, software and hardware is to be used to complete the
development of the application and reaching the stage where it works according to site of the
developer team (the site the team had while starting the project). The limited part of the site
of our team is present in the general description.

General Description:

The advanced file Organizer is here to sort problem of every system which have got multiple
numbers of files which are hard to tackle. Some file are lost and some of them are even
copied a no. of times, which is not required. How, if we get a software which manages all our
files and directories for us and save our time to sort, search, move, copy and perform
different operations in just some time making our work fast and our system managed. The
requirements list for a file Organizer is too long. For example:

A system at radio station: It has large and large no. of mp3 in its system. Some of
them are played regularly, some played occasionally, some are new, some are old and
with this there is addition of thousands of songs to these systems every day. Now the
question arises how to manage the list of song, so as to get the songs in time and there
is no mess while on air. Then the system needs a file Organizer badly. This is the
only tool which can help a person arrange his system according to his working
conditions.
A system at an organization: every organization today is growing globally. Working
very hard to match up the speed. To match of the speed information plays a very vital
role. No information no work, no work means loss. This means there is lot of
information being gathered by an organization every day. Large no. of data file are
being downloaded where, when, how? No one knows and when comes the time to get
to any one file. The person is all messed up. Now here the user requires a file
Organizer which organizes there file according to date of download and according to
the department and need.
Also if we take a system simply at home purpose or someones personal system.
Using internet every person downloads so many files everyday and more than half
even dont know where they save, even if they are saved somewhere or not. Since the
life is too fast no one have time specially to manage their personal system. What if?
P a g e | 13

They dont have to do anything and enjoy their favourite song without getting in a
mess of searching the song.

Similarly there exist several different problems with management of file in a system varying
person to person, organization to organization. For which there must exist software, which is
easy to understand and solve all problems, basically is generalized to be used for every
problem one can face. So here is the software for the same its different function given below
helps to tackle problems of a system, telling how the application will be helpful:

Searching: This function will search all the files and directories of the system for the
sorting purpose, for searching a particular file with a specified extension. Searching
can be done on the biases of extension, date of creation, size, last accessed.

Sorting: This function will sort all the files and directories of the system. The sorting
can be done arranging (for numerical) in ascending order, descending order, (for
characters and strings) alphabetical order, on the basis of, extension, date of creation,
size, last accessed.

Moving: This function will only move files and directories from one directory to the
other as per the order the files have been arranged. They may be moved on the basis
of extension (same extension files can be placed in one directory), date of creation,
recently accessed.

Copying: This function will only copy files and directories from one directory to the
other as per the order the files have been arranged. Same file may be required to be
stored in two different files. E.g. a music file is placed in common music list as well
as in the playlist saved from the player list.

Renaming: This function will help rename any file or directory according to need of
a person. When we download many files are downloaded with the name, which do not
justify what is the content of the file, many files are of same name but have different
content. Through this a file or a directory name can be changed as per the need of an
individual.

Deleting: This function will be helpful in removing the unwanted files and directories
through a safe mode. The files and directories being deleted will be saved in the
database of the software, which will help keep the record of the deleted files.

Locking: This function will be helpful to lock the file which one wants to keep
confidential from other user using the same system. One will no longer have to have a
file locker separately.
P a g e | 14

Specific Requirements:

The Advanced file Organizer being created by our team is a product which can be used in
system for organizing its files and directories. As we see how important a file organizer for a
system is, it is being developed in such a way so as to help every other system to stay
managed, avoid time consumption and make it easier for a user to use the system. The main
requirement tools of Advance file Organizer to function it on a system are:

System/Hardware Requirements :

Operating system: Windows XP, Windows Vista, Windows 7, Windows 8


Computer Intel Pentium 300 MHz or faster processor(recommended 500 MHz)
processor:
Operative memory: 64MB or more RAM (recommended: 128MB)
Space on hard disk: A hard disk with at least 10 MB free space (recommended: 50 MB)
Mouse: A Microsoft or compatible mouse (recommended)
Keyboard: A Microsoft or compatible keyboard (recommended)

Software Requirements: One needs a language or a platform on which the


application can be developed. The language we are using to develop our software is
C# and the platform being used is .NET framework. C# is a very advance language
with lots of new functions available. Visual studio is the IDE being used to work on
C# language which decreases the high coding load.

Microsoft .NET Framework : 3.5 or higher version.

Database: Database is another very vital tool for development of the advanced file
Organizer. It is used for storing all the details such as the details of a registered user,
details of file and directories that will go through any operations using Advanced file
Organizer, keeping the record of all the operations made by this application, also the
record of the locked files and directories and also there details to validate so as to
reuse the file and folders locked. The database being used by us for this application is
Microsoft SQL Server 2008, for we feel it to be secure and is compatible with the
software being used to develop Advanced file Organizer.
P a g e | 15

Design
System Design :

Figure 2 : Class Diagram for Advanced File Organizer


P a g e | 16

System design helps to understand all the attributes and methods needed by each class, which
are responsible for how the class will work. Let us now see how the class diagram for
advanced file organizer helps us to understand the functions of this software.

The class diagram for our software includes eight different classes which are:

User
Files
FileOperations
Directories
DirectoryOperations
Database
Logs
User_Records

Every class here has different attributes and operations.

1. User class:

User class explains the working of a user using the advanced file organizer with the variation
in its attributes with every user. All the details for the user are stored in database and so both
the classes User and Database are associated with each other. User class is also associated
with classes FileOperations and DirectoryOperations.

User class works with the help of some attributes and methods. Attributes for user class are:

username: this attribute tells the name of the user.


userpassword: this defines the password registered by the user.
usertype: this specifies the type of the user, whether the user is registered or not.

While the operations applied to this class are:

Createuser(): which will create a user with different username, userpassword and
user type to apply different operations on files and directories. All the data of a user
will be stored in a database.
DeleteLog(): this will delete record of logs from the database.
Deleteuser(): this will delete the registered user from the database of the software.
Login(): this method is used to verify the user trying to login the software. If the user
have not register oneself the user cannot use the software (can use only the trial
version if available).
Modifyuser(): this method help the user to modify his detailed info present in
database.
P a g e | 17

2. Files and FileOperations classes:

Files class gives the attributes of the file present in the particular selected directory. Files
class is an aggregated part of the directories. Therefore the aggregation relationship used in
between files and directories gives the whole part relationship, files being a part of
directories.

Files have a composite relationship with another class named FileOperations, which also
indicated the whole past relationship telling that if a file exist, exists the operations of file, i.e.
all the operations that a file can undergo exist in this class.

The attributes of a files class that are undertaken are:

filename: this tells name of the existing file.


filepath: this refers the path where the file in the system exist.
filesize: this tells the size of the file(what amount of memory is utilized)
filetype: this tells the type of file(whether its a document, picture, video, music, etc.)
filecreationtime: this attribute keeps the record of the date when was the file created.
filelastaccesstime: this attribute keeps the record of the date when the file was last
accessed.
filelastwritetime: this attribute keeps the record of the date when the file was last
modified or written over.
fileattributes: this attribute keeps the record of the attributes of the file.

The FileOperations class is an interface between class user and files, that is whatever the
operations will be performed, changes some the attributes of the files class. The operations
that can be applied to the files are given below:

CopyFiles(): this method copies the file from one directory to another directory or
sub-directory.
CreateLog(): this method is used to create a log of operation performed on files,log
will be saved into the database table.
LockFiles():this method will be used to provide securities to files,user can lock files.
MoveFiles(): this method moves the files in an arranged format as specified by the
software, so as to arrange the large no. of files present in the system directories.
RemoveFiles(): this operation helps to remove the unwanted files from the system.
RenameFiles(): the file through this method will be named so as to have a correct
judgment of the existing topic in the file.
SearchFiles(): this operation help to search the required file present in the system.
SortFiles(): this operation is the main operation of this file organizer, to sort the files
and arrange them so as arrange last no of unarranged files of the system.
UpdateLog():this method is used to update the logs.
P a g e | 18

3. Directories and DirectoryOperations classes:

Directories class gives the attributes of the directories present in any of the drive or a
directory. And the DirectoryOperations class includes the methods that a directory can
undergo.

Directories have a composite relationship with another class named DirectoryOperations,


which also indicated the whole past relationship telling that if a directory exist, exists the
operations of directories, i.e. all the operations that a directory can undergo exist in this class.

The attributes of a Directories class that are undertaken are:

directoryname: this tells name of the existing directort.


directorypath: this refers the path where the directory in the system exist.
directorysize: this tells the size of the directory(what amount of memory is utilized).
directoryparent: this tells the parent of directory(if the directory is a sub-directory).
directorycreationtime: this attribute keeps the record of the date when was the
directory created.
directorylastaccesstime: this attribute keeps the record of the date when the directory
was last accessed.

The DirectoryOperations class is an interface between class User and Directories, that is
whatever the operations will be performed, changes some the attributes of the Directories
class. The operations that can be applied to the directories are given below:

CopyDirectories(): this method copies the directory from one directory or drive to
another directory or sub-directory.
CreateLog(): this method creates a log of new operations performed on directory,log
will be saved into the database table.
LockDirectories(): this method will be used to provide securities to directories,user
can lock directories.
MoveDirectories(): this method moves the directories in an arranged format as
specified by the software, so as to arrange the large no. of directories present in the
system.
RemoveDirectories(): this operation helps to remove the unwanted directories from
the system.
RenameDirectories(): the directories through this method will be named so as to
have a correct judgment of the existing type of directories and files.
SearchDirectories(): this operation help to search the required directory present in
the system.
SortDirectories(): this operation is the main operation of this file organizer, to sort
the (files and) directories and arrange them so as arrange last no of unarranged
directories of the system.
UpdateLog():this method is used to update the logs.
P a g e | 19

4. Database class:

The class named Database function is to store all the records for users, files and its
operations and directories and its operations, logs and user records. Every time the software
works there are some or other changes made to the files and directories existing in the
system, all the updates hence made are stored here.

There are some attributes of class Database:

dbconnstring: a connection string is required to connect to database whose name is


provide here.
dbuser: database can only be accessed by the admin and have a user name and a
password. Here is the name of the user for database.
dbpassword: and the password to which is provided here.
dbserver: database server name is provided by this attribute.

5. User_Records class:

Every user using the software have its user_id, password and many others attributes which
are stored in database with the help of class User_Records. This class is a composite part of
the database, therefore this have a composite relationship with the class named database.

The attributes of this class are:

userid: this is the id required by the user to login the software.


username: this is the name of the user using the software.
userpassword: this is the password to validate the user.
usertype: this tells the type of the user using the software.
lastlogintime: this keeps the record of the user, when did one last access the software.

6. Logs class:

This class is also a composite part of the database, therefore this have a composite
relationship with the class named database.

The attributes for the class named Logsare:

logname: this attribute tells the name of the log.


logcreationdate: this attribute recods the creation date of the log.
logmodificationtime: this one keeps the record of the last modification date of the
log.
P a g e | 20

Design Notations:

Class Notation:

UML class is represented by the diagram shown below. The diagram is divided into four
parts.

The top section is used to name the class.


The second one is used to show the attributes of the class.
The third section is used to describe the operations performed by the class.
The fourth section is optional to show any additional components.

Use case Notation:

Use case represents a set of actions performed by a system for a specific goal. Use case is
represented as an eclipse with a name inside it. It may contain additional responsibilities.

Actor Notation :

An actor can be defined as some internal or external entity that interacts with the system.

Actor is used in a use case diagram to describe the internal or external entities.
P a g e | 21

Initial State Notation:

Initial state is defined to show the start of a process. This notation is used in almost all
diagrams.

The usage of Initial State Notation is to show the starting point of a process.

Final State Notation:

Final state is used to show the end of a process. This notation is also used in almost all
diagrams to describe the end.

The usage of Final State Notation is to show the termination point of a process.

Activity Notation :

An activity is the specification of a parameterized sequence of behaviour. An activity is


shown as a round-cornered rectangle enclosing all the actions, control flows and other
elements that make up the activity.

Decision Notation :

Decision notation in a UML Activity Diagram is a control node that accepts tokens on one or
two incoming edges and selects one outgoing edge from one or more outgoing flows.
P a g e | 22

Interaction Notation:

Interaction is basically message exchange between two UML components. The following
diagram represents different notations used in an interaction.

Interaction is used to represent communication among the components of a system.


P a g e | 23

Relationships :

Relationship is another most important building block of UML. It shows how elements are
associated with each other and this association describes the functionality of an application.

There are four kinds of relationships available.

Dependency:

Dependency is a relationship between two things in which change in one element also affects
the other one.

Association:

Association is basically a set of links that connects elements of an UML model. It also
describes how many objects are taking part in that relationship.

An aggregation relationship depicts a classifier as a part of, or as subordinate to, another


classifier.

A composition relationship represents a wholepart relationship and is a type of aggregation.


A composition relationship specifies that the lifetime of the part classifier is dependent on the
lifetime of the whole classifier.

Adornments applied on Association :

Name: You can use Name to specify the nature of association

Role: Each class has specific role that participates in the relationship. We can specify role to
the classes involve in the relationship.
P a g e | 24

Multiplicity: It represents how many objects may be connected across an instance of an


association.

Generalization:

Generalization can be defined as a relationship which connects a specialized element with a


generalized element. It basically describes inheritance relationship in the world of objects.

Realization:

Realization can be defined as a relationship in which two elements are connected. One
element describes some responsibility which is not implemented and the other one
implements them. This relationship exists in case of interfaces.

Diagrams :

Class Diagram:

The class diagram is a static diagram. It represents the static view of an application. The class
diagram describes the attributes and operations of a class and also the constraints imposed on
the system. The class diagram shows a collection of classes, interfaces, associations,
collaborations and constraints. It is also known as a structural diagram.

Use Case Diagram:

To model a system the most important aspect is to capture the dynamic behaviour. The use
case diagram is dynamic in nature there should be some internal or external factors for
making the interaction.

These internal and external agents are known as actors. So use case diagrams are consists of
actors, use cases and their relationships. The diagram is used to model the system/subsystem
of an application. A single use case diagram captures a particular functionality of a system.

Sequence Diagram:

A sequence diagram in a Unified Modelling Language (UML) is a kind of interaction


diagram that shows how processes operate with one another and in what order. It is a
construct of a Message Sequence Chart. A sequence diagram shows object interactions
P a g e | 25

arranged in time sequence. It depicts the objects and classes involved in the scenario and the
sequence of messages exchanged between the objects needed to carry out the functionality of
the scenario.

Activity Diagram:

Activity diagram is basically a flow chart to represent the flow form one activity to another
activity. The activity can be described as an operation of the system.

So the control flow is drawn from one operation to another. This flow can be sequential,
branched or concurrent. Activity diagrams deals with all type of flow1 control by using
different elements like fork, join etc.

Detailed Design:

Usecase Diagram :

Figure 3 : Usecase Diagram for Advanced File Organizer


P a g e | 26

Figure 4 : Usecase Diagram for Advanced File Organizer


P a g e | 27

Sequence Diagram :

Figure 5 : Sequence Diagram for Advanced File Organizer


P a g e | 28

Activity Diagram :

User File_Organiser Database

Login Check Database Find User

[Not Found]

Show Operations [Found]

Select Operations

Perform Operations

Update Log Manage Log

Log Out

Figure 6 : Activity Diagram for Advanced File Organizer


P a g e | 29

Database Tables :

Table 1 : User_Records

Table 2 : Logs

PseudoCodes :

Pseudocode for Searching Files :

Search(filename, filelist)

if the filelist is empty, return null

else

if the first item of the filelist has the desired value,

return its location

else return Search(filename, remainder of the filelist)

Pseudocode for Sorting Files :

Sort(filelist,firstindex,lastindex)

For I = firstindex to lastindex-1


P a g e | 30

J=I

Do while (J > 0) and (filelist(J) < filelist(J - 1))

Temp = filelist(J)

filelist(J) = filelist(J - 1)

filelist(J - 1) = Temp

J=J1
End-Do

End-For

Pseudocode for Removing Files :

Remove_Files(filelist)

For all files in filelist

Select file to Delete

Copy file to deletelist

End-for

If deletelist is empty,return null

Else

For each file in deletelist

Remove file

End-For

Pseudocode for Renaming Files :

Rename_Files(filelist)

For all files in filelist

Select file to Rename

Enter New name in variable newname

Rename filename to newname


P a g e | 31

End-for

Pseudocode for Searching Directories :

Search(directoryname, directorylist)

if the directorylist is empty, return ull

else

if the first item of the directorylist has the desired value,

return its location


else

return Search(directoryname, remainder of the directorylist)

Pseudocode for Sorting Directories :

Sort(directorylist,firstindex,lastindex)

For I = firstindex to lastindex-1

J=I

Do while (J > 0) and (directorylist(J) < directorylist(J - 1))

Temp = directorylist(J)

directorylist(J) = directorylist(J - 1)

directorylist(J - 1) = Temp

J=J-1

End-Do

End-For

Pseudocode for Removing Directories :

Remove_Directories(directorylist)

For all directory in directorylist

Select directory to Remove


P a g e | 32

Copy directory to deletelist

End-for

If deletelist is empty,return null

Else

For each directory in deletelist

Remove directory

End-For

Pseudocode for Renaming Directories :

Rename_Directories(directorylist)

For all directory in directorylist

Select directory to Rename

Enter New name in variable newname

Rename directoryname to newname

End-for

Pseudocode for Copying Directory And Its Content To Another Directory :

Copy(sourcedirectory, targetdirectory)

if targetdirectory does not exists

Create targetdirectory

For each File in sourcedirectory

Copy File into targetdirectory

End-For

For each subdirectory in sourcedirectory

Create subdirectory

Copy All subdirectory to targetdirectory;


P a g e | 33

End-For

Pseudocode for Moving Directory And Its Content To Another Directory :

Move(sourcedirectory, targetdirectory)

if targetdirectory does not exists

Create targetdirectory;

For each File in sourcedirectory

Move File into targetdirectory;

End-For

For each subdirectory in sourcedirectory

Create subdirectory

Move All subdirectory to targetdirectory;

End-For

Technology & Tools


(i) .NET Framework :

The .NET Framework is a new and revolutionary platform created by Microsoft for
developing applications.

It is a platform for application developers.


It is a Framework that supports Multiple Language and Cross language
integration.
IT has IDE (Integrated Development Environment).
Framework is a set of utilities or can say building blocks of your application
system.
.NET Framework provides GUI in a GUI manner.
.NET is a platform independent but with help of Mono Compilation System
(MCS). MCS is a middle level interface.
.NET Framework provides interoperability between languages i.e. Common Type
System (CTS).
P a g e | 34

.NET Framework also includes the .NET Common Language Runtime (CLR),
which is responsible for maintaining the execution of all applications developed
using the .NET library.
The .NET Framework consists primarily of a gigantic library of code.

Definition: A programming infrastructure created by Microsoft for building, deploying, and


running applications and services that use .NET technologies, such as desktop applications
and Web services.

(ii) C# Programming Language :

Microsoft describes C# as a simple, modern, object - oriented, and type - safe programming
language derived from C and C++. Most independent observers would probably change that
to derived from C, C++, and Java. Such descriptions are technically accurate but do little
to convey the beauty or elegance of the language. Syntactically, C# is very similar to both
C++ and Java, to such an extent that many keywords are the same, and C# also shares the
same block structure with braces ( {} ) to mark blocks of code, and semicolons to separate
statements. The first impression of a piece of C# code is that it looks quite like C++ or Java
code. Beyond that initial similarity, however, C# is a lot easier to learn than C++, and of
comparable difficulty to Java. Its design is more in tune with modern developer tools than
both of those other languages, and it has been designed to provide, simultaneously, the ease
of use of Visual Basic and the high - performance, low - level memory access of C++, if
required. Some of the features of C# are:

Full support for classes and object - oriented programming, including both interface
and implementation inheritance, virtual functions, and operator overloading.
A consistent and well - defined set of basic types.

Built - in support for automatic generation of XML documentation.

Automatic cleanup of dynamically allocated memory.

The facility to mark classes or methods with user - defined attributes. This can be
useful for documentation and can have some effects on compilation (for example,
marking methods to be compiled only in debug builds).

Full access to the .NET base class library, as well as easy access to the Windows API.

Pointers and direct memory access are available if required, but the language has been
designed in such a way that you can work without them in almost all cases.

Support for properties and events in the style of Visual Basic.


P a g e | 35

Just by changing the compiler options, you can compile either to an executable or to a
library of.NET components that can be called up by other code in the same way as
ActiveX controls(COM components).

C# can be used to write ASP.NET dynamic Web pages and XML Web services.

(iii) Visual Studio IDE :

Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It


is designed to make the process of writing your code, debugging it, and compiling it to an
assembly to be shipped as easy as possible. What this means is that Visual Studio gives you a
very sophisticated multiple - document - interface application in which you can do just about
everything related to developing your code. It is used to develop console and graphical user
interface applications along with Windows Forms applications, web sites, web applications,
and web services in both native code together with managed code for all platforms supported
by Microsoft Windows, Windows Mobile, Windows CE, .NET Framework, .NET Compact
Framework and Microsoft Silverlight.

It offers these features:

Text editor Using this editor, you can write your C# code. This text editor is quite
sophisticated. For example, as you type, it automatically lays out your code by
indenting lines, matching start and end brackets of code blocks, and color - coding
keywords. It also performs some syntax checks as you type, and it underlines code
that causes compilation errors, also known as design - time debugging. In addition, it
features IntelliSense, which automatically displays the names of classes, fields, or
methods as you begin to type them. As you start typing parameters to methods, it will
also show you the parameter lists for the available overloads.

Design view editor This editor enables you to place user - interface and data -
access controls in your project; Visual Studio automatically adds the necessary C#
code to your source files to instantiate these controls in your project. (This is possible
because all .NET controls are instances of particular base classes.)

Supporting windows These windows allow you to view and modify aspects of
your project, such as the classes in your source code, as well as the available
properties (and their startup values) for Windows Forms and Web Forms classes. You
can also use these windows to specify compilation options, such as which assemblies
your code needs to reference.

The ability to compile from within the environment Instead of needing to run the
C# compiler from the command line, you can simply select a menu option to compile
the project, and Visual Studio will call the compiler for you and pass all the relevant
command - line parameters to the compiler, detailing such things as which assemblies
P a g e | 36

to reference and what type of assembly you want to be emitted (executable or library
.dll , for example). If you want, it can also run the compiled executable for you so that
you can see whether it runs satisfactorily. You can even choose between different
build configurations (for example, a release or debug build).

Integrated debugger It is in the nature of programming that your code will not
run correctly the first time you try it. Or the second time. Or the third time. Visual
Studio seamlessly links up to a debugger for you, allowing you to set breakpoints and
watches on variables from within the environment.

Integrated MSDN help Visual Studio enables you to access the MSDN
documentation from within the IDE. For example, if you are not sure of the meaning
of a keyword while using the text editor, simply select the keyword and press the F1
key, and Visual Studio will access MSDN to show you related topics. Similarly, if
you are not sure what a certain compilation error means, you can bring up the
documentation for that error by selecting the error message and pressing F1.

Access to other programs Visual Studio can also access a number of other
utilities that allow you to examine and modify aspects of your computer or network,
without your having to leave the developer environment. Among the tools available,
you can check running services and database connections, look directly into your SQL
Server tables, and even browse the Web using an Internet Explorer window.

(iv) Microsoft SQL Server :

Microsoft SQL Server is a relational database management system developed by


Microsoft. As a database, it is a software product whose primary function is to store and
retrieve data as requested by other software applications, be it those on the same
computer or those running on another computer across a network. There are at least a
dozen different editions of Microsoft SQL Server aimed at different audiences and for
different workloads (ranging from small applications that store and retrieve data on the
same computer, to millions of users and computers that access huge amounts of data from
the Internet at the same time).We are using Microsoft SQL Server 2008 Express Edition
for our project.

Programs

Module Designed for listing all files in a Directory & its sub directories :

private void List_All_Files_Click(object sender, EventArgs e)


{
try
{
Results_Box.Text = " ";
P a g e | 37

D_Info = new DirectoryInfo(DirPath);

F_Info = D_Info.GetFiles("*.*", SearchOption.AllDirectories);

foreach (FileInfo F_Info1 in F_Info)


{
Results_Box.AppendText(F_Info1.FullName + Environment.NewLine);
}
}
catch (Exception E)
{
MessageBox.Show("Enter Drive/Directory Path First ");
}
}

Module Designed to list all the files in particular top directory only :

private void List_Directory_Files_Click(object sender, EventArgs e)


{
try
{
Results_Box.Text = " ";
D_Info = new DirectoryInfo(DirPath);
F_Info = D_Info.GetFiles("*.*", SearchOption.TopDirectoryOnly);
foreach (FileInfo F_Info1 in F_Info)
{
Results_Box.AppendText(F_Info1.FullName + Environment.NewLine);
}
}
catch (Exception E)
{
MessageBox.Show("Enter Drive/Directory Path First ");
}
}

Module Desgined to List Sub Directories within a selected directory :

private void List_Sub_Directories_Click(object sender, EventArgs e)


{
try
{
Results_Box.Text = " ";
D_Info = new DirectoryInfo(DirPath);
P a g e | 38

D_Info1 = D_Info.GetDirectories();
foreach (DirectoryInfo D_Info2 in D_Info1)
{
Results_Box.AppendText(D_Info2.Name + Environment.NewLine);
}
}
catch (Exception E)
{
MessageBox.Show("Enter Drive/Directory Path First ");
}

Module Designed to Copy Files from one directory to another directory :

private void Copy_btn_Click(object sender, EventArgs e)


{
try
{

D_Info = new DirectoryInfo(SrcPath);


F_Info = D_Info.GetFiles();
foreach (FileInfo F_Info2 in F_Info)
{
string srcfile = Path.Combine(SrcPath, F_Info2.Name);
string destfile = Path.Combine(DestPath, F_Info2.Name);
File.Copy(srcfile, destfile);
}
MessageBox.Show(F_Info.Length + " Files Copied ");
}
catch(Exception E)
{
MessageBox.Show("Cannot Copy Files");
}
}

Module Designed to Move files from one directory to another directory :

private void Move_btn_Click(object sender, EventArgs e)


{
try
{
D_Info = new DirectoryInfo(SrcPath);
F_Info = D_Info.GetFiles();
P a g e | 39

foreach (FileInfo F_Info2 in F_Info)


{
string srcfile = Path.Combine(SrcPath, F_Info2.Name);
string destfile = Path.Combine(DestPath, F_Info2.Name);
File.Move(srcfile, destfile);
}
MessageBox.Show(F_Info.Length + " Files Moved ");
}

catch (Exception E)
{
MessageBox.Show("Cannot Move Files ");
}

Module Designed to Sort files present in a Directory :

private void Sort_Btn_Click(object sender, EventArgs e)


{
D_Info = new DirectoryInfo(DirPath);
F_Info = D_Info.GetFiles();
List<FileInfo> files = new List<FileInfo>();
foreach (FileInfo F_Info2 in F_Info)
{
files.Add(F_Info2);
}
files.Sort(new CompareFileInfoEntries());

}
public class CompareFileInfoEntries : IComparer<FileInfo>
{
public int Compare(FileInfo f1, FileInfo f2)
{
return (string.Compare(f1.Name, f2.Name));
}
}
P a g e | 40

Snapshots :

Figure 7: Listing all files present in a Directory & Sub-Directories

Figure 8 : Listing all files present only in parent directory


P a g e | 41

Figure 9 : Listing all Sub-Directories present in selected directory

Figure 10 : Copying Files from one directory to another


P a g e | 42

Figure 11 : Moving files from one directory to another directory

Figure 12 : Listing file attributes


P a g e | 43

References

Books :

(i) Pro C# 2008 and the .NET 3.5 Platform(Fourth Edition)

~By Andrew Troelsen

(ii) Unified Modeling Language User Guide

~By

Grady Booch
James Rumbaugh
Ivar Jacobson

Websites :

(i) http://en.wikipedia.org/wiki/Microsoft_SQL_Server

(ii) http://en.wikipedia.org/wiki/Microsoft_Visual_Studio

(iii) http://www.homeandlearn.co.uk/

You might also like