UW CSE 341 - Homework Assignment (3 pages)

Previewing page 1 of 3 page document View the full content.
View Full Document

Homework Assignment



Previewing page 1 of actual document.

View the full content.
View Full Document
View Full Document

Homework Assignment

85 views

Problems/Exams


Pages:
3
School:
University of Washington
Course:
Cse 341 - Programming Langs
Programming Langs Documents

Unformatted text preview:

CSE 341 Winter 2008 Assignment 7 Due 14 March 8 00AM Last updated March 5 2008 Overview We provide a skeleton 270 lines of code for drawing Facebook style friend wheels You will need to read understand and extend this code 130 more lines to complete its functionality Some notes A contact list is represented as an array of Contacts Friendship is not symmetric if Contact a is friends with b that doesn t imply b is friends with a Drawing friend wheels requires generating social networks done by subclasses of ContactsGenerator laying out each person on screen done by subclasses of ContactLayoutManager and coloring each person done by subclasses of ContactColorManager You will need to complete the skeletons we ve provided and implement additional subclasses of each of these three classes We ve provided two debugging routines to aid printing the social networks you create debugPrintContactNames takes a contact list and prints the name of each person followed by the names of their friends If a person has secret admirers those names are printed in parentheses namesOnly takes an array of Contacts or arrays of Contacts or arrays of and produces a new array of just the names of the contacts with the same nesting structure as the original array The RGB class provides three mechanisms to create colors from str takes a named color from rgb takes a red green blue triple each component is between 0 and 1 and from hue takes a hue from 0 to 1 and returns a color from purple to red The skeleton code we provide you supports five key bindings Press l to change the layout manager of the current contacts without changing colors Press c to change the color manager of the current contacts without changing layouts Press n to change to another contact list using the same color and layout managers Press p to take a screenshot of your program It will create a PostScript file of the name hlayoutmanager i hcolormanager i hgenerator i ps in your current directory Press q to quit 1 Naming contacts



View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view Homework Assignment and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Homework Assignment and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?