Home Java Java-tips Data Strings Q-pr-string-if Programming - Transform Name - GUI 0

Ask Questions?

View Latest Questions

Advertisement


 
 

Programming - Transform Name - GUI 0
Posted on: July 26, 2006 at 12:00 AM
Write a GUI program to redisplay a name, possibly transformed.

Java: Programming - Transform Name - GUI 0

Write a GUI program to redisplay a name, possibly transformed.

This Java program will reformat a user's name to change a "first last" name into a "last, first" format.

The input name will consist of a first and last name separated by a blank. For example,

   Input:   Michael Maus
   Output:  Maus, Michael

The tring methods are indexOf and substring will be useful.

Extra "cancellation" credit

You can't get more than the maximum score on this problem, however if you do extra work, it can cancel out points that were taken off for other reasons.

Capitalizing the names would be good extra credit for this program. You can easily use the Java functions to change the case to something standard.

   Input:   mIcHaEl mAuS
   Output   Maus, Michael

Write answer below here and on back.

  • Show how the window appears. Draw a sketch of what you intend the window to look like. You may use any layout manager.
  • Write all source code for this program. It will be graded on whether you have structured it correctly and included all essential elements. Spelling will not be penalized.
Advertisement


DMCA.com