In this problem, we will create a new data type. Each data point consists of a "key" and "data". Examples of data points
Posted: Thu May 05, 2022 1:12 pm
In this problem, we will create a new data type. Each data point consists of a "key" and "data". Examples of data points might be name: Alice phone: 215-204-9999 If both of these data points are stored in a data structure, then we could have a function that works like this: data__structure ==>get_data("name") returns Alice Our data structure will also allow us to implement nested data. For example: name: {{first: Alice}, {last: Smith} } address: {{street: 123 Main St.}, {city: Anytown}, {state: PA} } In this example, we would be able to access data using something like: data structure -->get_data ("address") ==> get..data("state") returns PA Design a C++ data structure to handle this data type. You don't have to write any code if you don't want to. However, you should be as specific as possible about the variable types and class or classes you use. For each class you propose, describe both the variables and the functions (methods) that it contains. Diagrams are not required but may be helpful. Be sure to describe how the get-data function works with your data structure.