You are on page 1of 28

1.

0

Introduction There’s a lot of bookstore in Malaysia, such as MPH, Popular, Fajar Bakti, and

Pelangi, but have we wonder is there a system of buying book exist? Have we questioned ourself is there a system in which facilitate the user to buy a book? The answer is no! As we know, nowadays there is only a bookstore which required people or user to go to the bookstore just to buy a book. This will definitely time consuming as we need to queue up at the counter futhermore if there is less number of employess in front of the counter. Next, there is book online existed which to facilitate the user to buy a desired book through online. This will certainly save the user’s time. However, the book online is not so practical to the user who does not have the access to internet. This will certainly beneficial to the user who have the access Internet only. How about the user who does not have the access to internet? Therefore, book online still can’t solve the problem exist. Therefore, our group develop a system of buying book, namely Myawamelzi’s bookstore based on the combination of our group member which focussing on the process involve in the system of buying book. Our group had a clear objectives which is to facilitate the process of users buying a book, therefore it is necessary for us to use a clear instructions so that the user can easily understand. Thus, the system will help and facilitate users to buy desired book. Apart from that, the system are able to do most of the operation of adding book by admin. At the same time, the system enable the user to view the data, neither the data about book or the data about personal info that has been saved, indeed enable the user to search information about the desired book only instead of information of all book. Furthermore, the system not only benefit to the users, but as well to the admin also, in which it facilitate the process of information storage to become more systematic, methodical and orderly. The process namely as sorting.
1

2.0

Anticipated Benefits This will minimize the number of employess in the front and at the back of the counter The system will help to reduce the cost of labour. The system will be less probable to make mistake. This will avoid long queues at the counter due to the speed of execution and number of optimum screens to accommodate. The system will be available 24 hours for 365 days.

3.0

Objectives

The objectives of the project are as below: System user friendly Easier interaction between system and user

Time and cost saving To speed up the duration of transaction

Information storage and retrieval All the transactions will be recorded and saved

2

1 Class Diagram Interface MYAWAME LZI Interface ADMINUSER Interface ADMIN Interface USER ADMINUSER BOOK BOOKUSER 3 .0 UML Diagram 4.4.

author of book. Edit Book if there are changes in details of book. Admin  The admin responsible for managing the system by updating the book in bookstore. and Delete Book if the stock of book is empty. there are two users for this buying book system.     . Last but not least.2 Case Diagram ADD DATA EDIT DATA DELETE DATA DISPLAY DATA ADMIN SEARCHING USER SORTING Based on case diagram above. such as title of book.4. This can be done by the process of Add Book if there are new stock. It is important to make sure that the update from admin about data particular book must be linked to user (customer). admin should sort all the book according alphabet so that it will ease customer during the process of buy book. publisher of book. Admin should key in the details of book. admin need to update the book in bookstore so that customer knows the latest book in bookstore. which is admin and user (customer). Besides. price of book and total number of book.

. When the customer decided to buy the book. Complete the order form provided by the system which contain details about customers. then system will print out a statement for user to make payment in Maybank.User (Customer)   Firstly. user need to know the title and details about book by pressing displaying book button. Then. they have to fullfill the personal info of user in terms of name. title of book. User must be alert of all the list book in bookstore.      Secondly. they need to click “buy book” button. add their correct contact number in that system for make confirmation about buying book if admin have any doubt in their ordering items. user can press “search” and typing the title of book. total number of book to buy. address and telephone number. It is important for user to fullfill their address correctly for making the delivery of food by the admin. unless the system will print out a statement of cannot find the book. If the user want to search specific details about the desired book.

edit data or delete data or even their want to go back to the welcoming menu again to make the second choice. Author. BookNumber. public class AdminUser { book BO []=new book [50]. For example. Therefore array is the best data structure to hold data more than one value at time. is contiguous list. display data. Apart from that. our group choose to apply array in our program due to the need of looping through the menu of book so that user or admin given a choice of choose their option. or adjoining. String Title. All the data stored in array must be of the same type. especially when it comes to store a list of books for user to choose their requested books. double Price.Scanner. we use an array to store data/ implement a program.5. This can be proven based on the figure below as we copying the source code from the file AdminUser. Publisher.util. int TotalNumber . BookUser BU[]=new BookUser[50]. whether they want to add data. double and integer type that record all the data given by the user or the administrator. sectors of memory. In this program. that was a brief reason of choosing an array for this program.Name. Contiguous data structure is a method of storing data in contiguous. The usage of array in our program is actually one of the characteristic of the contiguous list. in this program. We used a contiguous list in our project because this method is simple to be applied in the program as time-consuming to execute. What is an Array? An array is a special variable. .0 Data Structures Used The data structure that we apply in our program which is book buying. Address. TelNumber. As a result. we use an array to store a list of data which is in string. //import java. which can hold more than one value at a time.

we did make a division of data. Publisher. Address and TelNumber has length 50 which means it has indexed variables pressure [0] through the the Title. This means. public class AdminUser { book BO []=new book [50]. Price. Price. Size of the list is specified by user is actually the second characteristics of contiguous list that we apply in the program. BookNumber. Publisher. while Price declaire as double data type and Total Number as int data type. TotalNumber. a place for storage data in which BO for admin’s data and BU for user’s data. This two statement is actualy shows that both BO and BU is an array. Name. Title. the Title. Based on the source code above. So in this context. Address. Price. Our group had declaire all the the Title. TelNumber declaire as string data type. TotalNumber. if the user insert their order more than 50. Name. . size or capacity of the array. Author. However. Publisher. BookNumber. so the system are unable to produces the output. BookNumber. The number of elements in array is called the length.Based on the source code. BookNumber. we have declaire a new name for class book as BO and a new name for class BookUser as BU in class AdminUser. Publisher. Name. Address and TelNumber in file AdminUser. Author. in which there are two array that we used in this program. the size of the list is specified by user’s data which means the number of data insertion for AdminUser already fixed to the 50 index. Author. TotalNumber. Address and TelNumber [49]. Each class of Book and Book User has their own array. Author. in which we divide data belongs to admin in file Book. Name. BookUser BU[]=new BookUser[50]. and data belongs to user in file Book User.

Author. how many data and what type of data belongs to admin? There are five data in admin. which is Title. } Figure above shows source code from class book. while data insertion or storage for user is in file Book User [BU]. Publisher. double d. double Price. Price=d. Publisher=c. int TotalNumber . Publisher.// book. Author. and TotalNumber. Price. book is the class for all data of admin. Author. int e) { Title=a.There are two array in our coding due we have decide the data insertion or storage for admin is in file Book [BO]. Publisher. So. Author=b. Admin responsible to add all the details or information of book in terms of its Title. This division of array is done is due because we want to ease the process of adding and saving two different data. while price is double data type and TotalNumber is int data type. and TotalNumber so that user or customer can get all the details about book in Myawamelzi’s Bookstore. Publisher is categorized as string data type. Price. . TotalNumber=e. public class book { String Title. Based on the source code above. Title. public book(String a. String b. Author. That is the reason why this five of data is categorized as data belongs to admin. String c.

Address=i. BookUser is the class for all data of user. which is Name. } Figure above shows source code from class BookUser. In this context. as we copy from file Priority. String h. quantity of book wants to buy (BookNumber). address and telephone number (TelNumber) in order to buy book. BookNumber=h. or known as “static” data structure. TelNumber=j. TitleOfBook=g. Address. Based on the source code above.util. public class Priority { public static book [] BO = new book [50]. TitleOfBook. String g. This can be proven from the figure below. // user. So. BookNumber. TelNumber . book’s title that customer wants to buy (TitleOfBook). This is the reason why this five data is categorized as data belongs to user. String j) { Name=f. there are five data in admin. All the data is string data type. public static void main(String[] args) { .public class BookUser { String Name. Next. String i. BookNumber. Address and TelNumber. user or customer needs to fullfill the order form in terms of customer’s name (Name).Scanner. TitleOfBook. another characteristic of contiguous list is the size can’t be modified. import java. how many data and what type of data belongs to user? Contrast with admin’s data. public BookUser(String f.

the parent structure contains children between firstChild(i) and firstChild(i) + numChildren(i) .. so that the number doesn’t change.. the size of data is small which up to 50 index only. its has a fixed size and define the number of elements it can hold. contiguous list is best implement when the operations of deletion and insertion are happened rarely and when using random access. addding data of book’s title in array by admin. Note that indices are zero-based.1 inclusive.. The benefit of using this kind of data structure is the size of list is already known... The contigouos list is good implementation when the situations are the number of data are small and in our program. . Plus.. For example... The advantage of contiguous lists is that each parent can have a variable number of children. [49] Making room to insert “ MataDiaBulat as the fourth entry or index [3] in an array. A contiguous list stores the book contiguously in the array. [0] AyamItu Sedap [1] GergasiDi DuniaKini [2] HantuItu Jiranku [3] MataDia Bulat [4] Zombie Kampung Pisang [5] [6] . and all the children for one parent are stored together on disk for fast access.Since it is called static data structure. Contigous List – Adding Data [0] AyamItu Sedap [1] GergasiDi DuniaKini [2] HantuItu Jiranku [3] KucingDan Ayam [4] MataDia Bulat [5] Zombie Kampung Pisang [6]. and the parent structures maintain the first child index and the number of children. For instance.[49] Removing“KucingDanAyam “ by shifting array entries.

0 Searching’s Technique In computer science. Searching also refers to the operation of finding the location of a given item in a collection of items. the user can easily search the title book of he/she want. The admin actually had sort all the details about the book according to the alphabet by its title before the data had been linked to “user”. sequential search and binary search. user just type the desired book that she/he looking for in the empty text field provided. Then. for instance in the context of price. a search algorithm is an algorithm for finding an item with soecified properties among a collection of items. the function of binary search happened when the user is being user choose button of “search”. As in our coding. The search is said to be successful if ITEM does appear in DATA and unsuccessful otherwise. In our program. The main reason why we choose binary search as it suitable for the data which is already sorted either in ascending or descending order. we did arrange or sorted the data of the books according to book’s title alphabetically. once the user choose the button of “search”. thus can easily get details about the book.publisher. Next. the user don’t want to see all the book list. As for our program. we choose to apply binary search. The items may be stored individually as records in a database. The functionn of searching happen during user decide to find “search” book. In this context. according to alphabetically by its title. As a result. and showing the process of searching in “user”. author and the total number of book. the information or details about the desired book according to its . but just want to know the details about the book that he/she want to buy. the user need to click the “search” button. Searching method can be divided by two ways.6. Therefore. This is actually showing the process of sorting which had happened in “admin”. It means. it will display the desired book that the user want to buy.

the information of book can’t be display. and so on until it either locates the desired book or look all the book without success.then decide whether to look in the left or in the right half. compared with sequential which 0(n). but we just concentrate on the right half. “Text Field” and “Text Area” are the two terms required in designing Graphic User Interface. and without “Text Area”. . which means the process of searching the title of books is much faster compared to sequential search which need to compare the desired book (target) with the first entry in the list. we may decide to look from half way. the second entry in the list. both binary and sequential have a value of 0(1). as we know the book is ordered alphabetically therefore if we decide the book is in the right half. user can’t type or search the desired book. For instance. The process are repeated until it find the target. binary case is more efficient which 0(log n). how does the binary search function? The function of this source is to find the middle item. Thus. If decide to look in one half. but in the context of worst case. price and total number will be print out or will be display in “text area” provided. ignore the other one half. publisher. Without “Text Field”. We apply binary search in this section as the title of the book is already sorted. As in the context of best case. To be compared with sequential searching. binary case is more efficient which 0(log n) compared with sequential search which 0(n). we can disregard the left half or throw it away. binary search is proven more efficient than the sequential search. binary search can be concluded as more faster than the sequential searching.author. Same in average case. if we are looking book in our bookstore. This way of search is dramatically reduced because we only have ½ book to search. So.

However.7. shell sort and merge sort. Among this two categories. quick sort and heap sort has advantages on speed. and the second categories is advanced sorting which contain quick sort. double Price. which this four type of sort is more faster and quick in time compared with the insertion sort or selection sort. Publisher.we have fixed the insertion data is only to 50 index. heap sort. BookUser BU[]=new BookUser[50]. //import java. which can be classified as small data in the list. first categories is simple sort which contain insertion sort and selection sort. Address. Yet. TelNumber. Sorting method can be actually divided into two categories.0 Sorting’s Technique Sorting process of putting a list or a group of items in a specific order.util.Scanner. In our program. .Name. this four type of sort is suitable for program which have large data or array. for instance up to hundred or thousand index. we choose to apply the simple sort in our coding which is selection sort. Sorting can also be done in ascending order (A-Z) or descending order (Z-A). int TotalNumber . public class AdminUser { book BO []=new book [50]. String Title. This simple sort is actually suitable for the program which have small data or small array. Some common sorting criteria are: alphabetical or numerical. merge sort. BookNumber. thus this is the main reason why our group choose to apply simple sort. however there is no doubt that advanced sorting such as shell sort. Author.

selection sort shows the least of number comparison which is 4 number of comparison. compared to insertion sort. up to 50 index only. Plus. as this two type of sorting is suitable for small data? Yes. Based on the figure below. both of this sorting is actually suitable for coding which have small data. the selection short shows the least number of comparison. why we choose to apply selection sort.Next. which insertion sort is 0(n) while selection sort is 0(n2). as we compared this two type of sorting. compared to insertion sort which shows more number of comparison which is 11. the insertion sort shows more efficient compared to selection sort in best case. . not insertion sort. for instance in our program. The figure below shows the comparison between selection sort and insertion sort during the process of sorting the book according to its alphabet. However.

.(i) ZombieKampung Pisang Selection Sort HantuItu Jiranku AyamItu Sedap GergasiDi DuniaKini MataDia Bulat KucingDan Ayam 1st comparison A<Z [0] AyamItu Sedap [1] HantuItu Jiranku [2] ZombieKampung Pisang [3] GergasiDi DuniaKini [4] MataDia Bulat [5] KucingDan Ayam 2nd comparison G<H [0] AyamItu Sedap [1] GergasiDi DuniaKini [2] ZombieKampung Pisang [3] HantuItu Jiranku [4] MataDia Bulat [5] KucingDan Ayam 3rd comparison H<Z [0] AyamItu Sedap [1] GergasiDi DuniaKini [2] HantuItu Jiranku [3] ZombieKampung Pisang [4] MataDia Bulat [5] KucingDan Ayam 4th comparison K<Z [0] AyamItu Sedap [1] GergasiDi DuniaKini [2] HantuItu Jiranku [3] KucingDan Ayam MataDia Bulat [4] [5] ZombieKampung Pisang No comparison M=M [0] AyamItu Sedap [1] GergasiDi DuniaKini [2] HantuItu Jiranku [3] KucingDan Ayam MataDia Bulat [4] [5] ZombieKampung Pisang No comparison Z=Z [0] [1] [2] [3] [4] [5] The number of comparison for selectioon sort is 4.

.(ii) ZombieKampung Pisang Insertion Sort HantuItu Jiranku AyamItu Sedap GergasiDi DuniaKini MataDia Bulat KucingDan H<Z Ayam [0] HantuItu Jiranku [1] ZombieKampung Pisang [2] AyamItu Sedap [3] GergasiDi DuniaKini [4] [5] KucingDan Ayam MataDia Bulat A<Z A<H [0] AyamItu Sedap [1] HantuItu Jiranku [2] ZombieKampung Pisang [3] GergasiDi DuniaKini [4] MataDia Bulat [5] KucingDan Ayam G<Z G<H G>A [0] AyamItu Sedap [1] GergasiDi DuniaKini [2] HantuItu Jiranku [3] ZombieKampung Pisang [4] MataDia Bulat [5] KucingDan Ayam M<Z M>H [0] AyamItu Sedap [1] GergasiDi DuniaKini [2] HantuItu Jiranku [3] MataDia Bulat [4] ZombieKampung Pisang [5] KucingDan Ayam K<Z K<M K>H [0] AyamItu Sedap [1] GergasiDi DuniaKini [2] HantuItu Jiranku [3] KucingDan Ayam MataDia Bulat [4] [5] ZombieKampung Pisang [0] [1] [2] [3] [4] [5] The number of comparison for selectioon sort is 11.

the process of sorting can’t be display or can’t be seen in interface because once the admin add all the details about book. there will be no issues if admin forget to choose “sort”. In this final project. the sort will locates the smallest or largest value in the array. it will be automatic sort according to alphabet when admin click the “display” button. But have we wonder if the admin forget to click the “sort” button. which means perhaps the first book may begin with the letter “z”while the fifth book may begin with the letter “a”. selection short help us to sort all the title of book according to alphabet. Mainly.So. its position is in the last list of array. for instance five book in one time and the insertion data is not according to alphabet. Therefore. selection sort has rearranged the position of book’s title according to alphabet. which is the data is automatic sort. lets said the title of the books start with A. in our program. how does the selection sort works? Selection sort are able to rearranges the object byinterchanging value. This is difference compared with assignment 2 that required admin to choose “sort the book” first in order to sort the book. How the selection sort function? Well. As in our program. then can the book arranged in order? The answer is no. its position is in the first list of array and if the title of the books start with Z. . Thus. This will became the weakness of our program. we had modified the program so that the book added is automatic arrange in order.

its position is in the last list of array. As in our program. Selection sort are able to rearranges the object by interchanging value. lets said the title of the books start with A. selection short help us to sort all the title of book according to alphabet. selection sort has rearranged the position of book’s title according to alphabet. its position is in the first list of array and if the title of the books start with Z. in our program. .Figure : Algorithm for SelectionSort Figure shows the algorithm that we apply in this program. Mainly.

The graphical user interface is presented (displayed) on the computer screen. Good user interface design relates to the user. as opposed to text-based interfaces. typed command labels or text navigation.g. Good user interface design facilitates finishing the task at hand without drawing unnecessary attention to itself. The design process must balance technical functionality and visual elements (e. and eases the designer's work to change the interface as the user needs evolve.0 Graphic User Interface (Gui) In computing. The goal of user interface design is to make the user's interaction as simple and efficient as possible. GUIs were introduced in reaction to the perceived steep learning curve of command-line interfaces (CLI).This allows the user to select or design a different skin at will. As in our program.which require commands to be typed on the keyboard. graphical user interface (GUI) is a type of user interface that allows users to interact with electronic devices through graphical icons and visual indicators such as secondary notation. mental model) to create a system that is not only operational but also usable and adaptable to changing user needs. . Graphic design may be utilized to support its usability. in terms of accomplishing user goals—what is often called user-centered design. we had print screen a few interface to show the flow from the first interface to the last interface. not the system architecture..8. It is the result of processed user input and usually the primary interface for human-machine interaction.

This system is simple system but useful application to manage all about book.9. plus delivery process as well as increase customer satisfaction.0 Conclusion The proposed system is developed to manage the operations of buying book in bookstore. The system purposely used to improve work effectiveness and efficiency the operations of buying book in bookstore. The list of book are display to inform customers about book that is provided by bookstore. . Its helps to add and save the desired book from user or customer.

whether we want to log in as “admin” or “user” or we want to“exit” from the system. Figure 1 Figure 2 below shows second interface in which we are given three choices.2 Sample Output Figure 1 below is the first interface in our system. Figure 2 . There is a “next” button exist. This visual is to give a good impression to the user. in which user or admin need to click on that to proceed to the next level or interface.9.

“reset”button (to clear the text). “edit” button and “delete” button.Figure 3 below show a dialog box is appear when we click the “exit” button. Figure 3 Figure 4 shows an interface of admin in which there are “add details” button (to add details about book). Figure 4 . “display” button (to display the book in which the admin had enter the details about book).

Figure 5 Figure 6 shows a dialog box “the book has been added and saved successfully to MYAWAMELZI’S BOOKSTORE” appeared after admin click “yes”to add the book. indicating the details about the book is already added.Figure 5 shows a dialog box “are you sure you want to add the book?” appeared as soon as admin click “add details” button. Figure 6 .

Figure 7 shows the details about book in which admin had added. If admin click “yes”. “user” and “exit”. admin can click “reset”. we will go back to the main page again. If admin to clear the text. where we need to choose between“admin”. Figure 8 . for example “GERGASIDIDUNIAKINI” has been display on the space provided. Figure 7 Figure 8 shows a dialog box appeared “are you sure you want to exit” if admin click the “exit” button.

“add details” button (add details about user). Figure 9 . “buy book” button (confirmation of user to buy or not).Figure 9 shows an interface of user in which there are “display book” button(linked with book in which admin had added). “total price” button (total up the price per book) and “reset” button. “search” button (user search specific/desired book).

Figure 10 .Figure 10 shows a dialog box “are you sure you want to add the details?” appeared as soon as user click “add details” button.

indicating the details about the book is already added.Figure 11 shows a dialog box “the details has been added and saved successfully to MYAWAMELZI’S BOOKSTORE” appeared after admin click “yes”to add the book. Figure 11 .

Figure 12 . Please do the payment in Maybank” as soon as user click the “buy book” button.Figure 12 shows a dialog box is appeared “Thank You.