This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 15-121: Introduction to Data StructuresFall 2009Exercise08/28/2009NamesDue: Sun, Sept 68am Relevant Reading:•Chapters 1-5 of the online text by Eck. •Basics in Java notes linked from course calendar.•Readings about Java basics in other references you may have (eg. the Pohl download)•Sample Programs and API on Strings, Random, Tokens Assignment: (worth 10 exercise points) Create a class called NameModifier. This class should have at least two method:public static String lastNameFirst(String names)public static String jumble(String names)The parameter is an array of people's full names. The full names may be one name, two names, three names, or more. eg: "Madonna", or "Barack Obama", or "Hillary Rodham Clinton", or "George Herbert Walker Bush". The method lastNameFirst returns a new array of names. Each name corresponds to the name in the parameter array, in the form: last name, other names. If there is only one word in the name, then you should return just that person's name. For convenience, you do not have to deal with Jr, Sr, III or the like. should return just that person's name....
View Full Document
This document was uploaded on 12/19/2009.
- Spring '09
- Data Structures