pls someone help me


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: pls someone help me

Hybrid View

  1. #1
    Join Date
    Jul 2006
    Posts
    4

    pls someone help me

    [FONT=Arial][COLOR=Black]
    please try this program in java...
    the problem is:
    write a program that plays word game with the user. the program would ask the user to input the following:
    1.what is your name?
    2.what is your age?
    3.where do lived?
    4.what is your school name?
    5. what is your proffesion?
    6. what type of animal?
    7. what is your pets name?

    after the user have enter this items, the program should display the following story, inserting the user's inputs into the approriate location:

    "There once was a person <name> who lived in <location>. At the age of <age>,<name>, went to <school>. <Name> graduated and went to work as a <proffession>. Then <Name> adopted a <animal> name <petsName>. They both lived hapilly ever after".



    try to write this in java: its fun (^_^)..... thank you!

  2. #2
    Join Date
    Sep 2006
    Posts
    7
    Quote Originally Posted by javacc
    [FONT=Arial][COLOR=Black]
    please try this program in java...
    the problem is:
    write a program that plays word game with the user. the program would ask the user to input the following:
    1.what is your name?
    2.what is your age?
    3.where do lived?
    4.what is your school name?
    5. what is your proffesion?
    6. what type of animal?
    7. what is your pets name?

    after the user have enter this items, the program should display the following story, inserting the user's inputs into the approriate location:

    "There once was a person <name> who lived in <location>. At the age of <age>,<name>, went to <school>. <Name> graduated and went to work as a <proffession>. Then <Name> adopted a <animal> name <petsName>. They both lived hapilly ever after".



    try to write this in java: its fun (^_^)..... thank you!
    funny u

  3. #3
    Join Date
    Mar 2004
    Posts
    635
    Have you tried the problem yourself yet? You even read the 1st chapter in your book yet?

    Get user input 7 times and assign it to 7 variables. Then output a string (the story) substituting in the variables like so:

    String name = user input
    String location = user input
    String story = "There once was a person "+name+" who lived in "+location+". At the";

  4. #4
    Join Date
    Sep 2006
    Posts
    4
    There is a java tutorial online gives a similar program example. Go have a look here http://scad.co.nr

  5. #5
    Join Date
    Oct 2004
    Posts
    311
    Funny how people keep posting their homework here...

  6. #6
    Join Date
    Sep 2006
    Posts
    2
    Quote Originally Posted by ractoc
    Funny how people keep posting their homework here...
    Well... somehow some homework did not have the example in the book the recommend by the lecturer... but this question.... i think all book mention about it...

Similar Threads

  1. CPoint class [was: pls help]
    By simplyvenky10 in forum C++
    Replies: 9
    Last Post: 07-27-2006, 10:08 AM
  2. Replies: 0
    Last Post: 07-18-2006, 08:51 AM
  3. Error while encrypting the xml file...pls help
    By sachinkataria in forum Java
    Replies: 3
    Last Post: 07-15-2006, 02:19 AM
  4. Replies: 0
    Last Post: 01-10-2002, 01:43 AM
  5. thread problem....pls help
    By Satish in forum Java
    Replies: 0
    Last Post: 11-29-2001, 09:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center