Next design a class street that contains a number of


Design a class House that defines a house on a street. A house has a house number and an (x, y) location, where x and y are numbers between -10 and 10. The key member function is plot, which plots the house.

Next, design a class Street that contains a number of equally spaced houses. An object of type Street stores the first house, the last house (which can be anywhere on the screen), and the number of houses on the street. The Street::plot function needs to make the intermediate house objects on the fly, because you don't yet know how to store an arbitrary number of objects.

Use these classes in a graphics program in which the user clicks with the mouse on the locations of the first and last house, then enters the house numbers of the first and last house, and the number of houses on the street. Then the entire street is plotted.

Solution Preview :

Prepared by a verified Expert
Computer Graphics: Next design a class street that contains a number of
Reference No:- TGS01655003

Now Priced at $40 (50% Discount)

Recommended (91%)

Rated (4.3/5)