You are on page 1of 38

`

Table of Contents
DEFINITION OF PROBLEM 3
PROBLEM STATEMENT: 3
DESCRIPTION OF PROBLEM: 3

TECHNIQUES OF ANALYSIS 4

NARRATIVE AND FLOW CHART 5


NARRATIVE OF ALGORITHM 5
FLOWCHARTS FOR THE PROGRAM: 7
FIGURE A- MAIN FUNCTION 8
FIGURE B-MENU 9
FIGURE C-INARRAY 10
FIGURE D- SEARCH 11
FIGURE E- OPTION 1 12
FIGURE F- OPTION 2 13
FIGURE G- OPTION 3 14
FIGURE H- OPTION 4 15
FIGURE I- OPTION 5 16
FIGURE J- WRITE TO FILES 17

DATA FLOW DIAGRAMS 18


Level 1 Diagram 18
Data Flow Diagram Process 1.0-ACCEPT LAUNDRY 19
Data Flow Diagram Process 2.0-RETURN LAUNDRY 19

ENTITY RELATIONSHIP DIAGRAM 20

FUNCTIONAL AND NON-FUNCTIONAL REQUIREMENTS 21


Functional Requirements: 21
Non-functional requirements: 21

STRUCTURE CHART 22

USER INTERFACE DESIGN 23

1 | Page
`

CODING AND TESTING 24


CODING OF PROGRAM 24
SOURCE CODE: 24
TEST PLAN AND RESULTS: 25
INT MAIN: 25
OPTION 1/VOID BILL: 27
OPTION 3/CHANGING A PRICE: 30

CONCLUSION 36

2 | Page
`

DEFINITION OF PROBLEM

PROBLEM STATEMENT:

A business using an outdated system to collect, and store data began having issues with keeping
data safe and complaints of long waiting time since the current process to collect, store and print a bill is
too time-consuming and inefficient. This problem needs to be addressed so as to allow the business to
become more efficient and expand its services. A program must be written so that it would
update/replace an old/obsolete system of data collection and storage. The program must be able to
simplify and optimize the system previously done by the business.

DESCRIPTION OF PROBLEM:
Cheng’s laundromat is a family business run by Mr. Cheng, located in San Fernando. It has been
in business since 1977 by Mr. Cheng and his wife. The laundry offers services to clean clothes brought in
by customers daily. The business still utilizes the same manual method of data collection for collecting
the customer’s details and making a bill. This process has become very problematic for example when
customers bring their laundry, their data is taken and written in a list in a record book. This task is
already strenuous but furthermore, when a customer comes to collect their laundry, the employee
manually looks through the list names for the customer’s details. This makes the expansion of the
laundromat appear unrealistic.

A program should be created to complete all the tasks the business requires in a more efficient
and less stressful manner. The program must store customer details, edit services and generate reports.
This is accomplished by using my knowledge as a Computer Science student.

3 | Page
`

TECHNIQUES OF ANALYSIS

Several techniques of analysis were employed to accurately understand the requirements for the
program. Interviews with management where they can share their vision, questionnaires for
understanding their needs and simply watching business operations were done.

Some questions asked were:

● Can You Summarize What You Want The Program To Do To Me In Just A Few Sentences?

● What Design Considerations/Constraints Does The program Have To Work Within?

● What Are The Underlying Assumptions?

● For How Long (Use Session Length)?

● How Many Active Users You Have (Is This Growing)?

● What are the Most Common Mistakes?

● How Involved Will You Be in the Development Process?

4 | Page
`

5 | Page
`

NARRATIVE AND FLOW CHART


NARRATIVE OF ALGORITHM

● Main function- Upon the start of the program, the program will read data from external files and
insert them into arrays. Following that, the user will be shown a menu holding the various tasks
that the program allows.

MENU
1. Bringing to wash
2. Collecting items
3. Change price of wash
4. Report of items in stock
5. Adding a new type of wash
6. CLOSE

