943,547 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 609
  • Java RSS
Aug 5th, 2009
0

Can someone give me a code for this?

Expand Post »
a JAVA program that would input a string and display the total number of vowels and total number of consonants. (use method)
Example:
Input a string: beautiful
Total Vowels: 5
Total Consonants: 4
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
loozax is offline Offline
15 posts
since Jul 2009
Aug 5th, 2009
1

Re: Can someone give me a code for this?

try for your self.
if you face problem while trying post here.
Reputation Points: 165
Solved Threads: 59
Posting Pro in Training
DangerDev is offline Offline
485 posts
since Jan 2008
Aug 5th, 2009
0

Re: Can someone give me a code for this?

Click to Expand / Collapse  Quote originally posted by loozax ...
Can someone give me a code for this? ...
Yes. I won't though. Read the terms and conditions of this site, again, please. You have read them at least once, already, right?
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Aug 5th, 2009
1

Re: Can someone give me a code for this?

java Syntax (Toggle Plain Text)
  1. System.out.println("I am not putting any effort to code my homework");
Reputation Points: 769
Solved Threads: 128
Banned
ithelp is offline Offline
1,910 posts
since May 2006
Aug 5th, 2009
-1

Re: Can someone give me a code for this?

Guys, please drop this mocking it doesn't help any of us.

@loozax you should be aware that there is a rule on this forum which says "We only give homework help to those who show effort". So presuming that you still on this task I would recommend you do some coding, post code and ask questions related to code or specific issue and not general request to do your homework
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 871
Code tags enforcer
peter_budo is offline Offline
6,653 posts
since Dec 2004
Aug 5th, 2009
0

Re: Can someone give me a code for this?

Oh, I had to do this one too!

I suggest you start by putting everything you can down in code and then when/if you get stuck the post what you have and we can help you through it. The toughest part is getting yourself started.
Reputation Points: 155
Solved Threads: 41
Posting Whiz in Training
rapture is offline Offline
294 posts
since Jul 2007
Aug 5th, 2009
1

Re: Can someone give me a code for this?

Identify what the program needs to do very specifically.
  • Prompt the user to input a String
  • Separate the String into separate characters
  • Identify the case of each letter
  • Tally up the number of each type of character
  • Ignore the characters that aren't letters
  • Display the final tally

Briefly list out ways in which you could do each component and then you'll have a much better idea of how to string everything together with code.

To start you off:
Everything you need should be on these two pages:
http://java.sun.com/j2se/1.5.0/docs/...Character.html
http://java.sun.com/j2se/1.4.2/docs/...ng/String.html

Good luck.
Reputation Points: 66
Solved Threads: 2
Newbie Poster
Godstryke is offline Offline
24 posts
since Jul 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: difference between jakarta and apache Struts
Next Thread in Java Forum Timeline: Multidimensional array in java..!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC