Can someone give me a code for this?

Reply

Join Date: Jul 2009
Posts: 15
Reputation: loozax is an unknown quantity at this point 
Solved Threads: 0
loozax loozax is offline Offline
Newbie Poster

Can someone give me a code for this?

 
0
  #1
Aug 5th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 483
Reputation: DangerDev has a spectacular aura about DangerDev has a spectacular aura about 
Solved Threads: 58
DangerDev's Avatar
DangerDev DangerDev is offline Offline
Posting Pro in Training

Re: Can someone give me a code for this?

 
1
  #2
Aug 5th, 2009
try for your self.
if you face problem while trying post here.
Freedom in the Mind, Faith in the words.. Pride in our Souls...
Indian Developer
http://falaque.wordpress.com/
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,357
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 252
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: Can someone give me a code for this?

 
0
  #3
Aug 5th, 2009
Originally Posted by loozax View Post
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?
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 1,824
Reputation: ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all 
Solved Threads: 117
ithelp's Avatar
ithelp ithelp is offline Offline
Posting Virtuoso

Re: Can someone give me a code for this?

 
1
  #4
Aug 5th, 2009
  1. System.out.println("I am not putting any effort to code my homework");
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,189
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 483
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Can someone give me a code for this?

 
0
  #5
Aug 5th, 2009
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
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 276
Reputation: rapture has a spectacular aura about rapture has a spectacular aura about 
Solved Threads: 37
rapture rapture is offline Offline
Posting Whiz in Training

Re: Can someone give me a code for this?

 
0
  #6
Aug 5th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 24
Reputation: Godstryke is on a distinguished road 
Solved Threads: 2
Godstryke Godstryke is offline Offline
Newbie Poster

Re: Can someone give me a code for this?

 
1
  #7
Aug 5th, 2009
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC