1. Homepage
  2. Programming
  3. CHC5223 Data Structures and Algorithms - Assignment 1: Doubly Linked List and Hash Table

CHC5223 Data Structures and Algorithms - Assignment 1: Doubly Linked List and Hash Table

Engage in a Conversation
CDUTCHC5223Data Structures and AlgorithmsJavaDoubly Linked ListHash Table

CHC5223 Data Structures and Algorithms CourseNana.COM

20232024 Semester 2 CourseNana.COM

Assignment 1 Value 40% of Coursework Individual work CourseNana.COM

Learning outcomes CourseNana.COM

Students will be able to understand: CourseNana.COM

1.1 Data structures
1.2 The applications of data structures
1.3 Object-oriented programming concepts 1.4 Methods for program testing
CourseNana.COM

Students will have acquired skills in: CourseNana.COM

2.1 Data abstraction
2.2 The use of data structures
2.3 Programming at a more advanced level in a high-level object-oriented language 2.4 Program testing and documentation
CourseNana.COM

Students will have acquired skills in: CourseNana.COM

3.1 Self-management
3.2 Learning
3.3 Communication
3.4 Problem solving
3.5 Information technology
CourseNana.COM

Submission requirements CourseNana.COM

The assignment submitted should be compressed into a .zip file, the following files should be contained in the compressed file: CourseNana.COM

  • a report as a Microsoft Word document containing the code of all your classes. filename format: student ID+CHC5223_CW1_Report.docx CourseNana.COM

  • a .zip file containing the project: the runnable jar file (if available) and all the program’s source code (.java).
    filename format:
    student ID+CHC5223_ CW1_Files.zip CourseNana.COM

    General requirements CourseNana.COM

    All your programming must conform to “Java Conventions and Programming Guidelines” – see module Moodle site. CourseNana.COM

    You must paste the key source code of your implementation into your report, as text or as screenshots. CourseNana.COM

    Introduction
    The topics of this assignment are array, linked list, and hash table. The objective of this assignment is to develop a hash table data structure utilizing a double-linked list as the underlying mechanism. CourseNana.COM

    Requirements CourseNana.COM

    Basic rules CourseNana.COM

    You must create one executable project after completing all tasks. One Java class should be defined in one .java file respectively. CourseNana.COM

CHC5223 Data Structures and Algorithms 20232024 Semester 2 CourseNana.COM

In the report, the source code of each task, together with the corresponding explanation, should be presented separately. CourseNana.COM

Failure to comply with these rules will result in zero marks. CourseNana.COM

Task 1 CourseNana.COM

You must design and implement a doubly linked list without using any existing implementation in Java. CourseNana.COM

  • ➢  The double-linked list should be a generic data structure that can store elements of string data type. CourseNana.COM

  • ➢  You must create a Node class that represents each element in the doubled-linked list. CourseNana.COM

  • ➢  You must create a LinkedList class that represents a doubly linked list which should include CourseNana.COM

    methods for inserting, deleting, accessing specific elements, checking empty, returning size, CourseNana.COM

    and other operations you want to implement. CourseNana.COM

  • ➢  The insertion operation should be done at the front of the list. CourseNana.COM

  • ➢  The implementation should include error handling to handle errors such as deleting CourseNana.COM

    elements from an empty list and accessing out-of-bounds. CourseNana.COM

    5 marks CourseNana.COM

    You must give clear rationales and detailed explanations of your design and implementation in the report. CourseNana.COM

    5 marks CourseNana.COM

    Task 2 CourseNana.COM

    You must design and implement a hash table based on a Java array (not any array list or existing implementation from the Java library) and achieve the collision solution by using the linear probing way. CourseNana.COM

  • ➢  You must create a LinearProbingHashTable class that represents a hash table by using the linear probing way for collision resolution. The initial capacity of the array should not exceed 20. CourseNana.COM

  • ➢  You must devise a hash function that can work well for string-type data. The hash function devised should minimize the occurrence of collisions. You must not use the Java built-in hashCode method, though you can experiment with it. CourseNana.COM

  • ➢  The implementation can handle errors such as null keys or keys with unexpected formats. CourseNana.COM

  • ➢  The implementation should include methods for inserting, searching, deleting, and CourseNana.COM

    accessing key-value pairs. CourseNana.COM

  • ➢  The implementation of the inserting operation can resize the table efficiently according to CourseNana.COM

    the strategy you design if the hash table is too full. CourseNana.COM

  • ➢  The implementation of the deleting operation can handle the situation when the key is not CourseNana.COM

    found. CourseNana.COM

  • ➢  The implementation can keep track of the load factor of the hash table and display it after CourseNana.COM

    each insertion or deletion. CourseNana.COM

  • ➢  The implementation of the searching operation can search for the key and return the CourseNana.COM

    corresponding value if the key is found. CourseNana.COM

    5 marks CourseNana.COM

    You must give clear rationales and detailed explanations of your design and implementation in the report. CourseNana.COM

