Login

Title

Searching and Replacing Text in a Large File

Course

Data Structures

Abstract

The assignment has two phases. In the first phase, students work in teams, each team doing a design document and a presentation. In the second each individual student implements one of the designs. Students use existing data structures in the Java API to solve the problem of doing global search/replace operations on a given input file.

Students are expected to be familiar with file I/O, complexity (big-oh), and the efficiency of operations in selected Java API's

Author

Matt Stallmann

Genre

Design document,
Oral presentation of design,
Interpreting oral presentation,
Peer evaluation,
Navigating an API,
Creating a test plan

Assignment Duration

Two Weeks

Communication Skill

Reading, writing, speaking, teaming

Technical Skill

Design creation/specification,
Research,
Linear data structures,
Program design,
Selection of algorithms and data structures,
Trees/heaps,
Testing,
Team formation and evaluation

Workplace Scenario

This assignment explores an approach to searching and replacing data in a text file motivated by the following situation. Suppose that the only strings you are allowed to replace are words, contiguous strings with no embedded spaces or punctuation.

A situation like this might occur if you want to rename variables in a program. The other feature of this situation is that the file on which search and replace is to be done could be huge while the number of distinct words is small. And a large number of search and replace operations will be done as a single batch. Imagine a long list of updates to a large piece of software.

The team design and presentation aspect of this assignment is typical in the project planning phase of software development. A requirements engineer might propose a new feature (in this case word search/replace). The developers and testers need to communicate about designs that will incorporate the new feature. A test plan is a critical aspect of the communication between a requirements engineer and the designer. It ensures that each understands the expected behavior of the software under a variety of circumstances.

Team Size

4-6

Additional Information

The three files are:

project2.html - the actual assignment

team-eval.doc - form used for peer evaluation of team members

survey_analysis.xlsx - results of an attitude survey

Collection

Citation

Matt Stallmann, “Searching and Replacing Text in a Large File,” Incorporating Communication Outcomes into the Computer Science Curriculum, accessed September 25, 2017, http://cs-comm.lib.muohio.edu/items/show/26.

License

Creative Commons License

File: team-eval.doc

Comments

Allowed tags: <p>, <a>, <em>, <strong>, <ul>, <ol>, <li>