Docsity

CS 101 Homework II: Modifying an Existing Program with Two Buildings - Prof. James Cohoon, Assignments of Computer Science

Toggle sidebar
bg1
CS 101 Unpledged
CS 101 Page 1 of 2 Fall 1996
Homework II
Assigned in Laboratory II
Due Start of Laboratory III
Please perform the following activities. This assignment is unpledged. You may work with one
other person. You are allowed to talk with others, but your work must be your own.
Objective
The objective of this assignment is to practice modifying an existing. Professional programmers
often modify code written by another programmer. In addition, this assignment introduces you to
using the EzWindows API.
Problem
Modify program 3.4 (the lawn mowing example) so that it handles lawns that have two buildings.
Assume the second building is an attached garage. The garage is always attached to the right side
of the house. The console window created by your program should look like the following.
pf2

Partial preview of the text

Download CS 101 Homework II: Modifying an Existing Program with Two Buildings - Prof. James Cohoon and more Assignments Computer Science in PDF only on Docsity!

CS 101 Unpledged

CS 101 Page 1 of 2 Fall 1996

Homework II

Assigned in Laboratory II

Due Start of Laboratory III

Please perform the following activities. This assignment is unpledged. You may work with one other person. You are allowed to talk with others, but your work must be your own.

Objective

The objective of this assignment is to practice modifying an existing. Professional programmers often modify code written by another programmer. In addition, this assignment introduces you to using the EzWindows API.

Problem

Modify program 3.4 (the lawn mowing example) so that it handles lawns that have two buildings. Assume the second building is an attached garage. The garage is always attached to the right side of the house. The console window created by your program should look like the following.

CS 101 Unpledged

CS 101 Page 2 of 2 Fall 1996

The graphics display window should look like the following.

Notice how the garage (in red) abuts the house on the right side.

Use the code that was provided for you in laboratory II. Do not use the code found on the disk in your book. This code contains several subtle errors.

Notes

You should submit your program electronically before laboratory III. See your handout for how to do this.

You should also turn in a hardcopy (print out) at the beginning of your laboratory when the pro- gram is due. This assignment is due at the beginning of laboratory III.

See the 101 Web page for the grading criteria for this assignment. The URL is:

http://www.cs.virginia.edu/cs101/