Vous êtes sur la page 1sur 1

Assignment No 3 Due date: 9-12-2011

1) Build an application which populates (Builds) BST and then saves all nodes data into a file data.dat by using object IO. Each node should have following data Patient Name Father Name Age NIC(Numeric) (must check validity) Address Disease Doctor Name Patient ID(Numeric). (must check validity){may not take from user but assigne after searching) NIC and patient ID should be unique. Choice should be given to the user either build BST on basis of NIC or Patient ID. 2) Second application should read data from file and again build BST on the basis of either NIC or Patient ID. Then following tasks should be performed on the basis of user choice. Show record of the patient having greatest key. Show record of the patient having least key. Show record of all patients with respect to the key in ascending order. Show record of all patients with respect to the key in Descending order. Delete any record with given key. Add new record. Search any record on the basis of key and also show that after how many traversals record is found. Note: key may be NIC or Patient ID.

Vous aimerez peut-être aussi