The user is then prompted to select one of the options listed above, e.g. either 1, 2, 3
etc. Then the program will then execute the function associated with that option. After the
execution of that option, it displays the menu again followed by the prompt for another option
and then loops back to execute the option. This process continues until the close option is
chosen which will simply write all data in arrays to the appropriate files and closes the program.

● Bill function- prompt for customer name, the wash id that would be done and the amount of items
● When option 1 is chosen data from prices file will be outputted and then the bill function happens.
● When option 2 is chosen the user will be prompted to enter the name of the customer requesting to
claim his/her item(s). upon entering the customer’s name, the program will search the file stock for
the customer’s name, and when/if it is found the customer’s name, number of items and wash
requested will be shown. After this the program will remove the customers details from the stock
and then re-enter the loop, showing the menu and prompting for another option.
● Option 3 is to change the price of a wash, therefore when option 3 is chosen the program will
prompt for the washID of the wash that is wanted to change. The program will then take the washID
and search the prices file for the corresponding price. When the price is found it will be set to zero
and the user prompted for the new price of the wash which will then be stored. Finally, the program
will update the prices file b4 it enters the loop and opens the menu and prompt for another option.
● If option 4 is selected the program will simply print all data from the stock file.
● If option 5 is chosen, the user will be prompted to enter the new washID, its price and a short
description. The program will then store the new wash in the prices file and the reentry to the loop.

6 | Page
`

FLOWCHARTS FOR THE PROGRAM:

THE FIGURES BELOW SHOW THE FLOWCHARTS FOR THE FUNCTIONS OF THE PROGRAM

NOTE*

● Yes, means the output is true.


● No, means output is false.

7 | Page
`

FIGURE A- MAIN FUNCTION

8 | Page
`

FIGURE B-MENU

9 | Page
`

FIGURE C-INARRAY

10 | Page
`

FIGURE D- SEARCH

11 | Page
`

FIGURE E- OPTION 1

12 | Page
`

FIGURE F- OPTION 2

13 | Page
`

FIGURE G- OPTION 3

14 | Page
`

FIGURE H- OPTION 4

15 | Page
`

FIGURE I- OPTION 5

16 | Page
`

FIGURE J- WRITE TO FILES

17 | Page
`

DATA FLOW DIAGRAMS


Level 1 Diagram

18 | Page
`

Data Flow Diagram Process 1.0-ACCEPT LAUNDRY

Data Flow Diagram Process 2.0-RETURN LAUNDRY

19 | Page
`

ENTITY RELATIONSHIP DIAGRAM

20 | Page
`

FUNCTIONAL AND NON-FUNCTIONAL REQUIREMENTS


Functional Requirements:

The functional requirements of the new data management system are:

1. The program should be able to create a new customer record which includes
a unique customer id, the customer's name, address, and a telephone contact
number.
2. Must be able to accept either the customer's name or the customer’s ID and
search the customer database for the customer’s details.
3. The program must be able to add a new wash type, this consists of a wash
ID, wash description and the wash price.
4. It should also be able to edit any existing wash type.
5. Finally, the program must generate reports for all files.

Non-functional requirements:

The non-functional requirements of the new report generating system are:

1. A process’s runtime is no more than 1 second.


2. The customer file must hold customer’s data indefinitely.
3. The program can handle at least 100 customers a day.

21 | Page
`

STRUCTURE CHART

22 | Page
`

USER INTERFACE DESIGN

The employer requested a modern and simplistic design. It was also requested to be made for
touch screen devices.

23 | Page
`

CODING AND TESTING


CODING OF PROGRAM

SOURCE CODE:

The program was written in Dev C++. An appropriate data structure, indentation and use
of comments were kept in mind. Attached is the source code that was written followed by the 2
files (stock and prices containing test data) that the program would use.

