Employability statement:

This assignment is based on a simplified version of a real world problem. It is not uncommon to be asked to produce applications similar to this in industry, normally as a pilot study. It is not uncommon for files to differ slightly from the provided specification making error trapping important, however that isnt the case with this file.

International Trading Data

A large multinational trading company has acquired a flat data file of economic data for different countries. You have been asked to create an application that will store and structure this data to allow fast and efficient searching (and other functionality) via the country name. You are to implement a Binary Search or AVL tree, where each node corresponds to a specific country and its economic data. The application must be able to read this data from csv file documents (an example is provided on moodle) where each line in the file corresponds to a unique country. For a bare pass the builtin Dictionary collection can be used instead (though obviously much of the search functionality will be suboptimal). Your trees MUST use the recursive techniques covered in the lectures and labs as a starting point.

The first line of the file consists of the following headings:

Country,GDP growth,Inflation,Trade Balance,HDI Ranking,Main Trade Partners

Other lines consist of the data which falls under each heading, for example:

USA,1.8,2,-3.1,4,[Canada;UK;Brazil]

Note that the last field (Trade Partners) is a list of country names separated by ; and enclosed in [ ]. This field will contain an arbitrary (varying) number of countries.

You must implement an application with a GUI (may be multiple forms) which allows the user to :

  • Load a text file and store country information within the tree
  • Manually edit country information
  • Display the number of unique countries within the tree and the depth of the tree
  • Remove a country
  • Display all country names in alphabetic order.
  • a) Search for a country (display all country information)
  • b) Partial keyword search by country name, as letters are entered any countries starting with those letters are shown and can be selected from.
  • Search for and display ALL countries who trade with a particular country
  • Display the country which has the biggest potential for trade. A countrys potential for trade can be found by summing the GDP growth attributes for all its trading partners
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.