Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Creating a Simple, Beginner-Level Vowel Counter

  1. #1
    Junior Member
    Join Date
    Jun 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Creating a Simple, Beginner-Level Vowel Counter

    Hello!

    Thank you to all that assisted me with my question last week! I appreciate it so much.

    But I hit another wall this week, and I am looking for some help,

    What I need to do is create a program that outputs the number of vowels, consonants, words, spaces, and special characters in a given sentence. I need to implement it with a function as well.

    So I was thinking I would use a void function with an argument.

    I am doing one part at a time, in this case, the vowel counter.

    Here is my calling program:

    public class JNumberOfItems
    {
        public static void main(String[] Theory)
        {
     
            JStringSource MyStringSource = new JStringSource();
     
     
            MyStringSource.Vowels("The quick brown fox jumps over the lazy dog");
     
        }
    }

    and here is my function:

    public class JStringSource
    {
        void Vowels(String SentenceOne )
        {
     
        }
     
     
    }

    Now I know what you're thinking - there's nothing there! Well that is because I am truly at a loss as to what steps I should be taking now. I want to use a loop, if or switch command, but I don't really know where to go.

    I researched this online left and right and everything I am finding has do do with the scanner class and keyboard imputs and more complicated stuff than what I am looking for.

    Thank you for your patience and your help!

    tryingtolearn


  2. #2
    Junior Member
    Join Date
    Jun 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Creating a Simple, Beginner-Level Vowel Counter

    Just an update - I figured out how to find the number of vowels, consonants, spaces, words, and special characters.

    I have one more question regarding math that I will post in a separate forum.

Similar Threads

  1. Replies: 1
    Last Post: April 18th, 2012, 01:12 PM
  2. beginner needs help with simple problem
    By ddonn in forum What's Wrong With My Code?
    Replies: 2
    Last Post: October 21st, 2011, 11:16 AM
  3. [SOLVED] Simple question from a beginner
    By jimmylee7706 in forum Java Theory & Questions
    Replies: 1
    Last Post: March 6th, 2011, 09:57 PM
  4. Quick, beginner-level Java question.
    By DHG in forum What's Wrong With My Code?
    Replies: 1
    Last Post: January 27th, 2011, 01:06 PM
  5. beginner and need simple help. please!
    By alal12 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: December 19th, 2010, 05:38 PM