Guardian Programmer's Guide

Table Of Contents
Writing a Requester Program
Guardian Programmer’s Guide 421922-014
21 - 10
User Interface
Queries the status of an existing order to find out who placed the order, when the
order was placed, and whether the order has been shipped.
User Interface
When the application starts up, it displays the main menu on the terminal as follows:
Type 'r' to read a part record
'p' to process an order
'q' to query an order
'x' to exit the program
Choice:
When the user selects “r” from the main menu, the application prompts the user for a
part number and then displays inventory information about the specified item.
When the user selects “p” from the main menu, the application prompts the user for
information to fill out an order request. First it prompts for a part number and displays
inventory information. Then it prompts the user to specify the quantity, the name and
address of the customer, and the customer’s credit-card number. Once the application
has processed the order, it displays an order number on the terminal.
When the user selects “q” from the main menu, the application prompts for an order
number. The application responds by displaying information about the order.
When the user selects “x” from the main menu, the process stops and the command-
interpreter prompt returns.
Application Overview
The application database is made up of part records and order records. The part
records are contained in the inventory file and the order records in the orders file.
The Inventory File
The inventory file contains one record for each item that the store carries. A part
record contains the following information about a given part:
The part number
A brief description of the item
The quantity of the item currently on hand
The unit price of the item
The name of the supplier
If an order has been placed with the supplier, the quantity ordered and the
expected delivery date