Solved

a simple book store information system

Posted on 2000-03-15
2
190 Views
Last Modified: 2010-04-16
Here is what I need help in, please help:
Need to create a book store information system with this main condition.

bookstore:  Thomas Bookstore

owner: Thomas

4 categories of Books: IT reference books, magazines, novels and cookery books.

Owner wants to set up " book lover's club"

Book lover's club include:
- customer's particulars
       - name
       - SSN
- preferences of books.

Book lover's club benefits:

3% discount of any item.

IF spend > $ 1000 in a year
 Then become Goldcard member
Goldcard member gets 5% discount

 Information system need to perform this task:
  - keep track of sales in each book category.
  - display the worst  and best selling books.
  - has a screen to enter book lover's club record.
  - upgrade members to gold card member if qualify.
  - display all  members record.

Thanks for taking the time to help me up on this as I'm no good with pascal.
Doesn't know how to apply link list or pointer to this scenrio.

Kevin  


0
Comment
Question by:icevam
2 Comments
 
LVL 1

Expert Comment

by:ntdragon
ID: 2620846
we don't do any school projects
0
 
LVL 32

Accepted Solution

by:
Batalf earned 100 total points
ID: 2620854
You need to define different arrays of records, and somehow link them together as we do with database systems(with primary and foreign keys)

type
   book_type = record
       IsbnNo : String[20];
       Title : String[20];
       price : real;
       WriterId : Integer
       categoryno : integer;
   end;
   Writer_type = record
       WriterId : Integer;           First_Name : String[20];
       Last_Name : String[20];
      end;
      CustomerType = record
         cust_id : Integer
      LastName : String[20];
      FirstName : String[20];
      Total_Buying : Real;
      Adress : String[20];
    end;
    category_type = record
       categoryno : integer;
       category : String[20];
    end;
    customer_booktype = record
      customer_id : integer;
      isbn_nr : string[20];
      number_of_books : integer;
    end;



These are the file types. Now you need to declare some arrays of these :

Var
    Customer : Array[1..100] of CustomerType;
    Book : Array[1..400] of BookType
    Writer : Array[1..100] of WriterType;
    Customer_book : array[1..1000] of customer_book

No, you could could develop the program, and maybe have a menu which gives you the options of register new books, new customers, new sales etc.

For registering new books you call up a procedure which manipulates the values in the book array
    register a unique isbn_no, the price. When you register the writerid, you make a loop which search throguh the writerarray for a match. (The writerid you typed in the book-array should have a match in the writer-array).

This general procedure is repeated for most of the menuchoices. When you register a new sale, you type in the customerid(if he/she doesn't exist you should register the customer), The program search through the customerarray and if it find a match it returns customerdata(name, adress, total_buying etc.). Then you have a table where you register each book this customer are buying(based on the array customer_book). The value Total_Buying would be increased with the price of the book times number_of_books. If he reaches the limit for getting a goldcard-member, the program should calculate the discount.

Well, this is generally how should do it. To give you the whole source code for this is a lot of work.

Hope this would help

Regards
Batalf







0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Read the original post on Monitis Blog. Believe it or not, the most important thing about the website of your business is not what’s on it but how fast it loads. Yes, that’s right!    As you can see on this infographic (an oldie but goodie!), …
Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question