Solved

a simple book store information system

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Capture cookies with delphi 5 1,026
delphi 8 623
Error on close dbExpress with datasnap 5 573
Problem inserting a record into SQL Server database from Delphi 10 1,026
Many businesses neglect disaster recovery and treat it as an after-thought. I can tell you first hand that data will be lost, hard drives die, servers will be hacked, and careless (or malicious) employees can ruin your data.
ConnectWise and their customers need to ensure critical alerts automatically reach the right person at the right time. MSP superheros efficiently respond to these alerts key is providing automatic, intelligent alerting that generates a complete audi…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

791 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