Course Home | Assignments | Class Photo | Computing Resources | Lab Hours/Tutoring | Schedule | Submit

Saint Louis University

Computer Science 150
Introduction to Object-Oriented Programming

Michael Goldwasser

Spring 2010

Dept. of Math & Computer Science

Homework Assignment 06

Functions and Exceptions

Contents:


Overview

Topic: Functions and Exceptions
Related Reading: Chapter 5.2-5.5
Due: 9:00am, Friday 26 February 2010

Please make sure you adhere to the policies on academic integrity.


Problems to be Submitted (20 points)

  1. (5 points)

    Write a function acronym(phrase) that accepts a string as a parameter, and returns a new string that includes the first letter of every word in the original phrase, all in uppercase. For example, a call to acronym('Laughing out loud') should return the string 'LOL'.

  2. (5 points)

    Exercise 5.28 of the text

  3. (5 points)

    Exercise 5.30 of the text.
    Note that the letters requiring use of the article an in front of them are 'aefhilmnorsx'

  4. (5 points)

    Exercise 5.34 of the text

    Note that the solution to the last homework contains code for related Exercise 5.23 that you may use. The point of this exercise is to have you do proper error checking of the parameters (see Chapter 5.5 for coverage of error checking and exceptions).


Extra Credit

  1. (2 points)

    Exercise 5.26 of the text


Michael Goldwasser
CSCI 150, Spring 2010
Last modified: Monday, 22 February 2010
Course Home | Assignments | Class Photo | Computing Resources | Lab Hours/Tutoring | Schedule | Submit