homeworkWeek3 - 2 Complete the City Population list example...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Loyola College Computer Science Dept Spring 2006 CS631: Computing Fundamentals II Homework - Abstract Data Types Due: Next class period, Feb. 8 th Assignment: 1. Page 216, number 9 and 10. I don’t need the answer to 10 to be compiled and run, but would appreciate electronic rather than handwritten answers. For these two problems I’d like you to explore the ADT formalisms in the chapter, so please: a) Use the UML pseudocode format on page 180 for the answer to 9. b) Draw a UML box for the class like on page 179, but use the internal notation from the handout on UML. c) On 10, use the comment format like on page 195 in the sphere example. d) Write an interface (see page 209) for the class in addition.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 2. Complete the City Population list example started in class. Create a class based on a logical ADT that can read from a file and store the cities and their state and population, and then compute average, max, min, and median populations. For the latter you have to sort the populations. You should have at least two classes, a CityList class and a driver or test class that puts CityList through its paces. The exact methods in your CityList class are up to you – methods to get the statistical values would be advisable at a minimum. You should be able to reuse some of the list ADT on page 211....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online