Results 1 to 4 of 4
  1. #1
    Jayare012 is offline Member
    Join Date
    Sep 2010
    Posts
    1
    Rep Power
    0

    Default Can someone help w/ HW Due in 57 min

    I need to do this assignment and cannot figure out how to store the stuff and still get it to type out.

    Write a class named Switcher that asks the user to enter a last name and first name, separated by a comma and space. Your program should then reverse those names. Here is a sample run of this program. (Please note that the text shown in red is not text that your program produces. Rather, it represents the text that the user types in while the program is running. So, your code will need a print statement to print all the black text below, but not the red text.)

    Enter last name, first name: Smith, John
    Result: John Smith


    If anyone could help I would be more than grateful.

  2. #2
    Zack's Avatar
    Zack is offline Senior Member
    Join Date
    Jun 2010
    Location
    Destiny Islands
    Posts
    692
    Rep Power
    5

    Default

    How far have you gotten? What have you tried?

    I understand that you're close to your deadline, but we're not here to write it for you, we're here to help you with issues you have. I might suggest next time that you don't wait until an hour left to consult help with your assignments.

  3. #3
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,335
    Blog Entries
    7
    Rep Power
    20

    Default

    Darn, it's 9:07am local time overhere and the OP posted his cry for help at 4:13am local time. I just fired up my old espresso machine and wanted to type something about regular expressions and the String.replaceAll( ... ) method. It's a one liner basically, but alas, too late ...

    kind regards,

    Jos

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Agree with the posts above. OP, we'll be more than happy to help you but please allow for more time, and please next time, show your work and ask as specific a question as possible. Do this, and you'll be almost guaranteed to get helpful posts. Best of luck.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •