?
Solved

a simple book store information system

Posted on 2000-03-15
2
Medium Priority
?
192 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 300 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

777 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