1 Lab Session-12 CSIT221 Spring 2003 FINAL Lab Exercise Exercise is based on binary search tree (Demo Required)

Slides:



Advertisements
Similar presentations
NONPARAMETRIC STATISTICS IN CRIMINOLOGY An Examination of Crime Trends in New York City, Los Angeles, Chicago, Houston, and Detroit, and Their Relationships.
Advertisements

OUTLINE Why are measures of crime important? Crime Rates v. Amounts
1 Jake’s Pizza Shop Owner Jake Manager Chef Brad Carol Waitress Waiter Cook Helper Joyce Chris Max Len.
Uniform Crime Report (UCR) FBI Compiles data from the nation’s law enforcement agencies on crime for: Numbers of arrests Reports of crimes This is the.
1 Lab Session-1 CSIT221 Fall 2002 b Refresher slides b Practice Problem b Lab Exercise (Demo Required)
1 Lab Session-2 CSIT221 Spring 2003 b Intro to Object Oriented Programming b Practice Problem b Lab Exercise (Demo Required)
1 Nell Dale Chapter 9 Trees Plus Slides by Sylvia Sorkin, Community College of Baltimore County - Essex Campus C++ Plus Data Structures.
1 Lab Session-3 CSIT221 Spring 2003 b Group Worksheet 3 Exercise (Demo Required) b No new lab demo will be assigned to allow you to focus on HW#1.
1 Lab Session-5 CSIT221 Spring 2003 Default and Parameterized Constructors Destructors Programming Exercise for building a template based class (demo required)
Race, Politics, and the Law Statistics. Race, Politics, and the Law Imprisonment Sixty-four percent of prison inmates belonged to racial or ethnic minorities.
1 Lab Session-3 CSIT 121 Fall 2004 Section-3 should finish Lab-1 Exercise first Division rules Operator precedence rules Lab Exercise.
Age and Sex of Population Income Education Performance of Criminal Justice System.
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 19 Binary.
California’s Juvenile Justice System A Presentation by Ed, Laura, Jenna, Jhalisa and Jordan.
1 Lab Session-III CSIT-120 Spring 2001 Revising Previous session Data input and output While loop Exercise Limits and Bounds GOTO SLIDE 13 Lab session.
1 Lab Session-12 CSIT221 Fall 2002 Lab Exercise Based on binary search tree (Demo Required)
Bureau of Justice Statistics. Conducting Victimization and Community Safety Surveys: Using Web-based Technology U.N. Meeting on Crime Statistics Geneva.
1 C++ Plus Data Structures Nell Dale Chapter 7 Programming with Recursion Modified from the slides by Sylvia Sorkin, Community College of Baltimore County.
WHY THE DROP IN CRIME? Executive Issues Seminar Series 1997 Law Enforcement Management Institute of Texas Sam Houston State University.
The Crime Picture Chapter 2 Frank Schmalleger Criminal Justice Today 13 th Edition.
Chapter 1: Crime in California Georgia Spiropoulos Copyright © 2014 Carolina Academic Press. All rights reserved.
Binary Search Trees. What is a binary tree? Property 1: each node can have up to two successor nodes.
1 Lab Session-III CSIT-120 Fall 2000 Revising Previous session Data input and output While loop Exercise Limits and Bounds Session III-B (starts on slide.
1 CSC 222: Computer Programming II Spring 2004 Searching and efficiency  sequential search  big-Oh, rate-of-growth  binary search Class design  templated.
Recursion Bryce Boe 2013/11/18 CS24, Fall Outline Wednesday Recap Lab 7 Iterative Solution Recursion Binary Tree Traversals Lab 7 Recursive Solution.
Java: Chapter 1 Computer Systems Computer Programming II.
Sociology: Your Compass for a New World Robert J. Brym and John Lie Wadsworth Group/Thomson Learning © 2003.
MOUs and MOAs: A Cooperative Approach to Law Enforcement on the Reservation 17 th Annual Multi-Jurisdictional Conference November 3, 2005 Paul Stenzel.
INTRODUCTION TO BINARY TREES P SORTING  Review of Linear Search: –again, begin with first element and search through list until finding element,
Copyright  Hannu Laine C++-programming Part 3 Hannu Laine.
BINARY SEARCH TREE. Binary Trees A binary tree is a tree in which no node can have more than two children. In this case we can keep direct links to the.
Juvenile Offenders and Victims: 2006 National Report Juvenile Offenders and Victims: 2006 National Report Graphs from Chapter 2: Juvenile Victims Copyright.
Measuring Crime Mr. Romero University of California, Los Angeles.
Copyright © 2012 Carolina Academic Press Chapter 1: Crime in California Georgia Spiropoulos.
Source: John Jay College calculations of national arrest estimates using data from Crime in the United States, 1980 through Washington, DC: Federal.
Chapter Two Measurement of Crime and Its Effects.
1 Nell Dale Chapter 8 Binary Search Trees Modified from the slides by Sylvia Sorkin, Community College of Baltimore County - Essex Campus C++ Plus Data.
AVL Trees 1. 2 Outline Background Define balance Maintaining balance within a tree –AVL trees –Difference of heights –Rotations to maintain balance.
Aim: How much crime is there in the United States?
Muskie School of Public Service 2008 Maine Crime and Justice Data Book March, 2009.
“People’s fear of crime doesn’t come from looking over their shoulders. It comes from looking at their television screens.” Robert Lichter, director of.
Juvenile Justice System.  Organized structurally on a state and local level  Private and individual agencies  58 county probation offices in 62 different.
Number of Offenses NationalMaricopa County Violent Crimes Property Crimes -0.2% -4.3% -3.8% -5.5% Violent crimes: murder, rape, robbery, aggravated assault.
Searching CSE 103 Lecture 20 Wednesday, October 16, 2002 prepared by Doug Hogan.
Chapter Two CRIME AWARENESS Uniform Crime Reporting System (UCRS) The FBI’s Uniform Crime Reporting System began in U.S. Attorney General authorized.
Greene County JCPC Gang Identification and Prevention Department of Juvenile Justice and Delinquency Prevention-Center for the Prevention of School Violence.
1 Nell Dale Chapter 8 Binary Search Trees Slides by Sylvia Sorkin, Community College of Baltimore County - Essex Campus C++ Plus Data Structures.
Text2PTO: Modernizing Patent Application Filing A Proposal for Submitting Text Applications to the USPTO.
August 2 nd,  Increases in violent crime:  Shooting victims up 15% from last year (109) ▪ 14 more shooting victims than last year ▪ 38% above.
PREVENTING VIOLENT STREET CRIME IN STOCKTON, CALIFORNIA A Report to the Stockton Police Department By Anthony A. Braga, Ph.D. Harvard University July 7,
Chief Constables Performance Report February 2016 OFFICIAL| FOIA - OPEN.
Hillsborough County Violence Prevention Collaborative Leadership Council Organizational Meeting June 11, 2013.
Chief Constables Performance Report December 2015 OFFICIAL| FOIA - OPEN.
Chapter 3 Juvenile Crime, Criminals, and Victims Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved.
Sub-national Estimates in the NCVS
Definition and Application of Binary Trees
The Nature and Extent of Crime
Livingston Police Department Department Update
There are four times more knife-related killings as firearms-related killings. More than 70 youngsters died at the hands of gangs in Britain in 2008.
Binary Search Trees.
Map interface Empty() - return true if the map is empty; else return false Size() - return the number of elements in the map Find(key) - if there is an.
Mayor’s Office of Public Safety The Impact of Illegal Guns on Violence in Chicago Janey September 20, 2014.
National Immigration Cross-Curricular Activities
How is Crime Measured Uniform Crime Report (UCR)
Pointers & Dynamic Data Structures
Comparisons between Eurostat and UNODC results
CSI 1340 Introduction to Computer Science II
Toledo City Council District Analysis
Crime After Cannabis Legalization in Washington State
OUTLINE Why are measures of crime important? Crime Rates v. Amounts
Presentation transcript:

1 Lab Session-12 CSIT221 Spring 2003 FINAL Lab Exercise Exercise is based on binary search tree (Demo Required)

2 Lab Exercise (Demo Due May 6 th Sec 01 and May 8 th Sec 02) You will develop a spell checker using BST’s. Build a dictionary BST for storing correctly spelled words. Change the info to string and include. You should use the member function definitions as given on the next slide so that you can focus on the spell- checker problem. Some member functions are blank as they are not needed in the spell- checker.

3 Class Header File //TreeNode definition goes here class TreeType { public: TreeType ( ) {root = NULL; } // constructor ~TreeType () {cout<<"destroy it"<<endl; } // dummy destructor bool IsEmpty ( ) const {return (root == NULL) ;} bool IsFull ( ) const {//try acquiring memory and return true if NULL was returned} int NumberOfNodes ( ) const { /*blank*/} //dummy function void InsertItem (string item) {//Use the function that you developed in worksheet 11} void RetrieveItem (string& item, bool& found) {//Use the function that was developed in class) private: TreeNode* root; };

4 Lab Exercise Description Use the sample text given on slide 6 for demo. Save it as a text file. Introduce at least 7 spelling errors in the words of the original file and save the modified text with a different name Open the original file and read and store all the different words from this file to your BST

5 Lab Exercise Run your spell checker on the modified file Your spell checker must capture the misspelled words and display them on the screen Can you give the user a hint to possible correct spelling of the misspelled words?

6 Sample Text File LOS ANGELES, California (AP) -- The murder rate rose nearly 11 percent last year in California's largest cities and counties, an increase officials say may be attributable to gang violence and a waning economy. The largest cities and counties reported 1,842 killings from January through December more than in 2001, according to preliminary figures from the state attorney general's office. "We must never forget the pain that each of these killings causes for families and communities," Attorney General Bill Lockyer said Sunday in a statement. Overall, the number of reported major crimes in the state increased 3.8 percent. Murder, rape, robbery, burglary and vehicle theft figures all rose while aggravated assaults dropped 2.3 percent. The figures were for 78 areas with populations of 100,000 or more -- which together account for about 65 percent of the state's crime. The numbers were not adjusted for increases in population. A final report on statewide crime based on reports from more than 600 law enforcement agencies will be released this fall. Many major U.S. cities saw a drop in murders during the 1990s. In California, the rate of reported homicides decreased by 30 percent from 1996 to But in the past few years, the trend started to reverse itself as the economy dipped. After experiencing the largest ever one-year drop in California history of 14.9 percent in 1999, the state's major crime rate increased by 1 percent in 2000 and 3.7 percent in A few California cities improved last year. San Diego's 47 reported homicides represented a decrease of 6 percent. But Oakland had 108 killings, a 28.6-percent jump. Across the bay, San Francisco's figure was unchanged at 62 homicides. In Los Angeles, the most populous city, crime was up 1.8 percent overall and there were 653 homicides, a jump of 11.1 percent. Many recent killings in Los Angeles have been linked to gang violence. Police Chief William J. Bratton, a former New York police commissioner, has said he would make fighting gangs a priority. "Every day our kids are going to school, stepping over dead bodies," said LaWanda Hawkins, 47, of the San Pedro port area of Los Angeles. Her nonprofit group, Justice for Murdered Children, seeks to reduce the number of killings. Hawkins argued that there is a "culture of violence" in some poor areas of the city, in part because overworked police have failed to solve killings. While nowhere near the totals of the 1980s and early 1990s, Los Angeles' number was far higher than New York, which has more than twice the population. The number of homicides in New York City dropped to 580 for the year 2002, the lowest figure in 39 years. Chicago, the country's third-largest city, recorded about 645 homicides for 2002.