CISS 350 CISS350 CISS/350 Programming Assignment 6 Police Department – Columbia College

Page 1

CISS 350 CISS350 CISS/350 Programming Assignment 6 Police Department – Columbia College

DOWNLOAD SOLUTION https://www.solvedcollegepapers.com/product/ciss-350-ciss350-ciss-350-col/ Programming Assignment 6 Write a program for a police department that has collected a database of information on various suspects for a given crime. (Luckily for you, the department is only investigating one crime at a time.) Each suspect has a set of attributes, such as shifty eyes, a limp, or a parrot on his shoulder. The maximum number of such attributes for any suspect is not known. Your program accepts commands to manipulate the database in order to narrow down the list of suspects, in the hope of pinpointing the villain. Category: Assignments Help Experts Tags: CISS 350 CISS350 CISS/350 Advanced Algorithms and Data Structures - Columbia College, CISS 350 Entire Course, CISS 350 Programming Assignment 2 Computer Dating Service, CISS 350 Programming Assignment 3 Local Medical Clinic, CISS 350 Programming Assignment 4 Circular Linked List, CISS 350 Programming Assignment 5 Towers of Hanoi, CISS 350 Programming Assignment 6 Police Department, CISS 350 Programming Assignment 7 Compare Two Implementations of a Priority Queue, ciss350 programming assignment 1, ciss350 week 1, CISS350c++ 

Description

Description


CISS 350 Programming Assignment 6 Police Department – Columbia College Programming Assignment 6 Write a program for a police department that has collected a database of information on various suspects for a given crime. (Luckily for you, the department is only investigating one crime at a time.) Each suspect has a set of attributes, such as shifty eyes, a limp, or a parrot on his shoulder. The maximum number of such attributes for any suspect is not known. Your program accepts commands to manipulate the database in order to narrow down the list of suspects, in the hope of pinpointing the villain. Input 1. The retained criminal information, generated by the previous execution of this program, is input from file “Criminal.mf” at the beginning of each execution of the program. 2. The user inputs commands from the keyboard, in the format shown below. Names and attributes are strings of no more than 20 characters. The program should not be case sensitive (e.g., ‘JOE’ and ‘Joe’ are the same name). To simplify the processing, you can assume that names are unique; that is, no two criminals use the same professional handle. The commands are discussed in detail in the Command Processing instructions below. Output 1. Responses to user commands are to be written to the screen, as described in the Command Processing instructions below. 2. Echo print each command and show the results of any PRINT commands in a file called “Criminal.trn”. You may determine the format of the information in this file; it should be labeled and formatted clearly. A hard copy of this file is turned in with your program for grading. 3. If any new suspects were added (see ADD command), file “Criminal.mf” must be rewritten to contain the updated collection of criminal information. Command Processing New suspects can be added to the collection of criminal information using the ADD command. An inquiry consists of a set of commands with respect to a single crime, at the end of which the crime is assumed to be solved. An inquiry must be completed within the execution of the program; it cannot be “saved” to finish on a subsequent execution. After an inquiry is complete, a new inquiry (the investigation of another crime) can begin. Each new inquiry starts over with the entire collection of suspects. [table] Command, Processing ADD, “Add a suspect to the Suspects data structure. Prompt the user for the suspect’s name and a list of attributes. ADD commands can be issued only before an inquiry begins.”


INQUIRY, “Prompt user for code name of this inquiry. Once the inquiry has begun, do not allow the user to issue the ADD command until this inquiry is complete.” TIP, “Prompt user for the tip information (a particular attribute). Process the tip, reducing the set of current suspects by deleting suspects who do not match the attribute mentioned in the tip. If there is only one suspect left in the set of active suspects, print out a message indicating that the crime is solved. Be sure to include the suspect’s name and inquiry code name. This terminates the current inquiry.” CHECK, “Prompt the user for a suspect’s name. Check the set of active suspects to see if this name is there; print out an appropriate response.” PRINT, “Print the set of active suspects (those who have not yet been eliminated).” QUIT, “If any new suspects have been added during this execution of the program, rewrite the “Criminal.mf” file. Be careful about how you go about saving the records; the traversal order affects the shape of the tree that is built on the next execution of the program. Terminate the program.” [/table] Sample Input (Some of the labels shown in the sample input are not typed in by the user, but are only printed for clarity. For this example, the “Criminal.mf” file is empty and all the potential suspects are added by command.) 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7

ADD

ADD

ADD

ADD

ADD

ADD

INQUIRY TIP CHECK

Name: Attributes:

Quickdraw McGraw has a Texas accent has a body guard is computer literate Name: Twingun Morgan Attributes: has a New York accent has red hair smokes cigars Name: Jackda Ripper Attributes: has a body guard bites his fingernails carries a knife is computer literate Name: Annie Getcher Gunn Attributes: has a New York accent has red hair eats Fritos smokes cigars Name: Slowdrawl Raul Attributes: has a Texas accent carries a knife is computer literate eats Fritos Name: Sloan de Uptake Attributes: has a body guard has red hair bites his fingernails is computer literate Code Name: Bang Bang Tip Info: has a New York accent Quickdraw McGraw


