Application for Departental Store

Embed Size (px)

Citation preview

  • 8/14/2019 Application for Departental Store

    1/128

  • 8/14/2019 Application for Departental Store

    2/128

  • 8/14/2019 Application for Departental Store

    3/128

    SOFTDOT HI-TECH EDUCATION & TRAINING INSTITUTEK-16 South Ex Part-INEW DELHI-110049PHONE: 24601315

    Contents

    1. Certificate. 4

    2. Acknowledgement 5

    3. Introduction to C-Programming 64. User Manual. 13

    5. Software Requirement Specification. 16

    5.1 Software requirement specification

    5.2 Hardware requirement specification

    6. System Analysis Design20

    7. Data Flow Diagram..32

    8. E-R Diagram.43

    9. Flow Chart52

    10. Coding...64

    11. Output.. 96

    12. Testing.113

    13. Bibliography...118

    3

  • 8/14/2019 Application for Departental Store

    4/128

  • 8/14/2019 Application for Departental Store

    5/128

    I, Ashish Verma, express my deep sense of gratitude and indebt ness to the

    faculty members of Softdot Hi-tech education & training institute and my

    guides, Ms. Deepika Singh & Mr. Jay Prakash Jay, under whose inspiring

    guidance, valuable suggestions, constant encouragement and kind

    supervision, with her help, the present project on Automation of

    Departmental Store was carried out.

    I also wish to express our indebt ness to those who helped us during the

    preparation of the manuscript of this text.

    My sincere thanks to all those friends who have helped us directly or

    indirectly by giving their useful suggestions. Without their help this project

    report would never have been completed.

    Your Name

    Ashish Verma

    5

    ACKNOWLEDGEMENT

  • 8/14/2019 Application for Departental Store

    6/128

    6

  • 8/14/2019 Application for Departental Store

    7/128

    1. Introduction to C Programming

    Objectives

    This section is designed to give you a general overview of the Cprogramming language. Although much of this section will be expanded inlater sections it gives you a taste of what is to come.

    Why use C?

    C has been used successfully for every type of programming problemimaginable from operating systems to spreadsheets to expert systems - andefficient compilers are available for machines ranging in power from theMacintosh to the Cray supercomputers. The largest measure ofC's successseems to be based on purely practical considerations:

    the portability of the compiler; the standard library concept;

    a powerful and varied repertoire of operators;

    an elegant syntax;

    ready access to the hardware when needed;

    and the ease with which applications can be optimized by hand-codingisolated procedures

    C is often called a "Middle Level" programming language. This is not areflection on its lack of programming power but more a reflection on its

    capability to access the system's low level functions. Most high-levellanguages (e.g. FORTRAN) provide everything the programmer might wantto do already build into the language. A low level language provides nothingother than access to the machines basic instruction set. A middle levellanguage, such as C, probably doesn't supply all the constructs found inhigh-languages - but it provides you with all the building blocks that youwill need to produce the results you want!

    Uses of C

    C was initially used for system development work, in particular theprograms that make-up the operating system. Why use C? Mainly because itproduces code that runs nearly as fast as code written in assembly language.Some examples of the use of C might be:

    Operating Systems Language Compilers Assemblers

    7

  • 8/14/2019 Application for Departental Store

    8/128

    Text Editors

    Print Spoolers Network Drivers Modern Programs Data Bases Language Interpreters Utilities

    In recent years C has been used as a general-purpose language because of its popularitywith programmers. It is not the world's easiest language to learn and you will certainlybenefit if you are not learning C as your first programming language! C is trendy (Inearly said sexy) - many well established programmers are switching to C for all sorts ofreasons, but mainly because of the portability that writing standard C programs can offer.

    A Brief History of C

    C is a general-purpose language which has been closely associated with theoperating system for which it was developed - since the system and most ofthe programs that run it are written in C.Many of the important ideas ofC stem from the language BCPL, developed

    by Martin Richards. The influence ofBCPL on C proceeded indirectlythrough the language B, which was written by Ken Thompson in 1970 atBell Labs, for the first UNIX system on a PDP-7. BCPL and B are "typeless" languages whereas C provides a variety of data types.In 1972 Dennis Ritchie at Bell Labs writes C and in 1978 the publication ofThe C Programming Language by Kernighan & Ritchie caused a revolutionin the computing world.In 1983, the American National Standards Institute (ANSI) established acommittee to provide a modern, comprehensive definition ofC. Theresulting definition, the ANSI standard, or "ANSI C", was completed late1988.

    C for Personal Computers

    With regards to personal computers Microsoft C for IBM (or clones) PC's.and Borlands C are seen to be the two most commonly used systems.

    However, the latest version of Microsoft C is now considered to be the mostpowerful and efficient C compiler for personal computers.

    We hope we have now managed to convince you to continuewith this online C course and hopefully in time become a confident C

    programmer.

    8

  • 8/14/2019 Application for Departental Store

    9/128

    Program Design

    Program design is the foundation for a good program and is therefore an important part ofthe program development cycle. Before coding a program, the program should be well

    convinced and all aspects of the program design should be considered in detail.Program design is basically concerned with the development of a strategy to

    be used in writing the program, in order to achieve the solution of a problem.This includes mapping out a solution procedure and the form the programwould take .The program design involves the following stages:

    1. Problem analysis2. Outlining the program structure.3. Algorithm or Flow Chart development.4. Selection of control structures.

    Problem AnalysisBefore we think of a solution procedure to the problem, we must fully understand thenature of the problem and what we want the program to do. Without the comprehensionand definition of the problem at hand, program design might turn into a hit-or-missapproach. We must carefully decide the following at this stage:

    -What kind of data will go in,-What kind of outputs are needed, and-What are the constraints and conditions under which the program has tooperate.

    Outlining the Program StructureOnce we have decided what we want and what we have, then the next step is to decidehow to do it. C as a structured language lends itself to the solution procedure into tasksthat form a hierarchical structure. An important feature to this approach is that at eachlevel, the details of the design of lower level are hidden. The higher level functions aredesigned first, assuming certain broad tasks of the immediately lower level functions.Actual details of the lower level functions are not considered until that level is reached.

    Thus the design of functions proceeds from top to bottom, introducing progressivelymore and more refinements.

    9

    Problem

  • 8/14/2019 Application for Departental Store

    10/128

    Algorithm Development or Flow Chart DevelopmentAfter we have decided a solution procedure and an overall outline of the program, thenext step is to work out a detailed definite step-by-step procedure, known as algorithm

    for each function. The most common method of describing an algorithm is through theuse of flow charts.

    Since algorithm is the key factor for the developing am efficient program,we should devote enough attention to this step. A problem might have manydifferent approaches to its solution.

    Control Statements

    A complex solution procedure may involve a large number of controlstatements to direct the flow of execution. In such situations, indiscriminate

    use of control statements such as go to may lead to unreadable andincomprehensible programs. It has been demonstrated that any algorithm can

    be structured, using the three basic control structures, namely-sequencestructure, selection structure, and looping structure.

    A well designed program would provide the following benefits:

    1. Coding is easy and error-free.2. Testing is simple.

    3. Maintenance is easy.4. Good documentation is possible.5. Progress of coding may be controlled more precisely.

    10

    Task Task Task 3

    T1 T1

    T2 T2

    T3 T3

  • 8/14/2019 Application for Departental Store

    11/128

    Program CodingA program written by one may have to be red by others later. Therefore, it should bereadable and simple to understand. Complex logic and tricky coding should be avoided.The elements of coding style include internal documentation, construction of statements,generality of the program, and input/output formats.

    Internal Documentation

    Documentation refers to the details that describe a program. Details may be built-in-as anintegral part of the program. Two important aspects of internal documentation areselection of meaningful variable names and the use of components, Selection ofmeaningful names is crucial for understanding the program. Example,

    Area=breadth*length;

    Is more meaningful than a=b*l;

    Statement Construction

    Although the flow of logic is decided during design, the construction of individualstatements is done at the coding stage. Each statement should be simple and direct.The guidelines for construction of statements are:

    1. Use one statement per line.2. Use proper indentation when selection and looping structures are implemented.3. Avoid heavy nesting of loops, preferably not more than three levels.4. Use simple conditional tests; if necessary break complicated conditions into

    simple conditions.5. Use parentheses to clarify logical and arithmetic expressions.6. Use space, wherever possible, to improve readability.

    Input/Output Formats

    It should be simple and acceptable to users. A number of guidelines should beconsidered during coding.

    1. Keep formats simple.2. Use end-of-file indicators, rather than the user requiring to specify the

    number of items.3. Label all interactive input requests.4. Label all output reports.5. Use output messages when the output contains some peculiar results.

    Common Programming Errors

    It is advisable to keep track of errors that occur during run time, and to see thatthese known errors are not present in the program.

    Missing Semicolons

    Every C statement must end with a semicolon. A missing semicolon may causeconsiderable confusion to the compiler and result in misleading error messages.

    11

  • 8/14/2019 Application for Departental Store

    12/128

    There may be an instance when a missing semicolon might cause the compiler togo crazy and to produce a series of error messages.

    Missing Braces

    It is common to forgot a closing brace when coding a deeply nested loop. It will

    be usually detected by the compiler because the number of opening braces shouldmatch with the closing ones.Another serious problem with the braces is, not using them when multiplestatements are to be grouped together.

    Missing Quotes

    Every string must be enclosed in double quotes, while a single character constantin single quotes. If we miss them out, the string (or the character) will beinterpreted as a variable name.

    Undeclared Variables

    C requires variable to be declared for its type, before it is used. During thedevelopment of a large program, it is quite possible to use a variable to holdintermediate results and to forget to declare it.

    Forgetting the Precedence of Operators

    Expressions are evaluated according to the precedence of operators.

    Mismatching of Actual and Formal Parameter Type in Function Calls

    When a function with parameters is called, we should ensure that the type ofvalues passed, match with the type expected by the called function. Otherwise,erroneous results may occur. If necessary, we may use the type cast operator tochange the type locally.

    Program Testing

    Program testing is the process of reviewing and executing a program with theintent of detecting errors, which may belong to any of the four kinds discussedabove. We know that while the compiler can detect syntactic and semantic errors,it cannot detect run-time and logical errors that show up during the execution ofthe program. Testing, therefore should be necessary including steps to detect allpossible errors in the program. Testing process includes two stages:

    1. Human testing2. Computer-based testing.

    Human testing is an effective error-detection process and is done before thecomputer-based testing begins. Human testing methods include code inspectionby the programmer, code inspection by a test group, and a review by a peer group.The test is carried out statement by statement and is analyzed with respect to achecklist of common programming errors. In addition to finding the errors, theprogramming style and choice of algorithm are also reviewed.

    12

  • 8/14/2019 Application for Departental Store

    13/128

    13

  • 8/14/2019 Application for Departental Store

    14/128

    USER MANUAL

    This page will act as guide for all the new users. This is an application

    about a departmental store where you find different kinds of products

    you want to purchase/sell.Following are the list of options when you open the application

    1. Information about products

    2. Enter purchase records

    3. Enter products to be sold

    4. Search for the records

    5. Delete record form store database

    6. View sales, purchase and profit

    7. Print records

    8. Barograph of quantity\ profit

    9. Help10. Profit

    In detail

    1) Information about productsTo view this option you have to press 1 on keyboard. Then a page will be

    displayed which will have two choices.

    Edibles

    General products

    These two choices contain the product list. Each product will be having a

    product id, company name and rack number.

    2) Enter purchase records

    To view this option you have to press 2 on the keyboard. A page will appear

    asking for product id (enter) \ then for description \ rack number \

    cabinet number \ unit cost \ sale price \ total cost.

    3) Enter products to be sold

    To view this option you have to press 3 on the keyboard. It will ask you for

    product that are sold .If the product id that you enter does not match the

    record then it will show that the product is not in stock.

    4) Search for records

    To view this option you have to press 4 on the keyboard. Then a page will

    appear which will give you option to search a product by its product id or by

    its description matches these records then it will display all the records or it

    will say no records found.

    5) Delete record from the database

    14

  • 8/14/2019 Application for Departental Store

    15/128

    To view this option you have to press 5 on the keyboard then a screen will be

    displayed which will give you option to delete the record of the product by

    giving its id or its description. If the id or the records matches the record it

    will de deleted otherwise the record is not found.

    6) View sales ,purchase and profitTo view this option you have to press 6 on the keyboard .Then a page will be

    displayed which will give you three options to choose.

    1 for sales

    2 for purchase

    3 for profit

    If 1 or 2 pressed a screen will appear

    Product id

    Name

    Unit price

    QuantityTotal cost

    In case of profit the screen will appear as

    Product id

    Description

    Quantity

    Profit

    7) Print record

    To view this option you have to press 7 on the keyboard. This option will help

    in taking out a printout.

    8) Barograph of quantity\profit

    To view this option you have to press 8 on the keyboard. Then a screen will

    appear which will sow you graphical representation of the profit earned and

    products sold and purchased.

    9) Retrieve information

    To view this option you have to press h on the keyboard , then a page will

    appear which will show how to use this application and how each application

    works.

    10) Exit

    Press E to exit this application and return to windows.

    15

  • 8/14/2019 Application for Departental Store

    16/128

    16

  • 8/14/2019 Application for Departental Store

    17/128

    SystemDescription

    AnalysisModel

    DesignModel

    REQUIREMENT SPECIFICATION

    Requirement specifications very important part of the softwaredevelopment project. IT requires the understanding of the whole project and itsobjectives and hence we can say that requirement specification evolves out of the

    requirement analysis task, which species what is to be done. Both softwaredeveloper and customer conduct review of a software requirement specification. Thesoftware requirement specification is produced at the culmination of the analysistask. Software project constraints:1. The process should not be too cumbersome to handle.2. Economically viable.

    REQUIREMENT ANALYSIS

    Requirement analysis results in the specification of softwares operationalcharacteristics; indicates softwares interface with other system elements andestablishes constraints that software must meet. Requirement analysis allows thesoftware engineer (sometimes called an analyst or modeler in this role) to elaborateon basic requirements established during earlier requirement engineering tasks andbuild, models that depict user scenario, functional activities, problem classes andtheir relationships, System and class behavior, and the flow of data as it istransformed.

    Throughout analysis modeling, the software engineers primary focus is on

    What objects does the system manipulate.

    What functions must the system perform.

    What behavior does the System exhibit. What interfaces are defined.

    What constraints apply.

    OBJECTIVES OF ANALYSIS MODEL

    To describe what the customer requires.

    To establish a basis for the creation of a software design.

    To define a set of requirements that can be validated once the software isbuilt.

    17

  • 8/14/2019 Application for Departental Store

    18/128

  • 8/14/2019 Application for Departental Store

    19/128

    SOFTWARE REQUIREMENT SPECIFICATION

    STEP I: PRODUCT OVERVIEW AND SUMMARY

    The project titled Hospital Management System has been preparedfor removing the time consuming manual systems. This package is designed by

    taking all the aspects and need of hospital using system which is very easy to handleand easy to maintain. Basically the purpose of this project is to provide necessarythings like individual admission, discharge, availability of rooms etc. to each andevery patient in a computerized form, so that no patient has to wait in a long queuesfor admission and discharge as they did earlier.

    STEP II : DEVELOPMENT,OPERATING AND MAINTENANCE ENVIRONMENT

    The development, operating and maintenance environment of theproduct consists of the following:

    SOFTWARES REQUIREMENTS

    1. Operating System : - Windows 98,99,2000,XP, NT2. C compiler : - Turbo, Borland

    HARDWARE REQUIREMENTS

    SYSTEM TYPE : PentiumMEMORY : 256 MBHARD DISK : 20 GBPRINTER : LASER

    STEP III : FUNCTIONAL REQUIRMENTS

    Since, the project is prepared on the computerized HospitalManagement System and the end user who will use this software must have somebasic knowledge. So, a good level of user friendliness is the requirement.

    STEP IV : PERFORMANCE REQUIREMENTS

    The records in it should not overlap and we can able to get therecord by providing the room number and somehow the proper security of all therecords should be maintained.

    STEP V : EXCEPTIONAL HANDLING

    The software must be able to display proper error messages incase if some error encounters.

    STEP VI : FORESEEABLE MODIFICATIONS AND ENHANCEMENTS

    This project is very flexible i.e. we can modify it in future incase if some need arises.

    19

  • 8/14/2019 Application for Departental Store

    20/128

    20

  • 8/14/2019 Application for Departental Store

    21/128

    SYSTEM ANALYSIS

    System analysis describes the detailed description of the scenario, and thefunctioning of the system. The transaction and input/output requirements are alsopresented. The problems in the current system are discussed and the necessary

    improvements are recommended.

    Systems Development can generally be thought of as having two majorcomponents :o System Analysis

    o System Design

    System Design :

    System Design is the process of planning a new business system or one

    to replace or complement an existing system. But before this planning can bedone, we must thoroughly understand the old system and determine how computerscan best be used (if at all) to make its operation more effective.

    System Analysis :

    System Analysis is the process of gathering and interpreting facts,diagnosing problems , and using the information to recommend improvements to the

    system.

    SOFTWARE MODEL

    WATERFALL MODEL

    Waterfall model sometimes called classic life cycle, suggests a Systematic

    sequential approach to software development that begins with customerspecification of requirements and progresses through planning, modeling,construction and deployment, culminating is on going support of the completedsoftware.

    The waterfall model is a popular version of the system development life cyclemodel for software engineering. Waterfall development has distinct goals for eachphase of development.

    21

  • 8/14/2019 Application for Departental Store

    22/128

    THE WATERFALL MODEL

    PHASES OF WATERFALL MODEL

    This model has five phases :

    Requirement analysis and specification.

    Design

    Implementation and unit Testing

    Integration and system testing.

    Operation and maintenance.

    The phases always occur in this order that they do not overlap. The developermust complete each phase before the next phase begins. This model is namedWaterfall Model because its diagrammatic representation resembles a cascade ofwaterfalls.

    22

    COMMUNICATION

    projectInitiation

    requirementsgathering PLANNING

    EstimatingSchedulingTracking

    MODELINGAnalysisDesign

    CONSTRUCTIONCodeTest

    DEPLOYMENTDelivery

    SupportFeedback

  • 8/14/2019 Application for Departental Store

    23/128

    23

    Requirement analysis

    and specification

    Design

    Implementation andunit testing

    Integration and systemTesting

    Operation andMaintenance

  • 8/14/2019 Application for Departental Store

    24/128

    REQUIREMENT ANALYSIS AND SPECIFICAION PHASE

    The goal of this phase is to understand the exact requirements of thecustomer and to documents them properly. This activity is usually executed together

    with the customer, as the goal is to document all functions, performance andinterfacing requirements for the software. The requirements describe the what of asystem, not the how. This phase produces a large document, written in a naturallanguage, contains a description of what the System will do without describing howit will be done. The resultant document is known as software requirementspecification document (SRS).

    DESIGN PHASE:

    The SRS document contains the exact requirements of the customer. Thegoal of this phase is to transform the requirements specification into a structure thatis suitable for implementation in some programming language. Here overallsoftware architecture is defined, and the high level and detailed design work isperformed. This work is documented and known as software design description(SDD) document. The information contained in the SDD should be sufficient tobegin the coding phase.

    IMPLEMENTING AND UNIT TESTING PHASE :

    During this phase, design is implemented. If the SDD is complete, the

    implementation or coding phase proceeds smoothly, because all the informationneeded by the software developers is contained in SDD. During testing, the majoractivities are centered the exam and modification of code. Initially, small modulesare tested in isolation from the rest of the software product. The problem that areencountered while testing a module in isolation are solved in this phase and modulesare tested after writing some overhead code.

    INTEGRATION AND SYSTEM TESTING PHASE :

    This is a very important phase effective testing will contribute to the delivery

    of higher quality software products, more satisfied users, lower maintenance costsand more accurate and reliable results. Unit testing is used for implementing eachindependent module correctly, due to which there are less chances that whether theinterface between modules are correct, for this reason integration testing is performed. System testing involves the testing of the entire System, where assoftware is the part of the System.

    24

  • 8/14/2019 Application for Departental Store

    25/128

    OPERATION AND MAINTENANCE PHASE :

    Software maintenance is a task that every development group has to face,

    when the software is delivered to the customers site, installed and is operational.Therefore, release of software inaugurates the operation and maintenance phase ofthe life cycle. Software maintenance includes error correction, enhancement ofcapabilities, deletion of obsolete capabilities and optimization. The purpose of thisphase is to preserve the value of the software over time

    MODEL CHOSEN

    The model chosen for this project is Waterfall Model because of thefollowing reasons:-

    ADVANTAGES OF WATERFALL MODEL

    It can serve as a useful process model in situations where requirements arefixed and work is to proceed to completion in a linear manner.

    Testing is inherent to every phase of the waterfall model.

    It is a simple and elegant model which can be used in testing projects.

    It is an enforced disciplined approach

    It is not costly

    It is documentation driven, i.e. documentation is produced at every stage.

    25

  • 8/14/2019 Application for Departental Store

    26/128

    FEASIBILITY STUDY

    All the projects are feasible given unlimited resources and infinite time.Unfortunately, the development of a computer based system is more likely to beplayed by a scarcity of resources and difficult delivery date. It is both necessary and

    prudent to evaluate the feasibility of a project at the earliest possible time. In thedevelopment of the present project, no such limitation was imposed that was notfeasible, s all the resources where easily available and time given was sufficientenough.

    OBJECTIVES OF FEASIBILITY STUDY

    What are the problems with conventional System?

    This involves question such as whether the technology needed for the system

    exists, how difficult it will be to build and whether the firm has enough experienceusing that technology.

    The software made is on C++ which is a very common language, so we canget the experienced persons in it very easily.

    1. ECONOMIC FEASIBILITY

    This involves questions such as whether the form can afford to built thesystem, whether its benefits should substantially exceed its costs, and whether the

    project has higher priority and profits than other projects that might use the sameresources.

    Since, our project is made on C++ it is not very costly as it is very commonavailable software. We dont need any extra software or hardware requirements orany GUI (Graphic user interface)

    2. TECHNICAL FEASIBILITY

    This involves question such as whether the technology needed for the system

    exists, how difficult it will be to build and whether the firm has enough experienceusing that technology.

    The software made is on C++ which is a very common language, so we canget the experienced persons in it very easily.

    26

  • 8/14/2019 Application for Departental Store

    27/128

    3. LEGAL FEASIBILITY

    All projects must face legal scrutiny. When an organization either has legalcouncil on staff or on retainer, such reviews are typically standard. However, anyproject may face legal issue after completing too. Our software is legally feasible.

    4. ORGANISATIONAL FEASIBILITY

    This involves question such as whether the System has enough support to beimplemented successfully, whether it brings an excessive amount of change, andwhether the organization is changing too rapidly to absorb it.

    Since, it is a very small project its purpose is for submission of BCA (3 year)degree and all the members are equally include for the submission of project. So,there is a good Coordinating among all the members.

    5. ENVIRONMENTAL FEASIBILITY

    People are inherently resistant to change and computers have been known tofacilitate change. An estimate should be made of how strong a reaction the user staffis likely to have towards the development of a computerized system.

    27

  • 8/14/2019 Application for Departental Store

    28/128

    SCHEDULING

    Scheduling of a software project does not greatly from scheduling of any

    multitask engineering effort. Therefore, generalized project scheduling tools andtechniques can be applied with little modification for software projects.

    Program Evaluation and Review technique (PERT) and the critical pathmethod (CPM) are two project scheduling methods that can be applied to softwaredevelopment. Both technique are driven by information already developed inearlier project planning activities.

    Estimated of effort.

    A Decomposition of the product function model and task set.

    Decomposition of tasks.

    Interdependencies among tasks may be defined using a task network. Tasks,sometimes called the project work breakdown structure (WBS), are defined for theproduct as a whole or for individual functions.

    Both PERT and CPM provide quantitative tools that allow the software plannerto (1)Determines the critical path the chain of tasks that determines the duration ofthe project; (2) Establish most likely time estimates for individual tasks by applyingstatistical models; and (3) Calculate Boundary times that define window for aparticular task.

    PERT CHART

    The program (or project) Evaluation and review Technique (PERT) isa model for a project management designed to analyze and represent the tasksinvolved in completing a given project.

    T=1mo t=3moD F

    T=2moT=3mo

    A EB

    T=4mo C T=3mo

    28

  • 8/14/2019 Application for Departental Store

    29/128

    PERT model was invented by BOOZ Allen Hamilton, inc. under contract of

    United States Department of Defences US NAVY special projects office in 1958 asa part of the Polaris mobile submarine launched ballistic missile project

    PERT was developed primarily to simplify the planning and scheduling oflarge and complex projects.

    BENEFITS OF PERT

    PERT is useful because of the following reasons:

    Expected project completion time.

    Probability of completion before a specified date.

    Critical path activities that directly impart the completiontime.

    The activities that have stack time and that can lend resourcesto critical path activities.

    Activity start and end dates.

    LIMITATIONS OF PERT

    Some of PERT Weakness are:- The activity time estimates are somewhat subjective and dependjudgment. In cases where there is little experience in performing an activity, thenumbers may be only a guess. In other cases, if the person or group performing theactivity estimates the time there may bebiasin the estimate.

    Even if the activity times are well-estimated, PERT assumes a beta distribution for these time estimates, but the actual distribution may bedifferent.

    Even if the beta distribution assumption holds, PERT assumesthat the portability distribution of the project completion time is same as that of thecritical path because other parts can become the critical path because other parts canbecome the critical path if there is associated are delayed, PERT consistentlyunderestimates the expected project completion time.

    STEPS IN PERT PLANING PROGRESS

    PERT planning involves the following steps:-1) Identify the specific activities & milestone.2) Determines the proper sequence of the activities.

    3) Construct a network diagram.4) Estimate the time required for each activity.

    29

  • 8/14/2019 Application for Departental Store

    30/128

    5) Determine the critical path.6) Update the PERT chart as the project progresses.

    GANTT CHART

    A timeline chart, also called Gantt chart is a graphical representation oftime. A Gantt chart is a useful tool for planning & scheduling project.

    A Gantt chart is helpful when monitoring a projects progress.

    PLANNIG AND SCHEDULING

    o A Gantt chart allows you to asses how long a project should take.

    o A Gantt chart lays out the order in which tasks need to be carried

    out.o A Gantt chart helps manage the dependencies between tasks.

    MONITORING A PROJECT

    o A Gantt chart allows you to see immediately what should have been achieved

    at a point in time.o A Gantt chart allows you to see how remedial action may bring the

    project back on course.

    A Gantt chart is constructed with a horizontal axis representing the totaltime span of the project, broken down into increments (days, weeks or months)

    TIMELINE/GANTT CHART

    A figure illustrates the format of a timeline chart. It depicts a part of a software project schedule that emphasizes the concept scoping task for a word-processing(WPS) software product. All project tasks (for concept scoping) are listed in the lefts-hand column. The horizontal bars indicate the duration of each task. Where multiple bars occur at the same time on the calendar, task concurrency is implied. Thediamonds indicates milestone.

    30

  • 8/14/2019 Application for Departental Store

    31/128

    Time in days0 15 30 45 60 75 90 105 120

    Activity1. v

    1.11.21.31.4

    v2.2.12.22.32.4

    3 v

    4 v

    5 v

    Form Prog Link TestingDesign Design Establishment

    31

  • 8/14/2019 Application for Departental Store

    32/128

    32

  • 8/14/2019 Application for Departental Store

    33/128

    Important factors to be considered while working on interfaces:

    Use of a consistent format for menu, command input, and datadisplay.

    Provide the riser with visual and auditory feedback to ensure thattwo-communication is established.

    Provide undo or reversalfunctions.

    Reduce the amount of information that must be memorizedbetween actions.

    Provide help facilities that are context sensitive.

    Use simple action verbs or short verb phrases to namecommands.

    Display only that information that is relevant to the current context.

    Produce meaningful error messages. Use upper and lower case, indentation, and text grouping to aid in

    understanding.

    Minimize the number of input actions required of the user.

    Maintain consistency between information display and data input.The visual characteristics of the display (e.g., text size, color, andplacement) should be carried over to the input domain.

    Interaction should be flexible but also tuned to user's preferred mode

    of input.

    Deactivate commands that are inappropriate in the context of currentactions.

    Provide help to assist with all input actions.

    Now that we are familiar with the various design elements, let us take

    a look at the modeling techniques that are used for designing thesystems. Data Flow Diagrams are used for functional modeling. Asthe name suggests, it is a diagram depicting the flow of data throughthe system. In the next section, we'll explore this technique in detail.

    33

  • 8/14/2019 Application for Departental Store

    34/128

  • 8/14/2019 Application for Departental Store

    35/128

    shown at more detailed levels of the diagrams. Each process inalways "running" and ready to accept data.

    Major functions of processes are computations and making decisions.Each process may have dramatically different timing: yearly, weekly,daily.

    Naming Processes

    Processes are named with one carefully chosen verb and an object ofthe verb. There is no subject. Name is not to include the word"process". Each process should represent one function or action. Ifthere is an "and" in the name, you likely have more than one function(and process). For example, get invoice update customer and create

    Order

    Processes are numbered within the diagram as convenient. Levels ofdetail are shown by decimal notation. For example, top level processwould be Process 14, next level of detail Processes 14.1-14.4, andnext level with Processes 14.3.1-14.3.6.

    Processes should generally move from top to bottom and left to right.

    External entitiesExternal entities determine the system boundary. they are external to thesystem being studied. They are often beyond the area of Influence of thedeveloper. These can represent another system or Subsystem. These go onmargins/edges of data flow diagram.External entities are named with appropriate name.

    Data Flow

    Data flow represents the input (or Output) of data to (or from) a

    Process ("data in motion"). Data flows only data, not control.Represent the minimum essential data the process needs. Usingonly the minimum essential data reduces the dependence betweenprocesses. Data flows must begin and/or end at a process.

    35

  • 8/14/2019 Application for Departental Store

    36/128

    Data flows are always named. Name is not to include the word "data".Should be given unique names. Names should be some identifying noun.For example, order, payment, complaint.

    Data stores

    Data Stores are repository for data that are temporarily orpermanently recorded within the system. It is an "inventory" of data.

    These are common link between data and process models. Onlyprocesses may connect with data stores.

    There can be two or more systems that share a data store. This canoccur in the case of one system updating the data store, while theother system only accesses the data.

    Data stores are named with an appropriate name, not to include theword "file", Names should consist of plural nouns describing thecollection of data. Like customers, orders, and products.

    These may be duplicated. These are detailed in the data dictionaryor with data description diagrams.

    36

  • 8/14/2019 Application for Departental Store

    37/128

    DFD Showing rank calculation process of a university

    CGP Rules Result DataData Stores Store

    Rank Status

    MarksCGP

    Different Levels of DFDsThe DFD may be used to represent a system or software at any levelof abstraction. In fact, DFDs may be partitioned into levels thatrepresent increasing information flow and functional details.

    A 0 level DFD, also called a context model, represents the entiresoftware elements as a single bubble with input and output dataindicated by incoming and outgoing arrows, respectively. Additionalprocesses and information flow paths are represented as the 0 levelDFD is partitioned to reveal more information. For example, a 1 levelDFD might contain five or six bubbles with interconnecting arrows.

    37

    Compute

    Rank

    Compute

    CGP

  • 8/14/2019 Application for Departental Store

    38/128

    Making DFDs

    Data Flow Diagramming is a means of representing a system at anylevel of detail with a graphic network of symbols showing data flows,data stores, data processes, and data sources/destinations.

    The goal of data flow diagramming is to have a commonly understoodmodel of a system. The diagrams are the basis of structured systemsanalysis. Data flow diagrams are supported by other techniques ofstructured systems analysis such as data structure diagrams, datadictionaries, and procedure-representing techniques such as decisiontables. decision trees, and structured English.

    The purpose of data flow diagrams is to provide a semantic bridge

    between users and systems developers. The diagrams are graphical,eliminating thousands of words. These are logical representations,modeling what a system does, rather than physical models showinghow it does it. DFDs are hierarchical, showing systems at any levelof detail. Finally, it should be jargon less, allowing userunderstanding and reviewing.

    Also, data flow diagrams have the objective of avoiding the cost of :

    user/developer misunderstanding of a system, resulting in aneed to redo systems or in not using the system.

    having to start documentation from scratch when the physicalsystem changes since the logical system, what gets done, oftenremains the same when technology changes.

    systems inefficiencies because a, system gets "computerized"before it gets systematized".

    being unable to evaluate system project boundaries or degreeof automation, resulting in a project of inappropriate scope.

    38

  • 8/14/2019 Application for Departental Store

    39/128

    The procedure for producing a data flow diagram is to:

    identify and list external entities providing inputs/receiving

    outputs from system; identify and list inputs from/outputs to external entities;

    Draw a context DFDDefines the scope and boundary for the system and project1. Think of the system as a container (black box)2. Ignore the inner workings of the container3. Ask end-users for the events the system must respond to

    4. For each event, ask end-users what responses must be producedby thesystem

    5. Identify any external data stores6. Draw the context diagram

    Use only one process

    Only show those data flows that represent the mainobjective or most common inputs/outputs

    identify the business functions included within the system

    boundary; identify the data connections between business functions;

    confirm through personal contact sent data is received andvice-versa";

    trace and record what happens to each of the data flowsentering the system (data movement, data storage, datatransformation/processing)

    Draw an overview DFD

    Shows the major subsystems and how they interact

    with one another Exploding processes should add detail while

    retaining the essence of the details from the moregeneral diagram

    Consolidate all data stores into a composite datastore

    39

  • 8/14/2019 Application for Departental Store

    40/128

  • 8/14/2019 Application for Departental Store

    41/128

    Begin/end data flows with a bubble.

    Rules for Data Flows

    1. A data store must always be connected to a process2. Data flows must be named3. Data flows are named using nouns

    .Customer ID, Student information

    4. Data that travel together should be one data flow5. Data should be sent only to the processes that need the data

    Use the following additional guidelines when drawing DFDS.

    Identify the kev processing steps in a system. A processing step isan activity that transforms one piece of data into another form.

    Process bubbles should be arranged from top left to bottom right ofpage.

    Number each process ( 1.0, 2.0, etc). Also name the process with averb that describes the information processing activity.

    Name each data flow with a noun that describes the informationgoing into and out of a process. What goes in should be differentfrom what comes out,

    Data stores, sources and destinations are also named with nouns.

    Realize that the highest level DFD is the context diagram. Itsummarizes the entire system as one bubble and shows the inputsand outputs to a system

    Each lower level DFD must balance with its higher level DFD. Thismeans that no inputs and outputs are changed.

    Think of data flow not control flow- Data flows are pathways for data.Think about what data is needed to perform a process or update a data store.A data flow diagram is not a flowchart and should not have loops or transfer

    41

  • 8/14/2019 Application for Departental Store

    42/128

    of control. Think about the data flows, data processes, and data storage thatare needed to move a data structure through a system.

    Do not try to put everything you know on the data flow diagram. Thediagram should serve as index and outline. The index/outline will be"fleshed out" in the data dictionary, data structure diagrams, andprocedure specification techniques.

    42

  • 8/14/2019 Application for Departental Store

    43/128

    43

  • 8/14/2019 Application for Departental Store

    44/128

    E-R Diagrams

    E-R Diagram of the store

    The entities of the STORE are:1)Description2)Rack3)Product ID4)Cab nit5)Quantity6)Sale

    7)Total8)Cost9)Profit

    44

    STORE

    Description

    Rack

    Total

    Cos

    t

    Profi

    t

    cabni

    t

    ProductID

    QuantitySale

    Purchase

  • 8/14/2019 Application for Departental Store

    45/128

    E-R Diagram of purchase

    The entities of Purchase:1)Description2)Rack3)Product ID4)Cab nit5)Quantity6)Cost7)Unit

    45

    Purchase

    Description

    Rack

    Cabnit

    Product ID

    Unit

    Cost

    Quantity

  • 8/14/2019 Application for Departental Store

    46/128

  • 8/14/2019 Application for Departental Store

    47/128

    E-R DIAGRAMS

    E-R Model concept

    The ER data modeling techniques is based on the perception of a real worldthat consists of a set of basic objects called entities, and of relationshipsamong these objects.In ER modeling, data is described as entities, relationships, and attributes.In the following section, entities and attributes are discussed. Later, entitytypes, their key attributes, relationship types, their structural constraints, andweak entity types are discussed. In the last, we will apply ER modeling toour case study problem "Library management system".

    Entities and Attributes

    One of the basic components of ER model is entity. An entity is anydistinguishable object about which information is stored. These objects can

    be person, place, thing, event or a concept. Entities contain descriptiveinformation. Each entity is distinct.

    An entity may be physical or abstract. A person, a book, car, house,employee etc. are all physical entities whereas a company, job, or auniversity course, are abstract entities.

    Physical and Abstract entity:-

    Employee Loan

    Physical Abstract

    Another classification of entities can be independent or dependent (strong orweak)entity.

    47

  • 8/14/2019 Application for Departental Store

    48/128

    Entities are classified as independent or dependent (in some methodologies,the terms used are strong and weak, respectively). An independent entity isone, which does not rely on another entity for identification. A dependententity is one that relies on another entity for identification. An independententity exists on its own whereas dependent entity exists on the existence ofsome other entity. For example take an organization scenario. Heredepartment is independent entity. Department manager is a dependententity. It exists for existing depts. There wont be any department managerfor which there is no dept.

    Some entity types may not have any key attributes of their own. These arecalled weak entity types. Entities belonging to a weak entity type areidentified by being related to specific entities from another entity type incombination with some of their attribute values. For example, take the

    license entity. It can't exist unless it is related to a person entity.

    Attributes

    After you identify an entity, then you describe it in real terms, or through itsattributes. Attributes are basically properties of entity. We can useattributes for identifying and expressing entities. For example, Dept entitycan have DeptName, DeptId, and

    DeptManager as its attributes. A car entity can have modeino, brand name,and color as its attributes.

    A particular instance of an attribute is a value. For example, "Bhaskar" isone value of

    the attribute Name. Employee number 8005 uniquely identifies an employeein a company.

    Types of Attributes

    Attributes can be of various types. In this section, we'll look at differenttypes of attributes. Attributes can be categorized as:

    48

  • 8/14/2019 Application for Departental Store

    49/128

    Key or non key attributes

    Required or optional

    Simple or composite

    Stored or derived

    Key or non-key attributes

    Attributes can be classified as identifiers or descriptors. Identifiers, morecommonly called keys or key attributes uniquely identify an instance of anentity. If such an attribute doesn't exist naturally, a new attribute is definedfor that purpose, for example an ID number or code. A descriptor describesa non-unique characteristic of an entity instance.

    An entity usually has an attribute whose values are distinct for eachindividual entity. This attribute uniquely identifies the individual entity.Such an attribute is called a key attribute. For example, in the Employeeentity type, EmpNo is the key attribute since no two employees can havesame employee number. Similarly, for Product entity type, prodded is thekey attribute.

    There may be a case when one simple attribute is not sufficient to identify

    entities. Then a combination of attributes can solve this purpose. We canform a group of more than one attribute and use this combination as a keyattribute. That is known as a composite key attribute. When identifyingattributes of entities, identifying, key attribute is very important.

    Attributes that describe an entity are called non-key attributes.

    Required or optional

    An attribute can be required or optional When it's required, we must have avalue for it, a value must be known for each entity occurrence. When it'soptional, we could have a value for it, a value may be known for each entityoccurrence. For example, there is an attribute Employ (for employee no) ofentity employee. This is required attribute since

    49

  • 8/14/2019 Application for Departental Store

    50/128

    here would be no employee having no employee no. Employee's spouse isoptional attribute because a employee may or may not have a spouse.

    Simple and composite

    Composite attributes can be divided into smaller subparts. These subpartsrepresent basic attributes with independent meanings of their own. Forexample, take Name attributes. We can divide it into subparts like Firstname, Middle name, and Last name.

    Attributes that can't be divided into subparts are called Simple or Atomicattributes. For example Employee Number's a simple attribute. Age of a

    person is a simple attribute.

    Entity Types

    An entity set is a set of entities of the same type that share the sameproperties, or attributes. For example, all software engineers working in thedepartment involved in the Internet projects can be defined as the entity setinternet group. The individual entities that constitute a set are calledextension of the entity, set. Thus, all individual software engineers of in theInternet projects are the extensions of the entity set IntemetGroup.Entity sets don't need to be disjointed. For example, we can define an entityset Employee. An employee may or may not be working on some Internet

    projects. In Internet Group we will have some entries that are there inEmployee entity set. Therefore, entity sets Employee and Internet Group arenot disjoint.

    A database usually contains groups of entities that are similar. For example, employees

    of a company share the same attributes. However, every employee entity has its ownvalues for each attribute. An entity type defines a set of entities that have same

    attributes. A name and a list of attributes describe each entity type.

    An entity type is represented in ER diagrams as rectangular box and thecorresponding attributes are shown in ovals attached to the entity type bystraight lines.

    50

  • 8/14/2019 Application for Departental Store

    51/128

    An entity type is basically the schema or intension or structure for the set ofentities that share the same structure whereas the individual entities of a

    particular entity type are collectively called entity set. 'I lie entity set is alsocalled the extension of the entity type.

    Connectivity and Cardinality

    By connectivity we mean how many instances of one entity are associatedwith how many instances of other entity in relationship Cardinality is used tospecify such connectivity. I

    The connectivity of a relationship describes the mapping of associated entity instances in

    the relationship. The values of connectivity are Alone" or lemony". The cardinality of a

    relationship is the actual number of related occurrences for each of the two entities. Thebasic types of connectivity for relations are: one-to-one, one-to-many, and many-to-

    many.

    A one-to one(1: 1) relationship is when at most one instance of an entity Ais associated with one instance of entity B. For example, each book in alibrary is issued to only one member at a particular time.A one-to-many (1:N) relationship is when for one instance of entity A, there are zero,one, or many instances of entity B but for one instance of entity B, there is only oneinstance of entity A. An example of a I:N relationships is a department has manyemployees; each employee is assigned to one department.

    A many-to-many (M:N) relationship, sometimes called non-specific, iswhen for one instance of entity A, there are zero, one, or many instances ofentity B and for one instance of entity B there are zero, one, or manyinstances of entity A. An example is:-employees may be assigned to no more than three projects at a time every

    project has at least two employees assigned to it.

    51

  • 8/14/2019 Application for Departental Store

    52/128

    52

  • 8/14/2019 Application for Departental Store

    53/128

    Flow Chart

    menu

    No yes

    yes

    Noyes

    53

    Start

    MenuChoices 1) 7)

    2) 8)

    3) 9)

    4) H

    5) E6)

    Input choice

    Ifchoice=

    1)

    1

    )

    2

    )

    2)

    Ifchoice=3

    ) No =1) 3)

  • 8/14/2019 Application for Departental Store

    54/128

    No

    Yes

    No

    Yes

    No

    Yes

    No

    Yes

    No

    54

    Ifchoice=4)

    4)

    Ifchoice=5)

    6)Ifchoice=6)

    5)

    Ifchoice=7)

    7)

  • 8/14/2019 Application for Departental Store

    55/128

    Yes

    No

    55

    Ifchoice=8)

    8)

    Ifchoice=9) 9)

  • 8/14/2019 Application for Departental Store

    56/128

    Yes

    56

  • 8/14/2019 Application for Departental Store

    57/128

    No

    Yes

    No

    No

    Yes

    57

    If

    choice=H

    H

    Ifchoice=E

    Stop

    Choice=1)

    Information

    Enter

    Choice

    Wrongchoice

    entered

    If

    choice= 1 Edibles

    If

    choice= 2

    GeneralItemsWrong choiceenteredMEN

    U

  • 8/14/2019 Application for Departental Store

    58/128

  • 8/14/2019 Application for Departental Store

    59/128

    YesNo

    59

  • 8/14/2019 Application for Departental Store

    60/128

    Yes

    no

    60

    Choice=3)

    Choice=4)

    Enter the Product

    ID-

    If the recordmatches

    Produ

    ctSold

    No In

    Stock

    Men

    u

  • 8/14/2019 Application for Departental Store

    61/128

    Yes

    No

    Yes

    No

    61

    Search aRecord

    Enter thechoice forsearch

    Ifchoice=1)

    Searchfound

    Ifchoice=2)

    Searchfound

    Men

    u

  • 8/14/2019 Application for Departental Store

    62/128

    Yes Yes

    No

    Yes Yes

    No

    62

    Choice=5)

    DeleteRecords

    Enter Delete

    Option

    Ifchoice=1)

    Ifchoice=2)

    Record

    Delete

    Record

    Delete

    Men

    u

    Record

    NOT

    Found

  • 8/14/2019 Application for Departental Store

    63/128

    Yes

    No

    Yes

    No

    No

    63

    Choice=6)

    View

    Record

    Enter Choice forView

    Ifchoice=1)

    ViewSalesrecord

    Ifchoice=2)

    ViewPurchaserecord

    Ifchoice=3)

    Viewprofitrecord

    Men

    u

  • 8/14/2019 Application for Departental Store

    64/128

    Yes

    No

    Yes

    No

    64

    Choice=8)

    View BarGraph

    Enter TheOption

    Ifchoice=1)

    ViewBarGraph OfQuantity

    Ifchoice=2)

    ViewBarGraph OfProfit

    Men

    u

  • 8/14/2019 Application for Departental Store

    65/128

  • 8/14/2019 Application for Departental Store

    66/128

    66

  • 8/14/2019 Application for Departental Store

    67/128

    67

  • 8/14/2019 Application for Departental Store

    68/128

    #include #include #include #include

    #include #include #include #include#include void show_mouse();int t();void edit();void infor();void entry();void display();

    void search();void search_id();void search_name();void del();void deletion();void deletion_id();void print();void help();void eat();void general();void exit();void seteefect(int, int);void graph();void bar(int inscor);void graph2();void bar2(int inscore2);void report();void report2();void report3();void pur();void graph1();void design();void bbox();

    void ventry(char t[],int);

    struct shop{

    char desc[20];int rack;char ch;int cabnit;

    68

  • 8/14/2019 Application for Departental Store

    69/128

    int quantity;float sale;char id[6];float total;float unit;

    float cost;float profit;float bye;int qty;int ost;int b;};

    struct shop temp;struct shop x[20];FILE *ptr;//int age;char a[10];/************************************displays informationabout the cars***************************/

    void infor(){

    int sher;clrscr();textcolor(BLUE);gotoxy(13,3);printf("\xDB\xDB\xDB\xDB\xB2 INFORMATION ABOUT

    PRODUCTS \xB2\xDB\xDB\xDB\xDB");gotoxy(2,5);printf("THIS SECTION IS TO TELL WHAT KIND OF PRODUCTS

    ARE THERE IN STORE");printf("\n\nENTER THE OPTION WHICH SUITS YOU.\n");printf("\n\n1.EDIBLES.\n\n");printf("\n2.GENERAL ITEMS.\n\n");printf("\n\n\n\n\nOPTION:");sher=toupper(getch());//

    switch(sher){case '1':eat();break;

    case '2':general();

    69

  • 8/14/2019 Application for Departental Store

    70/128

  • 8/14/2019 Application for Departental Store

    71/128

    printf(" ID : 136. ALWAYS COMPANY : WONDERRACK NO 27\n");

    printf(" ID : 327. PEPPARS COMPANY : JUNAIDRACK NO 28\n");

    printf(" ID : 138. JHERBAL COMPANY : SONS

    RACK NO 29\n"); printf(" ID : 139. PEPSI COMPANY : MAJEEDRACK NO 30 \n");

    printf(" ID : 130. ORAGD COMPANY : JAFFARRACK NO 31 \n");

    printf(" ID : 131. ICECREAM COMPANY : POLKAFREEZER 32 \n");

    printf("**************************************************************\n");

    printf(" ID : 143. SHAMPO COMPANY : MITUCHELSRACK NO 24 \n");

    printf(" ID : 144. AGRI COMPANY : PAK PURERACK NO 25\n");

    printf(" ID : 145. TIMO COMPANY : HALEEBRACK NO 26\n");

    printf(" ID : 146. WASHSN COMPANY : WONDERRACK NO 27\n");

    printf(" ID : 147. LACE COMPANY : JUNAIDRACK NO 28\n");

    printf(" ID : 428. YARDLY COMPANY : SONSRACK NO 29\n");

    printf(" ID : 149. MUSK COMPANY : MAJEED

    RACK NO 30 \n"); printf(" ID : 140. BUTTER COMPANY : JAFFAR

    RACK NO 31 \n");printf(" ID : 141. IMPERIAL COMPANY : POLKA

    FREEZER 32 \n");

    printf("**************************************************************\n");

    printf("\n\nPress enter to return to main menu");}

    void general(){clrscr();

    printf("***************************************************************\n");

    printf(" ID : 153. DETOL COMPANY : MITUCHELSRACK NO 24 \n");

    71

  • 8/14/2019 Application for Departental Store

    72/128

    printf(" ID : 154. SHAMPO COMPANY : PAK PURERACK NO 25\n");

    printf(" ID : 155. FINERRE COMPANY : HALEEBRACK NO 26\n");

    printf(" ID : 156. CURTIS COMPANY : WONDER

    RACK NO 27\n"); printf(" ID : 157. NIVKA COMPANY : JUNAIDRACK NO 28\n");

    printf(" ID : 158. NIVCA COMPANY : SONSRACK NO 29\n");

    printf(" ID : 159. DETOL COMPANY : MAJEEDRACK NO 30 \n");

    printf(" ID : 150. BUTTER COMPANY : JAFFARRACK NO 31 \n");

    printf(" ID : 151. SHAVE COMPANY : POLKAFREEZER 32 \n");

    printf("***************************************************************\n\n");

    printf("Press any key to continue......");getche();clrscr(); printf(" ID : 163. ADDIS COMPANY : MITUCHELS

    RACK NO 24 \n"); printf(" ID : 164. SKIN COMPANY : PAK PURE

    RACK NO 25\n"); printf(" ID : 165. MAX COMPANY : HALEEB

    RACK NO 26\n");

    printf(" ID : 166. BRESCO COMPANY : WONDERRACK NO 27\n");

    printf(" ID : 167. ZABIT COMPANY : JUNAIDRACK NO 28\n");

    printf(" ID : 168. COPEX COMPANY : SONSRACK NO 29\n");

    printf(" ID : 169. SOAP COMPANY : MAJEEDRACK NO 30 \n");

    printf(" ID : 160. PAMOLI COMPANY : JAFFARRACK NO 31 \n");

    printf(" ID : 161. AVA COMPANY : POLKA

    FREEZER 32 \n");

    printf("***************************************************************\n");

    printf(" ID : 163. CAMY COMPANY : MITUCHELSRACK NO 24 \n");

    printf(" ID : 164. SAFE COMPANY : PAK PURERACK NO 25\n");

    72

  • 8/14/2019 Application for Departental Store

    73/128

    printf(" ID : 165. GUARD COMPANY : HALEEBRACK NO 26\n");

    printf(" ID : 166. DOVE COMPANY : WONDERRACK NO 27\n");

    printf(" ID : 167. REXONA COMPANY : JUNAID

    RACK NO 28\n"); printf(" ID : 168. TOUCNME COMPANY : SONSRACK NO 29\n");

    printf(" ID : 169. FORHANS COMPANY : MAJEEDRACK NO 30 \n");

    printf(" ID : 160. SIGNAL2 COMPANY : JAFFARRACK NO 31 \n");

    printf(" ID : 161. CLOSEUP COMPANY : POLKAFREEZER 32 \n");

    printf("***************************************************************\n");

    printf("\n\nPress enter to return to main menu");

    }

    ///////////////////////////////time ///////////////////////////int t(void){

    time_t t;

    time(&t);

    // clrscr();gotoxy(15,21);printf("Date and time: %s\n", ctime(&t));return 0;

    }

    /////////////////////////////////////validation //////////////////////////void ventry(char t[],int code){

    int i=0;

    if(code==0){

    while((t[i]=getch())!='\r' && i=97 && t[i]=65 && t[i]

  • 8/14/2019 Application for Departental Store

    74/128

    }}

    else if(code==1){while((t[i]=getch())!='\r' && i=48 && t[i]

  • 8/14/2019 Application for Departental Store

    75/128

    temp.rack= atoi(a);

    flushall();gotoxy(7,11);cprintf("\xDB\xDB\xB2 ENTER CABNIT NO : ");

    ventry(a,1);temp.cabnit= atoi(a);

    //flushall();gotoxy(7,13);///////////////////////cprintf("\xDB\xDB\xB2 ENTER UNIT COST :$ ");ventry(a,1);temp.unit= atof(a);flushall();

    gotoxy(7,15);cprintf("\xDB\xDB\xB2 ENTER SALE PRICE :$ ");ventry(a,1);temp.sale= atof(a);flushall();

    gotoxy(7,17);cprintf("\xDB\xDB\xB2 ENTER QUANTITY : ");ventry(a,1);temp.quantity= atoi(a);flushall();

    gotoxy(7,18);cprintf("=====================================");temp.total=temp.quantity*temp.sale;

    textcolor(10);gotoxy(10,20);cprintf("\xB2\xDB\xB2 TOTAL PRICE = $

    %.2f",temp.total);temp.cost=(temp.unit*temp.quantity);gotoxy(40,20);

    cprintf("\xDB\xB2 TOTAL COST = $ %.2f",temp.cost);

    }fwrite(&temp,sizeof(temp),1,ptr);textcolor(10);gotoxy(10,23);cprintf("More entries [y/n]");ch=getche();

    75

  • 8/14/2019 Application for Departental Store

    76/128

    }fclose(ptr);

    }

    /*****************************dataretreivel********************************/

    void display(){

    clrscr();ptr=fopen("shop.dat","rb");while ((fread(&temp,sizeof(temp),1,ptr))==1)

    {gotoxy(22,3);printf("\xDB\xDB\xDB\xB2\xB2 RETRIEVE RECORD

    \xB2\xB2\xDB\xDB\xDB");gotoxy(18,5);printf("\xDB\xDB\xB2 DESCRIPTION : %s",temp.desc);gotoxy(18,7);printf("\xDB\xDB\xB2 ID NUMBER : %s",temp.id);gotoxy(18,9);printf("\xDB\xDB\xB2 RACK NO : %d",temp.rack);gotoxy(18,11);printf("\xDB\xDB\xB2 CABNIT NO : %d",temp.cabnit);

    gotoxy(18,13);printf("\xDb\xDB\xB2 UNIT COST :$ %.2f",temp.unit);gotoxy(18,15);printf("\xDB\xDB\xB2 SALE PRICE : $

    %.2f",temp.sale);gotoxy(18,17);printf("\xDB\xDB\xB2 QUANTITY :

    %d",temp.quantity);gotoxy(16,18);printf("===================================");gotoxy(16,20);

    printf("\xDB\xDB\xB2 TOTAL PRICE : $%.2f",temp.total);gotoxy(47,20);printf("\xDB\xB2 TOTAL COST : $ %.2f",temp.cost);gotoxy(20,23);printf("Press Enter to see next if any or exit ...");

    getche();

    76

  • 8/14/2019 Application for Departental Store

    77/128

  • 8/14/2019 Application for Departental Store

    78/128

  • 8/14/2019 Application for Departental Store

    79/128

    /*****************************search byname******************************/

    void search_name(){

    int flag=0;char lkf[20];clrscr();ptr=fopen("shop.dat","rb");design();gotoxy(13,4);printf("\xDB\xDB\xB2 Enter description to be

    searched:");scanf("%s",&lkf);

    while((!flag)&&(fread(&temp,sizeof(temp),1,ptr))==1){

    if(strcmp(temp.desc,lkf)==0)flag=1;

    }if(flag)

    {

    gotoxy(18,6);printf("Product ID : %s",temp.id);gotoxy(18,8);printf("Description : %s",temp.desc);gotoxy(18,10);

    printf("Rack no : %d",temp.rack);gotoxy(18,12);printf("Cabnit : %d",temp.cabnit);gotoxy(18,14);printf("Sale price :$ %.2f",temp.sale);gotoxy(18,16);printf("Quantity : %d",temp.quantity);gotoxy(16,17);printf("============================");gotoxy(18,19);printf(" Total :$ %.2f",temp.total);

    }else

    printf("Record not found!");fclose(ptr);

    }

    79

  • 8/14/2019 Application for Departental Store

    80/128

    /******************************datadeletion*****************************/void deletion(){

    int j,n,i;char tar[30];int count=0;

    ptr = fopen("shop.dat","rb");clrscr();design();gotoxy(17,10);printf("\xDB\xDB Enter Description to be

    deleted:");scanf("%s",&tar);j=0;

    while((fread(&temp,sizeof(temp),1,ptr))==1){

    if((strcmp(temp.desc,tar)0))

    {x[j] = temp;j++;

    }else{

    count++;}

    }if (count==0){clrscr();design();gotoxy(30,10);printf("\xDB\xDB Record Not Found");gotoxy(17,23);printf("Press Enter to go to MAIN MENU .....");

    getch();return;}

    fclose(ptr);n = j;clrscr();ptr=fopen("shop.dat","wb");

    80

  • 8/14/2019 Application for Departental Store

    81/128

    for(i=0; i

  • 8/14/2019 Application for Departental Store

    82/128

    }

    /******************************help***************************************/

    void help(){

    clrscr();design();textcolor(GREEN);gotoxy(20,4);cprintf("\xDB\xDB\xDB\xDB\xB2 HELP ABOUT THE PROGRAM

    \xB2\xDB\xDB\xDB\xDB");gotoxy(4,6);cprintf(" [ 2 ] - ENTER RECORDS : THIS OPTION ALLOWS

    THE USER TO ENTER NEW ");gotoxy(30,7);cprintf("RECORDS. USER ENTERS PRODUCT ID,

    DESCRIPTION,");gotoxy(30,8);cprintf("QUANTITY AND UNIT PRICE. THE PROGRAMM

    CALCULATES");gotoxy(30,9);cprintf("TOTAL PRICE AND DISPLAYS ON THE SCREEN.");gotoxy(4,11);cprintf(" [ 3 ] - ENTER SALES : THIS OPTION ALLOWS

    THE USER TO SEE PREVIOUS ");

    gotoxy(30,12);cprintf("SALE RECORDS.");gotoxy(4,14);cprintf(" [ 4 ] - SEARCH PURCHASE : THIS OPTION ALLOWS

    THE USER TO SEARCH SPECIFIC");gotoxy(30,15);cprintf("RECORD BY ENTERING ID OR 'DESCRIPTION'");gotoxy(4,17);cprintf(" [ 5 ] - DELETE PURCHASE : THIS OPTION ALLOWS

    THE USER TO DELETE A SPECIFIC");gotoxy(30,18);

    cprintf("RECORD BY ENTERING ITS 'DESCRIPTION' OR ID");gotoxy(6,23);cprintf("Press any key to continue .............");

    getche();clrscr();design();textcolor(GREEN);

    82

  • 8/14/2019 Application for Departental Store

    83/128

  • 8/14/2019 Application for Departental Store

    84/128

    cprintf(" 2 - ENTER PURCHASE RECORDS");

    gotoxy(26,10);cprintf(" 3 - ENTER PRODUCTS TO BE SOLD

    ");

    gotoxy(26,11);cprintf(" 4 - SEARCH FOR RECORD");

    gotoxy(26,12);cprintf(" 5 - DELETE RECORD FROM STORE DATABASE

    ");gotoxy(26,13);cprintf(" 6 - VIEW SALES , PURCHASE & PROFIT REPORT

    ");gotoxy(26,14);cprintf(" 7 - PRINT RECORDS

    ");gotoxy(26,15);cprintf(" 8 - BAR GRAPH OF QUANTITY / PROFIT

    ");gotoxy(26,16);cprintf(" 9 - RETRIEVE INFORMATION ");gotoxy(26,17);cprintf(" H - HELP

    ");gotoxy(26,18);cprintf(" E - EXIT

    ");

    gotoxy(26,23);//

    cprintf("ENTER YOUR CHOICE :: ");gotoxy(47,23);x=toupper(getch());switch(x){case '1':infor();break;

    case '2':entry();break;

    case '3':edit();break;

    84

  • 8/14/2019 Application for Departental Store

    85/128

    case '4':search();break;

    case '5':

    del();break;

    case '6':report2();break;

    case '7':print();break;

    case 'h': case'H':help();break;

    case'8':graph1();break;

    case '9':display();break;

    case 'e': case 'E':exit(0);break;

    default:clrscr();design();gotoxy(17,12);printf("\a\xDB\xB2 WRONG ENTRY : PRESS ANY KEY AND

    TRY AGAIN");getche();

    }}}while((x!='e')||(x!='E'));

    return x;}

    void main()

    85

  • 8/14/2019 Application for Departental Store

    86/128

    {textbackground(14);show_mouse();menu();}

    /************************************* graph***********************************/

    void graph(){

    int inscor=1;char ch;clrscr();design();gotoxy(20,23);printf("Press enter to go to MAIN MENU .....");textcolor(10);gotoxy(15,4);cprintf("************* GRAPH OF PRODUCT QUANTITY

    *************");textcolor(14);gotoxy(3,5);cprintf(" PRODUCT NAME");ptr=fopen("shop.dat","rb");while((fread(&temp,sizeof(temp),1,ptr))==1)

    {

    printf("\n \xBA %s \t:",temp.desc);

    bar(inscor);

    }

    fclose(ptr);getche();}void bar(){int j;for(j=1;j

  • 8/14/2019 Application for Departental Store

    87/128

    char ch;clrscr();design();gotoxy(20,23);printf("Press Enter to go to MAIN MENU ........");

    textcolor(GREEN);gotoxy(25,4);cprintf("\xDB\xDB\xDB\xDB\xDB\xB2 VIEW OF SALES

    \xB2\xDB\xDB\xDB\xDB\xDB");textcolor(RED);gotoxy(4,7);cprintf("PRODUCT ID. NAME. SALE PRICE.

    QUANTITY. TOTAL PRICE");gotoxy(4,9);printf("=================================================

    =======================");

    ptr=fopen("shop.dat","rb");while((fread(&temp,sizeof(temp),1,ptr))==1)

    {//printf("\n \xBA %s\t",temp.id);printf("\t%s",temp.desc);printf("\t\t$%.2f",temp.sale);

    // printf("\t\t%d",temp.qty);printf("\t\t%d",temp.quantity);

    // printf("\t\t%d",temp.bye);

    printf("\t\t $%.2f",temp.total);

    }

    getche();}void seteffect(int b, int f){

    clrscr();textbackground(b);textcolor(f);

    }

    /********************************** purchase report**********************/

    void pur(){char ch;

    87

  • 8/14/2019 Application for Departental Store

    88/128

    clrscr();design();show_mouse();gotoxy(20,23);printf("Press Enter to go to MAIN MENU ...........");

    textcolor(GREEN);gotoxy(25,4);cprintf("\xDB\xDB\xDB\xDB\xDB\xB2 VIEW OF PURCHASES

    \xB2\xDB\xDB\xDB\xDB\xDB");textcolor(RED);gotoxy(4,7);cprintf("PRODUCT ID. NAME. UNIT PRICE.

    QUANTITY. TOTAL COST");gotoxy(4,9);printf("=================================================

    =======================");

    ptr=fopen("shop.dat","rb");while((fread(&temp,sizeof(temp),1,ptr))==1)

    {//printf("\n \xBA %s\t\t",temp.id);printf(" %s",temp.desc);

    printf("\t\t4%.2f",temp.unit);printf("\t\t%d",temp.quantity);printf("\t\t $%.2f",temp.cost);}

    getche();}

    /*********************************** purchase graph***********************/

    void graph2(){

    int inscor2=1;char ch;clrscr();

    design();gotoxy(20,23);printf("Pres Enter to go to MAIN MENU ...........");textcolor(10);gotoxy(15,4);cprintf("************* GRAPH OF PROFIT *************");textcolor(14);gotoxy(4,5);

    88

  • 8/14/2019 Application for Departental Store

    89/128

    cprintf("PRODUCT NAME");ptr=fopen("shop.dat","rb");while((fread(&temp,sizeof(temp),1,ptr))==1)

    {

    printf("\n \xBA %s \t:",temp.desc);bar2(inscor2);

    }

    fclose(ptr);getche();}void bar2(){int j;temp.profit=(temp.total-temp.cost);//for(j=1;j

  • 8/14/2019 Application for Departental Store

    90/128

    {case '1':graph();break;

    case '2':graph2();break;

    default:gotoxy(9,20);textcolor(RED);cprintf("\a\xDB\xB2 WRONG ENTRY : PRESS ENTER TO GO

    TO MAIN MENU... ");getche();}

    }/************************** report of profit**********************/

    void report3(){char ch;clrscr();design();gotoxy(20,23);printf("Press Enter to go to MAIN MENU .... ");

    textcolor(GREEN);gotoxy(25,4);cprintf("\xDB\xDB\xDB\xDB\xDB\xB2 VIEW OF PROFIT

    \xB2\xDB\xDB\xDB\xDB\xDB");textcolor(RED);gotoxy(4,7);cprintf("PRODUCT ID. DESCRIPTION. QUANTITY.

    PROFIT.");gotoxy(4,9);printf("=================================================

    ===========");

    ptr=fopen("shop.dat","rb");while((fread(&temp,sizeof(temp),1,ptr))==1)

    {

    printf("\n \xBA %s.",temp.id);printf("\t\t%s",temp.desc);printf("\t\t%d",temp.quantity);

    90

  • 8/14/2019 Application for Departental Store

    91/128

    temp.profit=(temp.total-temp.cost);printf("\t\t $%.2f",temp.profit);

    }getche();

    }/************************* SALE , PURCHASE AND PROFITREPORT CALL***************/

    void report2(){

    int sher;clrscr();bbox();textcolor(WHITE);gotoxy(21,3);printf("\xDB\xDB\xDB\xDB\xB2 REPORT OF SALES /

    PURCHASE \xB2\xDB\xDB\xDB\xDB");gotoxy(5,5);printf("\tTHIS SECTION IS VIEWING SALES, PURCHASE and

    PROFIT REPORTS ");gotoxy(10,7);printf(" ********* ENTER THE OPTION WHICH SUITS

    YOU. **********\n");gotoxy(12,10);printf("\xDB\xDB\xB2 1.SALES.");

    gotoxy(12,12);printf("\xDB\xDB\xB2 2.PURCHASE.");gotoxy(12,14);printf("\xDB\xDB\xB2 3.PROFIT.");gotoxy(14,17);printf("\xDB\xDB\xB2 OPTION:");sher=toupper(getch());

    switch(sher){

    case '1':report();break;

    case '2':pur();break;

    91

  • 8/14/2019 Application for Departental Store

    92/128

    case '3':report3();break;

    default:

    gotoxy(9,20);textcolor(RED);cprintf("\a\xDB\xB2 WRONG ENTRY : PRESS ENTER TO GO

    TO MAIN MENU....");getche();

    }

    }

    /************************************ design module**********************/

    void design(){int i;clrscr();

    textcolor(14);/****************************** table design

    *********************/gotoxy(2,2);cprintf("\xC9");

    gotoxy(3,2);for(i=1;i

  • 8/14/2019 Application for Departental Store

    93/128

    gotoxy(2,17);cprintf("\xBA");gotoxy(2,18);cprintf("\xBA");gotoxy(2,22);cprintf("\xCC");

    gotoxy(2,19);cprintf("\xBA");gotoxy(2,20);cprintf("\xBA");g

    otoxy(2,21);cprintf("\xBA");gotoxy(2,24);cprintf("\xC8");gotoxy(2,23);cprintf("\xBA");gotoxy(3,24);for(i=1;i

  • 8/14/2019 Application for Departental Store

    94/128

    gotoxy(c,1);printf("");gotoxy(c,25);printf("");

    }

    for(r=1;r

  • 8/14/2019 Application for Departental Store

    95/128

  • 8/14/2019 Application for Departental Store

    96/128

  • 8/14/2019 Application for Departental Store

    97/128

  • 8/14/2019 Application for Departental Store

    98/128

    for(i=0; i

  • 8/14/2019 Application for Departental Store

    99/128

    99

  • 8/14/2019 Application for Departental Store

    100/128

    OUTPUT--------------------------------------------------------------------------

    DEPARTMANTAL STORE

    --------------------------------------------------------------------------MAIN MENU

    1 - INFORMATION ABOUT PRODUCTS2 - ENTER PURCHASE RECORDS3 - ENTER PRODUCTS TO BE SOLD4 - SEARCH FOR RECORD5 - DELETE RECORD FROM STORE DATABASE6 - VIEW SALES , PURCHASE & PROFIT REPORT7 - PRINT RECORDS8 - BAR GRAPH OF QUANTITY / PROFIT9 - RETRIEVE INFORMATION

    H - HELPE - EXIT

    --------------------------------------------------------------------------ENTER YOUR CHOICE ::

    --------------------------------------------------------------------------

    INFORMATION ABOUT PRODUCTS

    THIS SECTION IS TO TELL WHAT KIND OF PRODUCTS ARE THERE IN STORE

    ENTER THE OPTION WHICH SUITS YOU.

    1.EDIBLES.

    2.GENERAL ITEMS.

    OPTION:

    100

  • 8/14/2019 Application for Departental Store

    101/128

    Figure 1 Information about products

    PURSHASE

    ENTER PRODUCT ID : 126

    ENTER DESCRIPTION : shampooENTER RACK NO : 24

    ENTER CABNIT NO : 5

    ENTER UNIT COST :$ 53

    ENTER SALE PRICE :$ 55

    ENTER QUANTITY : 3=====================================

    TOTAL PRICE = $ 165.00 TOTAL COST = $ 159.00Date and time: Fri May 31 10:34:38 2002

    --------------------------------------------------------------------------More entries [y/n]

    --------------------------------------------------------------------------

    101

  • 8/14/2019 Application for Departental Store

    102/128

    Figure 2 Enter purchase records

    SALE

    ENTER ID OF THE PRODUCT TO BE SOLD:

    Price paid by customer = 165.00

    Quantity sold = 3

    102

  • 8/14/2019 Application for Departental Store

    103/128

    Figure 3 Enter products to be sold

    103

  • 8/14/2019 Application for Departental Store

    104/128

    SEARCH RECORD

    Two options available to search[ 1 ] - Search by ID number .

    [ 2 ] - Search by Description .

    Enter your choice::

    Enter id to be searched:126

    Product ID : 126

    Description : shampoo

    Rack no : 24

    Cabnit : 5

    Sale price :$ 55.00

    Quantity : 0============================

    Total :$ 0.00

    104

  • 8/14/2019 Application for Departental Store

    105/128

  • 8/14/2019 Application for Departental Store

    106/128

    DELETE RECORD

    Two options available to delete

    [ 1 ] - Delete by ID number

    [ 2 ] - Delete by Description

    Enter your choice ::

    Record has been deleted

    Check it by going to the displayed record

    --------------------------------------------------------------------------Press Enter to go to MAIN MENU ......

    --------------------------------------------------------------------------

    106

  • 8/14/2019 Application for Departental Store

    107/128

  • 8/14/2019 Application for Departental Store

    108/128

    REPORT OF SALES / PURCHASE

    THIS SECTION IS VIEWING SALES, PURCHASE and PROFIT REPORTS

    ********* ENTER THE OPTION WHICH SUITS YOU. **********

    1.SALES.

    2.PURCHASE.

    3.PROFIT.

    OPTION:

    VIEW OF SALES

    PRODUCT ID. NAME. SALE PRICE. QUANTITY. TOTAL PRICE

    ========================================================

    --------------------------------------------------------------------------Press Enter to go to MAIN MENU ........

    108

  • 8/14/2019 Application for Departental Store

    109/128

    Figure 6 View sales, purchase and profit report

    109

  • 8/14/2019 Application for Departental Store

    110/128

    BAR GRAPH

    THIS SECTION IS TO show the graph of quantity and profit

    ********* ENTER THE OPTION WHICH SUITS YOU. *******

    1.QUANTITY.

    2.PROFIT.

    OPTION:

    ************* GRAPH OF PRODUCT QUANTITY *************

    PRODUCT NAME: 0

    shampoo : 2

    Press enter to go to MAIN MENU .....

    110

  • 8/14/2019 Application for Departental Store

    111/128

    Figure 7 Bar graph of quantity / profit

    111

  • 8/14/2019 Application for Departental Store

    112/128

    RETRIEVE RECORD

    DESCRIPTION :

    ID NUMBER :

    RACK NO : 0

    CABNIT NO : 0

    UNIT COST :$ 0.00

    SALE PRICE : $ 0.00

    QUANTITY : 0===================================

    TOTAL PRICE : $ 0.00 __ TOTAL COST : $ 0.00

    Press Enter to see next if any or exit ...

    112

  • 8/14/2019 Application for Departental Store

    113/128

  • 8/14/2019 Application for Departental Store

    114/128

    HELP ABOUT THE PROGRAM

    [ 2 ] - ENTER RECORDS : THIS OPTION ALLOWS THE USER TO ENTER NEWRECORDS. USER ENTERS PRODUCT ID, DESCRIPTION,QUANTITY AND UNIT PRICE. THE PROGRAMM CALCULATES

    TOTAL PRICE AND DISPLAYS ON THE SCREEN.

    [ 3 ] - ENTER SALES : THIS OPTION ALLOWS THE USER TO SEE PREVIOUSSALE RECORDS.

    [ 4 ] - SEARCH PURCHASE : THIS OPTION ALLOWS THE USER TO SEARCHSPECIFIC

    RECORD BY ENTERING ID OR 'DESCRIPTION'

    [ 5 ] - DELETE PURCHASE : THIS OPTION ALLOWS THE USER TO DELETE ASPECIFIC

    RECORD BY ENTERING ITS 'DESCRIPTION' OR ID

    --------------------------------------------------------------------------Press any key to continue .............

    --------------------------------------------------------------------------

    [ 6 ] - VIEW REPORT : THIS OPTION ALLOWS THE USER TO PRINTPREVIOUS

    SALE RECORDS ON PRINTER

    [ 7 ] - PRINT RECORDS : THIS OPTION ALLOWS THE USER TO PRINTRECORDS

    OM PRINTER.

    [ 8 ] - VIEW GRAPH : THIS OPTION ALLOWS THE USER TO VIEW GRAPHOF QUANTITY.

    --------------------------------------------------------------------------Press any key to go to the MAIN MENU ........

    --------------------------------------------------------------------------

    114

  • 8/14/2019 Application for Departental Store

    115/128

    Figure 9 Help

    115

  • 8/14/2019 Application for Departental Store

    116/128

    116

  • 8/14/2019 Application for Departental Store

    117/128

    TESTING

    Testing is the process of executing a program with the intent of findingerrors in software development process, errors can be injected at any stages

    during development. There are various techniques that are used for detecting andeliminating errors but no method is perfect because most of the verificationmethods of earlier phases are manual.

    During testing, the program to be tested is executed with a test case isevaluate to determine if the program is performing as expected. Testing is a set ofactivities that can be planned in advance and conducted systematically. Its aprocess of analyzing a software item to detect the difference between existing andrequired conditions (i.e. bugs) and to evaluate the features of the software items.

    Test case designs are constructed for each path and for all logical decisions,and boundary values conditions. There are four paths in the process flow andtherefore four test case designs would be built to test path processing. A test casewill test whether logical decisions are made through condition testing and on thatresult whether control of process moves to the appropriate branch.

    The white-box testing can be applied to the operations defined for a classbasis path, loop testing, or data flow techniques can help to ensure that everystatement in an operation has been tested. However, the concise structure of manyclass operations causes some to argue that the effort applied to white box testingmight be better redirected to tests at a class level.

    Black box testing methods are as appropriate for Object Oriented Systemas they are for Systems developed using conventional Software engineeringmethods.

    UNIT TESTING

    Unit testing focuses verification effort on the smallest unit of softwaredesign the software component or module. Using the component level designdescription as a guide, important control paths are tested to uncover errors within

    the boundary of the module. The relative complexity of tests and the errors thosetests uncover is limited by the constrained scope established for unit testing. Theunit test focuses on the internal processing login and data structures within theboundaries of a component. This type of testing can be conducted in parallel formultiple components.

    117

  • 8/14/2019 Application for Departental Store

    118/128

    Module

    Test Codes

    InterfaceLocal data structuresBoundary ConditionsIndependent pathsError handling paths

    The module interface is tested to ensure that information properly flowsinto and out of the program unit under test local data structures are examined toensure that data stored temporarily maintains its integrity during all steps analgorithm execution. All independent paths through the control structure areexercised to ensure that all statements in a module have been executed at once.

    For unit testing two testing techniques are applied : white box testing andblack box testing.

    WHITE BOX TESTING

    White box testing, sometimes called glass box testing, uses the flow andcontrol structure of the process to derive the test case design white box testing iscarried out to test whether .

    118

  • 8/14/2019 Application for Departental Store

    119/128

    11

    31

    a) All paths in a process are correctly operational.b) All logical decisions are executed with true or false conditions.c) All loops are executed with their limit values tested.d) To ascertain whether input data structure specifications are tested

    and then used for other processing. In order to handle complexities of unit level

    processing, test case designs are built after drawing process flow charts and flowgraphs.

    PROCESS FLOW CHART PROCESS FLOW GRAPH

    LogicalSequence

    SequenceLoop

    LogicalDesign If

    Process

    stopLogical design

    UnitTerminal case

    While

    Back to the nextElement of dataIn a loop until.

    stop

    Analysis of process flow chart reveals following process paths:-

    Start -1 7 stop

    Start 1 -2 3 -3 4 - 8 stop

    Start 1 2 3 6 - 1 (Loop)

    Start 1 2 3 5 1 (Loop)

    119

    Start

    2

    54

    6

    8

    7

    7

    7

    7

    7

    7

    7

    7

    7

    7

    7

    7

    7

    7

    7

    7

    Stop

    Branching oncondition

  • 8/14/2019 Application for Departental Store

    120/128

    BLACK BOX TESTING

    Black box testing is also called behavioral testing, concentrates onfunctions and features of the software. Black box testing is not an alternative towhite box testing, but is complementary to it. Black box testing confirms whetherfor a give valid input, the software executes correctly to produce the requiredresults. Black box testing discovers errors that are not revealed by whit