The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 4 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
is that okey in C#? - Criminal RecordsIn Microsoft visual studio 2010 C# (Windows Form Application):You are to implement a Binary Search or AVL tree containing the details of known criminals.
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 : Add a Criminal Display the number of Criminal Records in the system and depth of the tree Search for a Criminal by Name Remove a Criminal Edit a Criminal’s details 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 } Notes and help 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. Event documentation can be found at MSDN (google it). Criminal Offences : you can set or get (a property) for a linkedList. 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.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  :
Add a Criminal
Display the number of Criminal Records in the system and depth of the tree
Search for a Criminal by Name
Remove a Criminal
Edit a Criminal’s details
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
    }
Â
Â
Notes and help
Â
 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.
Â
Event documentation can be found at MSDN (google it).
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
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.
Â
Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â----------- -----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------. P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll