CS 635 Advanced Object-Oriented Design & Programming

Spring Semester, 2007

Assignment

Assignment Index

© 2007, All Rights Reserved, SDSU & Roger Whitney

 San Diego State University -- This page last updated 1/18/07

Assignment 0

Due January 23

1. We have a string that contains carriage returns. Carriage return is ascii 13 which is represented in C-based languages as \r. The string is to be displayed in a web page and we need the carriage returns to be honored. Th at is each carriage return must start a new line of text. In order to do this each carriage return must be converted into '<br/>'. Write code that converts all carriage returns in a string to '<br/>'. So using C-based convention, the string

    'The Cat\rin the Hat\rReturns'

becomes

    'The Cat<br/>in the Hat<br/>Returns'

2. Where in your implementation language's (Java, C++, C#, Ruby or Smalltalk) code library does the code written in problem 1 belong?

What to Turn in

Turn in hard copy of answers. On your assignment indicate if you are currently enrolled in the class or are trying to crash the class.