CS 1102 Homework 1

How to Design Programs: An Introduction to Programming and Computing

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 1102 (A07) Homework 1: Warming Up in Scheme Due: August 30 (Thursday) at 11:59pm via turnin (assignment name hwk1 ). Assignment Goals • To make sure you can write programs using conditionals, structures, and nested structures. • To help you practice the design, testing, and documentation standards for the course. Remember to follow the Expectations on Homework when preparing your solutions, including the academic honesty policy . The Assignment Programming Exercises: Managing file diffs Many modern software applications--such as word processors and version control systems-- manage multiple versions of files and documents. Rather than store the entire file on each revision, these systems store patches or diffs from which they can reconstruct the current version of the document as needed. In this assignment, you'll implement a basic notion of document patches. Represent documents as strings. You can get documentation on Scheme's string operators by searching for string in DrScheme's Help Desk. A patch consists of a position (into a document or string) and an operation to perform at that position. The insert operation specifies the string to insert (at the position). The delete operation specifies how many characters should be deleted (starting from the position). 1. Write data definitions and examples of data for patches and operations. 2. Write a function apply-op that consumes an operation (one of your structs), a string, and a position (number) and produces a string. The produced string should be the result of a position (number) and produces a string....
View Full Document

This homework help was uploaded on 02/06/2008 for the course CS 1102 taught by Professor Fisler during the Spring '07 term at WPI.

Page1 / 3

CS 1102 Homework 1 - CS 1102(A07 Homework 1 Warming Up in...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online