Bookstore database in pascal

I am currently doing a assigment on a membership database, using Trubo Pascal, as part of a higher education course. However I don't have much time to write such a program. Could any body helping me ?

The requirement are as follows
Thomas has newly opened a bookstore, selling at least four different categories of books – IT reference books, magazines, novels and cookery books etc. He intends to expand the variety of books that he in the near future.

In order to build better rapport with the customers. Thomas is setting up a ‘Book Lovers’s Club’ to attract customers to sign up as members to his bookstore. With this  club, Thomas will be able to collect his customers’ particulars as well as their preferences for books. To become a member, the customer will have to pay a yearly subscription of $10.

Thomas also intends to implement a saving scheme for his customers. For customers who are members of this club, they will enjoy a 3% discount when they purchase any items in the bookstore. For members who have spent more than $1000 in a year, they will be deemed as Goldcard member, and they will enjoy 5% discount on any purchase in the bookstore.

Thomas would like to implement an information system in keeping track of the sales of each category of books. The system should indicate the best and worst selling category so that he can react to the market in time. Thomas would also like to computerise the enrolment of members into the club. The system will keep a database of the members’ particulars and members’ preferences in the books. Furthermore, the system should also upgrade the members to gold card members when they qualify for it.

Write a pascal program to implement a information system that is suitable for Thomas’ bookstoire.

As the lecturer said, use only single link list is enough. and Don't be too complicated. I have analyzed that the program can jyst use two record structures are enough, the member and the book details
Who is Participating?
BatalfConnect With a Mentor Commented:

You know we can't do your homework, so I will give you the same hint as a did to everlyn :

"They are wery restrictive here at EE about doing peoples homework, but we could probably guide you on your way.

First of all, you need some differents arrays :

eks Customer array which is an array of a record. The record could be something like this .

Customerrecord =
   custid : integer;
   lastname : string[25];
   firstname : string[25];
   adress : string[30];
   zipcode : string[6];
   phoneno : string[10];
   member : boolean; (* boolean = true or false. True if he/she is a member, false if not)

the customer array should then be an array of this record :

  custommerarray = array[1..200] of customerrecord;

Then you probably need a bookarray which also is an array of a "record". (bookid, title, category, price etc.)

At last you would also need an array of sale, ex : saleno, customerid, date, totalprice. This array should contain an other array which is books. Reason: one sale are often containing more than one book.

This array is probably the mainarray.

When Thomas are selling some books, this is the array he are using. First of all he type in the customerid

(when the user type in the customer id, your system should search in the customer-array and return customerdata if it's found), if not you should type in new customer data, and store dem in the customerarray. The same thing for the bookarray. When you type in a booknumber, the system should go to the bookarray and search for it, and return the bookdata if it's found.

When Thomas sell one book, this book are from a category. Numbers of sold books of this category should therefor be increased. Ex: make a categoryarray of record, like this .

categoryrecord =
   categoryname : string[30];
   soldbooks : intger;
category = array[1..10] of categoryrecord;

When a book has been sold you could use this command to increase no of sold books :


  (bookno = the book he sold)

I think this should help you.

Conclusion :
Make some arrays :

Make some procedures for working with these arrays, eks : saleprocedure, adding a book procedure etc. and make some calls to this procedures from a menu. Ex  of a menu :

writeln('1..... New Customer ');
writeln('2..... New Book');
writeln('3..... Sale');
write('Type in your choice : ");
readln(choice); (*Choice should be a string[1]*)

case string of
  '1' : Newcustomer(* call to new customer procedure)
  '2' : New Book


Sorry but we don't do homework.  We will help solve problems that may come up.

Go look at the question 'Not in prog parameters'

Much of what you want is in there.  However you will have to do the conversion yourself, especially the file routines.

As the man says we don't do homework.  We have lives to live.

PS.  Submitting homework stuff can get your removed from EE.
This is definitely a homework.
Verelyn asked the same question. 


Go complain to the Help section and specify the two questions concerned.  You may get the points, I've seen it done and points given and Verelyn hasn't come back to you yet.

There's 10 to 20 hours work involved in this assignment - rough estimate and I don't think anyone around here is that interested.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.