1 8 1 9 2 0 2 1 2 2 2 3 2 4 2 5 2 6 2 7 2 8 2 9 3 0 3 1 3 2 3 3 3 4 3 5 3 6 3 7 3 8 3 9 4 0

TIP CHECK TIP INQUIRY TIP CHECK CHECK TIP INQUIRY TIP PRINT CHECK TIP CHECK TIP QUIT

Tip Info: has red hair Annie Getcher Gunn Tip Info: eats Fritos Code Name: Holdup Tip Info: has a Texas accent Slowdrawl Raul Sloan de Uptake Tip Info: is computer literate Code Name: Tough Stuff Tip Info: bites his fingernails Twingun Morgan Tip Info: has a body guard Slowdrawl Raul Tip Info: is computer literate


4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 5 0 5 1 5 2 5 3 5 4 5 5 5 6 Data Structures 1. There is no upper bound to the number of suspects or number of attributes for a given suspect. You cannot use an array-based list to store the suspects or the attributes for a given suspect. 2. The CHECK operation must be very efficient, because suspects are continually being pulled off the street for questioning and we must decide whether to let them go or ruthlessly interrogate them. Using a simple linked list to store the suspects is not sufficient. You must use a binary search tree. Suspects must be actually deleted from the structure when they are eliminated by TIP information. Because you destroy the list of suspects, as suspects are eliminated by TIP information, each inquiry should work on a copy of the original tree.


3. TIP is executed much less often than CHECK and hence can be less efficient. It is acceptable if processing a TIP command requires searching the whole data structure of (active) suspects. Thus, a list of attributes can be stored with each suspect. You do not have to link all the suspects with the same attributes together. (This could potentially make for a much faster TIP operation.) You may do this if you want, but it complicates things. Deliverables      

Your design and CRC cards for any classes A listing of any test driver necessary to check classes A listing of the test plan for any class as input to the driver A listing of the source code A listing of the test plan as input to the program A listing of the output from the test run

Download Full Course Solution: CYBR-260: SECURITY SCRIPTING WITH PYTHONENTIRE COURSE HELP-CHAMPLAIN COLLEGE https://www.solvedcollegepapers.com/product/new-solutioncybr-260-security-scriptingwith-python/ CYBR-260 Assignment Week 1: Discussion – Final Project Ideas Assignment CYBR-260 Week 1: Assignment – Project Proposal Assignment

Download Full Course Solution: [Solved] ENGL-315-40A: Writing in the Workplace – Fall 2016 (2016F7A) https://www.solvedcollegepapers.com/product/solved-engl-315-40a-writing-in-theworkplace-fall-2016-2016f7a/ Week 2 Closure: Reflect on Strengths, Weaknesses, Opportunities, and Challenges Week 1 Sharing: Effective email

Download Full Course Solution: POL 255-Entire course Help: Ashford University https://www.solvedcollegepapers.com/product/pol-255-entire-course-help-ashforduniversity/ POL 255 Week 1 Assignment Theory, Arms Races, and the Prisoner’s Dilemma NEW (2 Sets) POL 255 Week 1 Discussion IR Theories Strengths and Weaknesses NEW


POL 255 Week 1 Quiz NEW POL 255 Week 2 Assignment Levels of Analysis and the Crisis in Syria NEW POL 255 Week 2 Discussion Communicating National Interests NEW POL 255 Week 2 Quiz NEW POL 255 Week 3 Assignment Moral and Ethical Dilemmas from America’s Use of Drones NEW POL 255 Week 3 Discussion The Contemporary International System NEW POL 255 Week 3 Quiz NEW POL 255 Week 4 Assignment Easter Island Full of Mystery NEW POL 255 Week 4 DQ NEW POL 255 Week 5 DQ NEW

Download Full Course Solution: IT/IT 212 IT212 IT/212/Recommendation of local area network topology https://www.solvedcollegepapers.com/product/it-212-it212-lan-topology/ Overview In Milestone One, you will: -Given the provided scenario, explain the key considerations (must-haves) and constraints of the networking project at the firm’s new location. -Then make a well-reasoned recommendation of local area network (LAN) topology. You have been asked for your input regarding the new Fayetteville, NC, office setup project. Conduct research and deliver a report to the team with key considerations and recommendations for the setup of the network infrastructure. Fayetteville office will be home to 50 employees, including the new executive vice president of sales and marketing. All possible sites have offices located in an office building with access to fiber, cable, and T1 internet service providers. The site must support live video teleconferencing calls with employees based at the other sites. It must also reliably send print jobs to billboard printers located in the company headquarters.


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.