Highlights
The government wants to crack down on welfare cheats. They ask you to develop a program that can cross-reference welfare and tax records. Unfortunately, this data is in separate databases, with the welfare data sorted by name, and the tax data sorted by tax file number. Centrelink staff need to be able to quickly check to see the tax and welfare records of individuals.
For this part of the assignment you will implement a prototype that uses a BST to store welfare and tax data. The BST will consist of individual records where each record contains a tax file number (used as a key for the BST); the name of the individual (we will just prototype with a single name with no spaces); a list of years that the person received welfare payments; and a list of years that the person lodged a tax return. The program will start by reading the data from the separate files into the BST (populating each list in turn). The program will then prompt for a tax file number and print a message displaying the years in which that person both received welfare payments and lodged a tax return. The program will terminate if the user enters a 0 as the tax file number.
You must use the BST and linked list code developed in the tutorials, however the data structures will be modified for the new types (and functions will also require minor modifications to accommodate these changes). The following definitions MUST be used: typedef struct listNode{ int data; struct listNode *next; } *ListNodePtr; typedef struct list { ListNodePtr head; } List; typedef struct taxRecord{ long tfn; char *name; List welfare; List tax; } *TaxRecordPtr; typedef struct bstNode { TaxRecordPtr data; struct bstNode *left; struct bstNode *right; } *BSTNodePtr; typedef struct bst { BSTNodePtr root; } BST; The BST, BST Node Ptr, and Tax Record Ptr definitions, must be placed in a file called bst.h, along with the BST function prototypes. The modified BST functions must be placed in bst.c. The List and List Node Ptr definitions must be placed in list.h, along with the list function prototypes. The modified list functions must be placed in list.c. No other code should be placed in these files. All remaining code, should be placed in a file called main.c that contains the main function and program logic. Other functions may be added if required.....
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.