Implement a binary search or avl tree

Assignment Help Basic Computer Science
Reference no: EM13308684

Criminal Records

In Microsoft visual studio 2010 C# (Windows Form Application):

You are to implement a Binary Search or AVL tree containing the details of known criminals.  The criminal object must minimally contain the following information

  • Name
  • Age
  • Height
  • List of Offences (use the built in LinkedList<> collection)
  • Address

Store the objects in the tree using the name as the key for comparison.

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

1.       Add a Criminal

2.       Display the number of Criminal Records in the system and depth of the tree

3.       Search for a Criminal by Name

4.       Remove a Criminal

5.       Edit a Criminal's details

6.       Search for  Criminals by a particular offence - should display all criminals committing that offence

The last two can be coded using the IComparable interface and implementing CompareTo as below (requires completing).  Alternatively you could use a non generic Tree though this will restrict the marks available.

      public int CompareTo(object obj)

        {

            if (obj is Criminal) //compare by name

            {

                Criminal other = (Criminal)obj;

                return name.CompareTo(other.name);

            }

            if (obj is string) //compare against list of crimes

            {

 

            }

            else

                return -999;  //indicates can't make a comparison

        }

You can add events to controls in design time by selecting the control and clicking on the lightening strike in the properties box. Then select the event you want to add.

1547_Criminal Records.png

 

Event documentation can be found at MSDN (google it).

222_Criminal Record 1.png

Criminal Offences : you can set or get (a property) for a linkedList<string>. This list can be populated with the crimes using the .AddFirst(string) method and displayed on a form using get and iterating through the list contents (foreach) and adding to a ListBox for example.

Reference no: EM13308684

Questions Cloud

Calculate the incidence rate of copd amongst firemen : A population of 160 healthy firemen was followed for development of COPD. After being followed for 5 years 15 developed COPD. Twenty firemen were followed for 2 years and they left for other jobs. The remaining who never developed COPD were followed ..
Why deployment of ipv6 has been slow to date : Discuss some of the problems NATs create for IPsec security. (See [Phifer 2000]). Can we solve these problems by using IPv6? Why deployment of IPv6 has been slow to date. What is needed to accelerate its deployment?
Find the equivalent capacitance of the combination : Two capacitors, C1 = 6.00 µF and C2 = 11.0 µF, are connected in parallel, and the resulting combination is connected to a 9.00-V battery. Find the potential difference across each capacitor. Find the equivalent capacitance of the combination.
What are the risks of toxicity : What are the risks of toxicity. Is the vitamin a water or fat soluble. How does vitamin solubility affect absorption, transport, and storage. How can the dietary reference intake be used to provide guidance when it comes to avoiding toxicities.
Implement a binary search or avl tree : You are to implement a Binary Search or AVL tree containing the details of known criminals.  The criminal object must minimally contain the following information.
What is a common deficiency disorder of these nutrients : What is a common deficiency disorder of these nutrients? What diet and/or lifestyle factors contribute to risk of deficiency? What diet recommendations could you make to a patient with this deficiency disorder?
Some barriers which individuals face : What do you think are some barriers which individuals face, and an organization face when trying to over come that hurtle when it comes to shared vision?
Evaluate the usefulness of secondary data : Which of the following is NOT used to evaluate the usefulness of secondary data?
Recombination event : Which best describes the “Recombination Event” in the early history of the universe?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  How itdepartment helps organization achieve strategic goels

Discuss how the IT department helps the organization achieve their strategic goals

  Effective method to find attack on computer network

Find the most effective method to find out if attack has been made on computer network?

  Application development and programming languages

Compare and contrast object-oriented languages (Java, C++, C#, etc.) to imperative languages (C, Pascal, etc.) in terms of: Programmability, Maintainability, Performance, Development tools

  Verify that all required fields are complete

Use alerts to inform the user if information is missing and focus on the missing field for them to provide the needed data.

  Role of integrating business management cpabilities

How you see you role in integrating software, hardware, and business management cpabilities? What challenges do you anticipate encounting as head of of the IT management effort at Magnum?

  Describe steps improving or maintaining relations with other

Describe the steps necessary for improving and maintaining relations with other business units

  Create an applet to draw a digit using the method fillrect

Create an applet to draw a digit using the method fillRect of the class Graphics. For instance, if the input is 4, the applet will display the digit 4. In java language please

  How system access big date to maximum in usage?

How system access big date to maximium in usage?

  Define or describe the database

1. Mention a database that you think is important or stood out to you. 2. Define or describe the database. 3. Discuss why the database is important or stood out to you. Cite personal experience with the topic if appropriate.

  Write quickest and easiest way to recover data

What is the quickest and easiest way to solve most urgent problem, recovering data? Write the major steps in that process.

  Demonstrate at least two arithmetic features

Demonstrate at least two arithmetic features and Auto text features of WORD.

  Write a program that will define the f string manipulation

1.) Write a program that will define the following string manipulation functions. Each is analogous to thecorresponding C++ string function.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd