0% found this document useful (0 votes)
143 views

Programming Paradigm

The document describes a software project to develop an online shopping system. It identifies problems with existing online shopping systems, including difficulty updating prices and adding new product selections. The project will use the waterfall model and be developed in C language. Software requirements include functions for administrators to manage the product catalog and for customers to search, purchase items, and get support. Unit and functional testing are outlined to test the login system and administrator's ability to add new products to the catalog.

Uploaded by

Kim Say Liang
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
143 views

Programming Paradigm

The document describes a software project to develop an online shopping system. It identifies problems with existing online shopping systems, including difficulty updating prices and adding new product selections. The project will use the waterfall model and be developed in C language. Software requirements include functions for administrators to manage the product catalog and for customers to search, purchase items, and get support. Unit and functional testing are outlined to test the login system and administrator's ability to add new products to the catalog.

Uploaded by

Kim Say Liang
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

TTTK 2053

Programming Paradigm

Assignment

Name: Loo Jia Liang


Matric No: A161090

Name: Ong Yu Chen


Matric No: A160955
Identify a software problem:
Nowadays people are more lazy to go out from buying things and prefer buy the things
online. The system is help in buying product by choosing the listed product on menu.
But then there are still many problem exist on this online buying system that now exist on
market.

Problem 1: The admin hard to update the price once being put the product want to sell
online.
Problem 2: The admin cannot add the new selection to the product in the same category
Problem 3: Customer difficult and hard to find specific item or brand
Problem 4: Customer don’t know where to ask the question and only one email stated on
there even for different types of question.

SDLC Model:
Waterfall model is choosed as model for developing the software. The waterfall model
maintains that one should move to a phase only when it’s preceding phase is reviewed
and verified.
Althought it may exist the problem like clients may not know exactly what their
requirements are before they see working software and so change their requirements,
leading to redesign, redevelopment, and retesting, and increased costs. But since that it is
just a small software so it should be not a big problem.

Software Requirement:
1. Log in account of admin or customer
2. Admin can insert new item in.
3. Admin can delete item that exist.
4. Admin can update the price of item.
5. Admin can view all item.
6. Customer can clear all the item.
7. Customer can buy an item according category.
8. Customer can search by brand or code of item.
9. Customer can view what they had bough
10. Customer can make complaint or ask further question.
Software Design:

Software Implementation:
Develop the software by using C. Because c is more easier to use compare to python.

Software Testing:
Test for the program:
Unit Test
We would like to test for the log in interface. We want to find out what will happened
when we enter the wrong input: out of range of option and not number (int). On the same
time, we will also test whether it will go to the function that we want when we enter the
valid input (1, 2 and 0).
Test cases:
Test case Output Expected output Success or Fail
1. Enter 1 1 1 Success
2. Enter 2 2 2 Success
3. Enter 6 0 0 Success
4. Enter “^” 0 0 Success
5. Enter 0 0 0 Success

When we enter 1 the system will go to the admin() function, so in test case we set that it
consider success if return 1.
When we enter 2 the system will go to the user_main() function, so in test case we set
that it consider success if return 2.
When we enter 6 which is out of range, the system will print “Wrong Choice”, in test
case we set that it consider success if return 2.
When we enter “^” which is not a number, the system will terminate, in test case we set
that it consider success if return 0.
When we enter 0 which mean exit the system, in test case we set that it consider success
if return 0.

Test for the system:


Functional Testing
For functional testing, we would like to test the part where admin insert the new item as
the requirement of the system.
Test case:
Test case Expected result
1. Enter ph (phone) with code: 12345, name: Note3, Record inserted
brand name: Samsung and the price: 2388.
2. Enter tab (tablet) with code: 45678, name: Ipad2, Record inserted
brand name: Apple and the price: 1599.
3. Enter ep (earphone) with code: 54321, name: Record inserted
Bluetooth, brand name: JBL and the price 388.
4. Enter ph (phone) with code: abc12, name:S9, brand Record inserted
name: Samsung and the price: 3999

Figure 1
Figure 4 prove that the new item that we just insert is now in the database with the first
column is code, second is name of item, third column is the brand name, while forth
column is price and fifth column is the category (ph for phone, tab for tablet, ep for
earphone).

You might also like