Page 1 of 1

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
by answerhappygod
In This Problem We Will Create A New Data Type Each Data Point Consists Of A Key And Data Examples Of Data Points 1
In This Problem We Will Create A New Data Type Each Data Point Consists Of A Key And Data Examples Of Data Points 1 (38.31 KiB) Viewed 45 times
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.