Find Jobs
Hire Freelancers

SIT221 Classes, Libraries and Algorithms

$10-30 AUD

Terminado
Publicado hace más de 10 años

$10-30 AUD

Pagado a la entrega
i need this within 2 days Part (a) For this task you are required to implement a reusable collection for storing key/value pairs. Storing key/value pairs is not significantly different to storing any other type of complex data such as a student record, invoice, or other examples where more than one piece of data is stored together. The only difference is that the collection is aware that a subset of the data is used to index the data, e.g., consider a dictionary where each element consists of a word (the key) with an associated definition for that word (the value); similarly a telephone directory contains elements consisting of the name of a person/business (key) and their address and telephone number (value). The class you develop must be named Directory and must implement the Microsoft.Net IDictionary interface including all inherited interfaces and the use of generics, i.e., your class must implement the following methods: • public void Add(TKey key, TValue value) • public void Add(KeyValuePair item) • public void Clear() • public bool Contains(KeyValuePair item) • public bool ContainsKey(TKey key) • public void CopyTo(KeyValuePair[] array, int arrayIndex) • public bool Remove(TKey key) • public bool Remove(KeyValuePair item) • public bool TryGetValue(TKey key, out TValue value) • public IEnumerator GetEnumerator() • [login to view URL] [login to view URL]() and the following properties: • public TValue this[TKey key] • public int Count • public bool IsReadOnly • public ICollection Keys • public ICollection Values Implement this collection according to the following requirements: • You must apply the concepts examined in the first four weeks of content of the unit; • You must implement the storage of data using only one singly linked list; and • You must throw exceptions where appropriate. Hint: For the linked list node structure, you will need to include either separate variables for the key and value data, or a KeyValuePair variable. Note: The key and value properties of this struct are read-only, so the only way you can create a new KeyValuePair object is using the new operator and providing the key and value as parameters to the constructor, e.g., KeyValuePair exampleObject; exampleObject = new KeyValuePair(keyData, valueData) Part (b) For this task you are required to write a Main method which demonstrates the following elements of using this class: • Adding data to the collection; • Deleting data from the collection; • Modifying data from the collection; • Use of the foreach loop to display the data stored in the collection; • Demonstration of an invalid operation which causes an exception and the correct handling of that exception, e.g., try to delete an item that does not exist and catch the resulting exception. Question 2 (20 marks) Prepare appropriate documentation for your new collection satisfying the following requirements: • You are required to document your collection using C# XML comments; • You are required to generate HTML documentation using the Doxygen tool; • Your documentation must include at least one example program (use your test program from Question 1); • You must document the following elements for your class and each public variable, property, and/or method of that class (you do not need to document any nested classes): o A general description of the class/variable/property/method o All parameters; o All return values; and o Exceptions. • All text in the documentation must be in your own words, you may not reuse any text from the MSDN documentation or any other source. Your final submission must include both the commented code and the documentation as generated by
ID del proyecto: 4870141

Información sobre el proyecto

2 propuestas
Proyecto remoto
Activo hace 11 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
I can do it. I have experience in C#. .
$25 AUD en 2 días
4,7 (36 comentarios)
4,9
4,9

Sobre este cliente

Bandera de AUSTRALIA
Melbourne, Australia
4,8
1
Miembro desde ago 26, 2013

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.