Solved

a simple book store information system

Posted on 2000-03-15
2
185 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
Comment Utility
we don't do any school projects
0
 
LVL 32

Accepted Solution

by:
Batalf earned 100 total points
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Marketing can be an uncomfortable undertaking, especially if your material is technology based. Luckily, we’ve compiled some simple and (relatively) painless tips to put an end to your trepidation and start your path to success.
In this step by step tutorial with screenshots, we will show you HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 6.5 (ESXi 6.5). This is important if you need to enable SSH remote access for additional troubleshooting of the ESXi hos…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

771 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

11 Experts available now in Live!

Get 1:1 Help Now