CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2012

    Java: Breaking Compound Sentences

    Sometimes people write compound sentences which have two statements in one sentence.
    For example I like you and you like me. I would like you to write a function called
    BREAK_COMP that will accept a sentence and if the the sentence is a compound sentence
    return a list containing a list for each statement. If the sentence is not a compound sentence
    return a list of the sentence within a list.

    You can assume the following:
    1. AND is the only word that can create compound sentences.
    2. Any time that AND is used it is a compound sentence.
    3. A compound sentence can only have 1 AND in it.

    If I type in (BREAK_COMP '(I like you))it will output ((I LIKE YOU))

    You cannot use any String class functions like myString.substring(x, y).

    Any help would be appreciated.

  2. #2
    Join Date
    Jan 2006

    Re: Java: Breaking Compound Sentences

    What have you tried, or at least, what is your idea and initial steps to implement it?
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.