Question: Write a program in C++ language that implements an English Dictionary using Doubly Linked List and OOP concepts. This assignment has five parts: 1- Write





Write a program in C++ language that implements an English Dictionary using Doubly Linked List and OOP concepts. This assignment has five parts: 1- Write a class(new type) to define the Entry type that will hold the word and its definition. 2- Define the Map or Dictionary ADT using the interface in C++. 3- Implement the interface defined on point 2 using Doubly Linked List, which will operate with Entry type. Name this class NodeDictionaryG. Do not forget to create the Node (DNodeG class) for the doubly linked list. 4- Implement the EnglishDictioanry class. 5- Test it in the main function All Constructors should use the initializer list. You must submit in total a minimum of 6 files, min 5 for coding and 1 pdf file with the explanation. 1. Entry class The class should be designed in such a way that can store any type of key and any type of value. In this implementation, we will use it to store . Member variables: - K_key;//English word (key) - V_value;//word definition (value) Member functions: - Entry(K,V); - virtual Entry (); - K getK (); - VgetV(); - void setK(K); - void setV(V); Answer the questions below before implementing class Entry: Which methods should be public and which ones can be private? Should data members be public or private? 2. Define the Map or Dictionary ADT using the interface in C++, the interface should be designed to hold any type. You can find the list of operations in lesson 11 (Map ADT) and lesson 12 (Dictionary ADT) posted on the blackboard. Note: if you define Map ADT you should add the extra operations that Dictionary ADT has during the implementation of the Map interface. lesson 12. You have to make additional implementations as required for new types. NodeDictionaryG class Member variables: - int uniqueKeys; //the current number of unique keys in the Dictionary - int size // the total number of entries - DNodeG* header; // head-of-list sentinel - DNodeG* trailer; // tail-of-list sentinel Member functions: - NodeDictionaryG (); - virtual NodeDictionaryG (); - int size() const; // returns the number of nodes - int uniqueKeys() const; // returns the current number of unique keys in the Dictionary - bool empty() const; // is the list empty - IteratorG begin() const; // beginning position - IteratorG end() const; // (just beyond) last position - IteratorG
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
