Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 java programming help!
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
miriamyeungovrsea




PostPosted: Wed Dec 12, 2012 6:49 pm   Post subject: java programming help!

May you guys help me with this problem. Can you guys use not a very complex style of writing this program? Thanks.

Build a RemoveString class that prompts the user for a sentence and a word to remove.

(a) Write a method, removeString( sentence, word), that removes the first occurrence of the given string from
the sentence.

(b) Write a method, removeAll( sentence, word), that removes all occurrences of word from the sentence. This
method should call the method you developed in part (a) repeatedly until all occurrences of word are removed.
Sponsor
Sponsor
Sponsor
sponsor
DemonWasp




PostPosted: Wed Dec 12, 2012 7:24 pm   Post subject: RE:java programming help!

This sounds like a homework question. What have you tried doing to solve this problem?

If you run into trouble, we can help you, but we can't answer homework problems for you.
miriamyeungovrsea




PostPosted: Wed Dec 12, 2012 7:25 pm   Post subject: RE:java programming help!

im a beginner, so i don't even know how to do this.
Insectoid




PostPosted: Wed Dec 12, 2012 7:58 pm   Post subject: RE:java programming help!

(a) You're probably going to need to use a string tokenizer. Sound familiar? I'd bet your teacher explained it in class.

(b) should be trivial once you've finished (a).
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: