Professional Documents
Culture Documents
CSC508
CSC508
data structure implemented. You may implement different data structures for
each component (i.e. Book and Patron).
Java uses data structures to store and organise data so that it can be used more
effectively. Data structures come in two varieties: non-primitive data structures and
primitive data structures. A data structure that simply stores one kind of data is referred
to as a "primitive data structure." A data structure is not only used for organizing the
data. It is also used for processing, retrieving, and storing data. There are different
basic and advanced types of data structures that are used in almost every program or
software system that has been developed.
In this assignment, I used structure stack, linked list to complete this program. I used
same data structure for both (Patron and Book). A stack can also be implemented
using arrays. But arrays are of limited size, and the size of the stack must be
predetermined, whereas, in a linked list, implementation nodes can be added
according to the user's requirements. A linked list is a linear data structure, in which
the elements are not stored at contiguous memory locations.
b) Visualize your chosen data structures for both Book and Patron with sample data.
c) Provide the flowchart for the following operations:
i) Flowchart – Add book Start
Admin Password
No
Yes
Add Book
No
Enter all data Wait
Yes
No
End
ii) Flowchart – Search book
Start
Menu
Search Book
No Yes
Enter Display Books Detail
Category
No Yes
End Enter Title Display Books Detail
No Yes
Enter
Genre Display Books Detail
Start
Menu
Display 10 book
borrowed by Patron
Yes
No
Enter Title Display Patron’s List
End
Register
Sign In
Update Account
Update Name
Update Telephone
Number
No
End