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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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