Solved

a simple book store information system

Posted on 2000-03-15
2
186 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi ADO query as a string 4 2,568
change the mouse cursor 1 999
Delphi Skype API 2 1,757
loading dll from external path 1 210
Large Outlook files lead to various unwanted errors and corruption issues. Furthermore, large outlook files can also make Outlook take longer to start-up, search, navigate, and shut-down. So, In this article, i will discuss a method to make your Out…
Cloud-based technologies and services will continue to grow in popularity in 2017 thanks to the simple, scalable and cost-effective solutions they deliver. Here are three areas where cloud adoption is poised to really take off.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

912 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now