Skip to main content

Posts

Showing posts with the label Data Structures

MediRAY chain of pharmacies database design & implementation with Queries

MediRAY Chain of Pharmacies The MediRAY chain of pharmacies has decided to develop a database system to store information of their prescriptions, patients, doctors and related details . They have given the development to your company and your manager has handed over the task to you. Below are the requirements Patients and doctors are persons identified by the personal identification number. The person has address, email and phone number. Patients have patient number (the hospital and the patient number used here ), and their names, addresses, and ages must be recorded. Doctors have doctors registration number. For each doctor, the name, specialty, and years of experience must be recorded. Each pharmaceutical company is identified by name, address, email and has a phone number. For each drug, the trade name and formula must be recorded. Each drug is sold by a given pharmaceutical company, and the trade name identifies a drug uniquely from among the products of that company. If...

Binary Search Tree - Playing with text file data

Program Requirements: Read a text file.  Store the words from the text file into a binary search tree.  To make the problem easier, you may assume that each line in the file contains only one word. (See extra credit below.)  Continue prompting the user for names of text files, reading from text files and adding words to the binary search tree until the user exits the program.  When the program closes, the binary search tree is discarded and when the program starts again, the tree starts in an empty state.  Upon request of the user, display the words stored in the binary search tree in alphabetical order along with the number of times each word appeared in the text file.  In addition, display the total number of words in the tree (count includes duplicates) and the total number of unique words in the tree (not including duplicates).  The words should be case insensitive. That is, "Dog" is equivalent to "doG". If both "Dog" and "doG" app...