24 | Page
`

TEST PLAN AND RESULTS:


NOTE: EACH TEST WAS CARRIED OUT AN THE PROGRAM RESTARTED.

INT MAIN:

TEST NUMBER TYPE OF INPUT DESCRIPTION EXPECTED RESULT ACTUAL RESULT SUCCESS? /COMMENTS
1 NORMAL User enters a The appropriate Correct function The test was successful.
value between option function will opens.
1-6. open.
2 EXTREME User enters a Program outputs a Option not The test was successful.
value above the message “Option available.
range (1-6). not available.” and And the loop
the loop continues. continued.
3 ERRONEOUS User enters Program was Program entered an The test was completely
wrong data e.g. expected to be infinite loop. unsuccessful.
“A”. terminated.

TEST 1: SHOWING THAT THE FIRST OPTION WAS SELECTED AND SUCCESSFULLY OPENED.

25 | Page
`

TEST 2: SHOWING THAT A NUMBER OVER THE RANGE WAS SELECTED AND ITS OUTCOME

TEST 3: SHOWING THAT “A” WAS SELECTED AND ITS OUTCOME

26 | Page
`

OPTION 1/VOID BILL:

TEST TYPE OF INPUT DESCRIPTION EXPECTED RESULT ACTUAL RESULT SUCCESS? /COMMENTS
1 NORMAL Data entered: “The total is “The total is Yes, successful.
Name- Jackie $30.00” should be $30.00” was
washID- 3 outputted and the printed and the
numitems- 2 loop entered. menu/loop
entered.
2 EXTREME Name- tom hank “The total is “The total is Yes, successful.
washID- 5 $2500.00” should $2500.00” was
numitems- 100 be outputted and printed and the
the loop entered. menu/loop
entered.
3 Name- @1babe The program runs “The total is The data was accepted,
washID- 1 normally. $2000.00” was therefore a success.
numitem-1 printed and the
menu/loop
ERRONEOUS entered.
4 Name- @1babe The program will The data was taken if incorrect washID is
washID-9 freeze and crash the bill was taken the bill uses the
numitem-100 because the calculated to be price as $0.00, causing
washID does not $0.00 an overall bill to b $0.00
exist.

27 | Page
`

TEST 1: SHOWING THE OUTPUT OF THE PROGRAM.

28 | Page
`

TEST 2: SHOWING THE OUTPUT OF THE PROGRAM.

TEST 3: SHOWING THE OUTPUT OF THE PROGRAM.

29 | Page
`

TEST 4: SHOWING THE OUTPUT OF THE PROGRAM.

OPTION 3/CHANGING A PRICE:


TEST NUMBER TYPE OF INPUT DESCRIPTION/DATA EXPECTED RESULT ACTUAL RESULT SUCCESS? /COMMENTS
ENTERED
1 NORMAL User enters a Prompt for the Prompt appears The test was successful.
washID price and program
continues
normally
2 EXTREME User enters a Tells user the id is Prompt for the The test was
nonexistent ID not found and new price appears unsuccessful.
prompts for still. Code needs to be
another washID added.
1.1 NORMAL User enters the new The file will change The file was Test success.
price (100) with the new price changed with the
replacing the old new price
price in the replacing the old
corresponding price in the
washID corresponding
washID
2.1 ERRONEOUS User enters new The program will The program Failure.
price (ten) crash and close, enters an infinite
therefore no loop.
changes to the file.

30 | Page
`

TEST 1: SHOWING THE OUTPUT OF THE PROGRAM.

TEST 2: SHOWING THE OUTPUT OF THE PROGRAM.

31 | Page
`

32 | Page
`

TEST 1.1: SHOWING THE INPUT BY THE USER.

PRICES FILE BEFORE THE PROGRAM RAN:

33 | Page
`

PRICES FILE AFTER THE PROGRAM RAN (THE CHANGE MADE):

34 | Page
`

TEST 2.1: SHOWING THE IMPUT OF THE USER BEFORE ENTERING.

RESULT AFTER ENTERING: LOOP

35 | Page
`

SNAP SHOWING THAT THE DATA WAS NOT CHANGED:

36 | Page
`

CONCLUSION
This basic program, written for the laundromat was written and tested appropriately for a test
integration in the business. The program will be implemented and any kinks that may be found will be
fixed immediately and retested.

37 | Page

You might also like