Find Jobs
Hire Freelancers

SIT221 Classes, Libraries and Algorithms

$10-30 AUD

Completed
Posted over 10 years ago

$10-30 AUD

Paid on delivery
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
Project ID: 4870141

About the project

2 proposals
Remote project
Active 11 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
I can do it. I have experience in C#. .
$25 AUD in 2 days
4.7 (36 reviews)
4.9
4.9

About the client

Flag of AUSTRALIA
Melbourne, Australia
4.8
1
Member since Aug 26, 2013

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.