程序代写代做代考 If you choose to solve project 10, then please label all files as q10.cpp, q10.h, q10_drivers.cpp, q10_readme.txt etc.

If you choose to solve project 10, then please label all files as q10.cpp, q10.h, q10_drivers.cpp, q10_readme.txt etc.

6. A certain secret spy agency is gathering information. The information is divided into several broad categories, (M)ilitary, (U)S Civilian, and (C)orporate. There are events in each category, for this exercise they are just described by the following comma delimited string: “category, Event_Id, Priority, abstract” For example:
“U,E101, 2, a diabetic native American was seen waving feathers at the white house”
Or
“M,E302, 9, POTUS has lost his ducky”

Create a data file that contains 10 such events sorts them into a vector of priority queues with the highest priority being first. Display the contents of this structure to the screen.

7. Create a binary tree structure that is populated by nodes that consist of a random integer and a frequency. The key is the integer value, the frequency is an integer that shows how many times that value has been generated. Allow the user to generate N random nodes, with N entered from the keyboard. Display the contents in a depth first manner to the screen. Then load those nodes into a pqueue based not on the value, but on the frequency. The nodes should be displayed as (value, frequency) pairs. Empty the queue and display them according to the priority criteria.

11. Cell phone data is accumulated through COP, the civilian observation program, 24-7. The government forces all cell communications to be forwarded through communication hubs in Central America so no warrant is required. (If you send me a text message, the request is forwarded through those sites so they can listen in without committing a felony.) Create a simulation that consists of 1) a list of communication nodes that are sender/receivers (These are our cell phones). Randomly choose a number of nodes and mark them with a bool AGENT as true, all others are false. THEN randomly choose source and destination nodes from that list, display that pair, and if at least one of the two nodes is AGENT=true, add that data pair to a multimap of those ids. This is the NSA listening to us. If there are 500 nodes in the initial list, Display how many data pairs must be generated until ALL nodes with the bool AGENT=true is mapped? (Who talks to them is not important, only that they are contacted). Then Display all the communications to the AGENT nodes, who they are to and who they are from. All other communications can be ignored.