CHC5223 Data Structures and Algorithms 20232024 Semester 2 CourseNana.COM

You must design and implement a hash table based on the linked list and achieve the collision solution by using the separate chaining way. CourseNana.COM

  • ➢  You must create a ChainingHashTable class that represents a hash table by using the separate chaining way for collision resolution. CourseNana.COM

  • ➢  You must use the doubly linked list devised in task 1 to implement the separate chaining way. The capacity of the linked list of separate chaining should not exceed 8. CourseNana.COM

  • ➢  Youmustdeviseahashfunctionthatcanworkwellforstring-typedata.Thehashing strategy of the hash function should be designed differently from that of task 2 and should minimize the occurrence of collisions. You must not use the Java built-in hashCode method, though you can experiment with it. CourseNana.COM

  • ➢  The implementation can handle errors such as null keys or keys with unexpected formats. CourseNana.COM

  • ➢  The implementation should include methods for inserting, searching, deleting, and CourseNana.COM

    accessing key-value pairs, as well as determining load factor. CourseNana.COM

  • ➢  The implementation of the inserting operation can resize the table efficiently if the hash CourseNana.COM

    table is too full. CourseNana.COM

  • ➢  The implementation of the deleting operation can handle the situation when the key is not CourseNana.COM

    found. CourseNana.COM

  • ➢  The implementation can keep track of the load factor of the hash table and display it after CourseNana.COM

    each insertion or deletion. CourseNana.COM

  • ➢  The implementation of the searching operation can search for the key and return the CourseNana.COM

    corresponding value if the key is found. CourseNana.COM

  • ➢  The implementation of the hash table can resize the table capacity according to the CourseNana.COM

    strategy you designed. CourseNana.COM

    5 marks CourseNana.COM

    You must give clear rationales and detailed explanations of your design and implementation in the report. CourseNana.COM

    5 marks CourseNana.COM

    Task 4 CourseNana.COM

    You must implement a main program that engages objects of both the LinearProbingHashTable class and the ChainingHashTable class. CourseNana.COM

    You must design a set of test cases to evaluate the functionality and correctness of two different hash tables. CourseNana.COM

    • Set the capacity of the hash table to a small value so that collisions are easy to occur. CourseNana.COM

    • Verify that each of the hash functions is working well. CourseNana.COM

    • Verify that each of the implemented methods is working correctly. CourseNana.COM

    • Verify that the implementations of the Linear Probing way and Separate Chaining way CourseNana.COM

      for collision solutions are working effectively.
      The inner structure of the generated hash tables should be clearly illustrated as the CourseNana.COM

You must give clear rationales and detailed explanations of your design and implementation in the report. CourseNana.COM

  • ➢  Demonstrate the executed result of the program, including the generated hash table and corresponding test data. CourseNana.COM

  • ➢  Contrast and analyze the two hash tables generated based on the same set of test cases given. CourseNana.COM

  • ➢  Contrast and analyze the difference between the two hash functions you devised based on the same set of test cases given. CourseNana.COM

  • ➢  Give a rationale and detailed analysis of the effects of two different strategies of collision solution. CourseNana.COM

    6 marks total 40 marks CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
CDUT代写,CHC5223代写,Data Structures and Algorithms代写,Java代写,Doubly Linked List代写,Hash Table代写,CDUT代编,CHC5223代编,Data Structures and Algorithms代编,Java代编,Doubly Linked List代编,Hash Table代编,CDUT代考,CHC5223代考,Data Structures and Algorithms代考,Java代考,Doubly Linked List代考,Hash Table代考,CDUThelp,CHC5223help,Data Structures and Algorithmshelp,Javahelp,Doubly Linked Listhelp,Hash Tablehelp,CDUT作业代写,CHC5223作业代写,Data Structures and Algorithms作业代写,Java作业代写,Doubly Linked List作业代写,Hash Table作业代写,CDUT编程代写,CHC5223编程代写,Data Structures and Algorithms编程代写,Java编程代写,Doubly Linked List编程代写,Hash Table编程代写,CDUTprogramming help,CHC5223programming help,Data Structures and Algorithmsprogramming help,Javaprogramming help,Doubly Linked Listprogramming help,Hash Tableprogramming help,CDUTassignment help,CHC5223assignment help,Data Structures and Algorithmsassignment help,Javaassignment help,Doubly Linked Listassignment help,Hash Tableassignment help,CDUTsolution,CHC5223solution,Data Structures and Algorithmssolution,Javasolution,Doubly Linked Listsolution,Hash Tablesolution,