"do you remember" poem

I'm trying to generate a poem entitled "do you remember" by Emmet Williams. The lines in the poem are generated by 6 columns of words which number of rows corresponds to the column number. I want the loop to stop when it reaches a certain line(string). Any suggestions on how to accomplish this?
String start = "Do you remember";
String line = "";
String endLine = "And you hated hard blue valleys,";
String word1 = "And";
String word2[] = {"I", "you"};
String word3[] = {"loved", "hated", "kissed"};
String word4[] = {"soft", "hard", "mellow", "livid"};
String word5[] = {"pink", "blue", "red", "green", "yellow"};
String word6[] = {"nights", "valleys", "potatoes", "seagulls", "dewdrops", "oysters"};
System.out.println(start);
line = "When" + " " + word2[0] + " " + word3[0] + " " + word4[0] + " " + word5[0] + " " + word6[0];
System.out.println(line);
line = "And you hated hard blue valleys,";
while(line.equalsIgnoreCase(endLine))
for(int i = 1; i <= 6; i++)
line = word1 + " " + word2[i % 2] + " " + word3[i % 3] + " " + word4[i % 4] + " " + word5[i % 5] + " " + wo$
System.out.println(line);
Message was edited by:
prem1ers

Yea requirements....so what this is a place for help is it not? As you can see I have done most of the coding myself and am looking for a little assistance not for a handout...thanks though...correct code if anyone is interested.
import java.util.*;
public class Lab10
public static void main(String[]args)
String start = "Do you remember";
String line = "";
String endLine = "And you hated hard blue valleys,";
int result = 2;
String word1 = "And";
String word2[] = {"I", "you"};
String word3[] = {"loved", "hated", "kissed"};
String word4[] = {"soft", "hard", "mellow", "livid"};
String word5[] = {"pink", "blue", "red", "green", "yellow"};
String word6[] = {"nights", "valleys", "potatoes", "seagulls", "dewdrops", "oysters"};
System.out.println(start);
line = "When" + " " + word2[0] + " " + word3[0] + " " + word4[0] + " " + word5[0] + " " + word6[0];
System.out.println(line);
int i = 1;
while(!line.equals("And I loved soft pink nights"))
if(i != 0)
line = word1 + " " + word2[i % 2] + " " + word3[i % 3] + " " + word4[i % 4] + " " + word5[i % 5] + " " + word6[i % 6];
i++;
if(!line.equals("And I loved soft pink nights"))
System.out.println(line + ",");
else
System.out.println(line + "?");
Message was edited by:
prem1ers

Similar Messages

  • HT5312 What if you have two security questions but you remember your apple ID password? It doesn't give me the option to change my security questions/answers.

    What if you have two questions but you remember your apple ID password? It doesn't give me the option to change my security questions/answers.

    You need to contact Apple. Click here, phone them, and ask for the Account Security team.
    (87140)

  • How do you remember why you created a virtual copy?

    Virtual copies are really usefull but I'm already starting to struggle to remember why I created them (is this a senior moment...)
    I look in a folder where I've created various virtual copies for different crop sizes, exposures, toning etc. The trouble is this isn't always obvous and I find myself having to look at each image it turn and working out why it's here.
    Just wondered if anyone has the same problem and have any suggestions for solving it. I'm currently thinking of using a metadata field - perhaps job title?

    In Metadata you could note something under Workflow.
    Don
    Don Ricklin, MacBook 1.83Ghz Duo 2 Core, Pentax *ist D
    http://donricklin.blogspot.com/

  • PSA: Do you remember a time before journaled file systems? (netbooks)

    I didn't either.  So when I read "You should format your SSD-based netbook with ext2 because journals write too much and SSDs have a write limit," I thought, "Seems logical.  What could go wrong?"
    Apparently I didn't remember the dark ages, when men were men and a power failure meant you lost your partition table.
    So I'm having a BLAST with my new dell mini, and reading this guide, and it says to load a hotplug module for your SD cards.  I wonder, as any computer scientist would, whether it was really hotpluggable with this driver loaded.  So I put an SD card in, formatted it with ext2, mounted it, and proceeded to remove it from the system.
    Freeze!
    Guess it's not so hotpluggable.
    Reboot.
    No root filesystem.
    Actually, it was there, but most of the files were either zeroed out or acted as if they had never been edited, i.e., blissfully newborn rc.conf, complete with defaults.
    So, use journals.  It's formatted with ext3 this time.
    Last edited by buttons (2008-12-15 04:21:11)

    FAT (or HFS) isn't journaled, everytime pre-Win2k crashed it required a full ScanDisk which took ages! ext2 is the same, although since it's a SSD that isn't that much of a problem.
    Depending on the nature of the crash a journal might not have saved you from that. Just because it has a journel doesn't mean the partition table won't be dumped.

  • Sir, Lady, Do you remember how many opened discussions do you have?

    Hi!
    Probably this is part of the moderators life, but I would like to clarify this point, in order to avoid problems
    We discussed some time ago about user blacklist and how to avoid answering to users who only open discussions and don't give any sort of feedback, so I was wondering,  if we can friendly remind this to those users when they open a new disucssion or is this against ROE?
    Cheers!
    Luis

    Hi Luis
    sorry... a bit of war and peace but covers a heap of scenarios for how I try to keep the communities I'm part of professional.
    I do that now. My approach (particularly in GRC community) is:
    they say problem solved/solved myself - I ask them to share their solution with the rest of the community
    when they say thanks and it's working now - I ask them to mark their question as complete (I don't tell them which comment to mark as correct as I'm not after points. Though, sometimes if suggest they mark a specific person if that person gave them the answer to ensure they are recognised)
    when they say urgent, job to do, blah blah - My politeness becomes a bit more terse and I lecture them to an extent on community behaviour and that they people they are relying on are helping them
    when they try to bump their thread up - reply to own post - I choose Alert Moderator and ignore them unless they do it a few times as well as opening secondary threads then I add a comment similar to their "urgent post"
    when they leave heaps of posts open then I ignore them. If they then 'bump the thread up', I add a much for detailed comment that they would receive more by contributing
    ask a basic question - if in forum a lot then I alert moderator; if a slight bit unusual I tell them what to google or where to search to go find the answer themselves and include a bit of context as to why I recommend they do that as well as finish of with 'perhaps you should book into training course xxx'.
    when they enter private details I just hit alert moderator and I do not answer their question until information removed. Most of this one is sharing email address so others will send them files/documentation. When a few start with "me too" I will add a comment of perhaps write a blog/document for entire community to benefit. I also press alert moderator so that the noise in the community of "me too" is removed.
    Most of the time I respond I don't mention RoE as much but more community spirit and behavioural. Most of those scenarios aren't explicitly listed in the RoE either.
    At the same time, I try my best to also be positive and thank people for contribution or 'good luck' to fresher who managed to solve their first problem.
    The hard thing with insults - due to cultural and language differences, some new members interpret words as insults when never intended to be. Accusation of arrogance, rudeness, etc are are written and my reaction is alert moderator.
    Regards
    Colleen

  • Do you remember Canon EOS 5D?

    10 years ago - what kind of music we were listening to, what kind of games played and watched movies, when there was a Canon EOS 5D, which became the beginning of the famous line Canon EOS 5D - Canon EOS 5D Mark II - Canon EOS 5D Mark III. Remembering camera and time 

    gj4u wrote:
    10 years ago - what kind of music we were listening to, what kind of games played and watched movies, when there was a Canon EOS 5D, which became the beginning of the famous line Canon EOS 5D - Canon EOS 5D Mark II - Canon EOS 5D Mark III. Remembering camera and time[video omitted] I attended a family wedding in Philadelphia in 2007. The event photographer was using a large Canon camera, which I took to be a 1D Mark II. Turned out it was a 5D with a battery grip. That trip included my first visit to Canon's repair shop in Jamesburg, New Jersey. About a week earlier I had bricked my wife's XTi (we each had one) by not quite following the instructions for a firmware upgrade. I didn't think there was time to ship the camera both ways before we left for Philadelphia, and my wife wanted it for the wedding. So I called Jamesburg and arranged to pick it up on our way down. The Canon service people were extremely cooperative, and the camera was waiting. They even fixed it free under warranty.

  • Do you remember the name of this program?

    On my old iBook, i remember I conducted an interview for school using a program pre-installed on my computer, but I can't remember the name of this program, and I'd like to use it again. I can't find the program in my iMac. Is this an older program that doesn't come on the OS anymore? Please help!

    I use Amadeus, it's very good, and half the price of "Sound Studio".
    G4 iMac 17" 1GHZ, G4 iBook 12" 1.33GHZ   Mac OS X (10.4.9)  

  • Cant you remember your Serial Number

    I have sent my ipod off to be repaired, but the thing is i never took down the ipod serial number.
    I am after purchasing the AppleCare Protection Plan, but now i cant enroll in it without the serial number.
    I also cant track the repair online.
    I emailed the customer support on monday, but they never got back to me (Follow-Up: 11385946).
    Is there anyway i can find out my serial number??
    Thanks brianb8802

    First of all, say "Thank You"~ (kidding..)
    Okay now, let me tell you what I just did 5mins ago... Oh I guess I need to thank you to give me inspiration as well.. I had the same problem as you, I replace my iPod once, and the new iPod serial number doesn't work with my applecare plan.
    Well so, I just go to Support Page in apple, and on the right hand side you can see "Check Your Repair Status", Click it and log in. Hopefully, you can see your old iPod serial Number with the Case Number, Dispatch Number and stuff. but of course, all you need is the iPod Serial number~
    Ha hope that helps~ Good Luck with that!

  • Why won't you remember me?

    First it crashed on me and now inside InDesign I get this...
    (I do have a subscription)
    AND everytime I "view this review online", I get...
    and sometimes in between the two stages above I see a small box that says about Acrobat not being able to load a module of some sort?
    "Keep me signed in" don't work!!

    Hi
    The error [Account Status= SUSPENDED30] is telling you that you signed up for CS Live during a trial period of the desktop product.
    To resolve this go sign up again for CS Live:
    The easiest method is go here: https://csreview.acrobat.com/csrlive_learnmore.html?state=browse
    Click on the RED "Try CS Review" button and sign up using the same email for the Adobe ID. This should get your account back in order.
    The second issue could be related to the first. However your screen shot makes me think that it could be this issue:
    Unable to open CS Review in Safari (Mac only)
    The version of Flash Player that is installed with Creative Suite 5 (10.1.52.15) may cause your CS Review Web client to freeze or become unresponsive in Safari. The most recent release version of the Flash Player is recommended for best results. Download the latest release version of the Adobe Flash Player.
    -Mike
    Principal Product Manager, CS Review

  • Do you remember Roadside Assistance option when purchasing iphone? Hustled?

    When I first got my iphone, there was all this paperwork... at one point there was a question as to whether or not I wanted to sign up for roadside assistance. A premium AAA member, there was no chance I would be interested. A couple months into my iphone ownership, I noticed on my ATT bill that i was signed up for the darn roadside assistance! costing me like 3$ a month. I immediately cancelled it. One month ago, I noticed that I was still being charged for f'in roadside assistance! Has anyone else been erroneously charged for this roadside assistance service? the charge is hidden way at the bottom of the bill? Being conspiracy theory hobbyist, I naturally suspected a widespread fraudulent charge, with some chump, cleaning up on 100's of 1000's of $3 charges each month... Anyone?
    Hmm now that I think about it, it wouldnt have to be a very widespread hustle to be making a pretty fat paycheck for some fellow... only 10,000 such "errors" and our hustler is pullin in an extra $30,000 per month. I could sure use that, how bout you?

    verbal.kint,
    It is not an option you can select during the iPhone activation process. However, if you activated a different AT&T or Cingular phone at an AT&T Store before getting the iPhone they may have signed you up for it.
    The details of the service are here:
    http://www.wireless.att.com/cell-phone-service/services/serviceDetails.jsp?skuId =sku1040055
    You can have it removed by calling AT&T. If it remains on your bill, only AT&T can remove it, and I would follow-up with AT&T.
    Hope this helps,
    Nathan C.

  • Do you remember old vector art conversion program, train logo?

    In the early 2000s I used a raster art to vector art conversaion tool.  I THOUGHT it was by Adobe, but I find no trace of it!  It had a locomotive as its logo, and I think it was named "steam" or something similar.  Required an activation key, wonderful little piece of software.  Want to find it again because I back then could quickly convert simple line drawings to vector lines without having to use much system power (unlike, say, opening up Illustrator.)
    Anyone recall this thing?

    I know that opening Photoshop might sound as powerful as Illustrator, but here is how to do basic vectorization technique in Photoshop I co-developped: http://forums.adobe.com/thread/370971?tstart=0

  • How can I buy a song but always asked the security questions and you don't remember them what should I do

    How can I buy a song but always asked the security questions and you don't remember them what should I do

    Write down your security questions.......
    Here is what you should do if you do not remember the answers to your Apple ID security questions:
    Try answering them at least once to see if you can get them right, even if you are not sure you remember the answers to your security questions.
    If you are confident you can't remember them, try one of the following:
    If you have three security questions and a rescue email addresssign in to My Apple ID and select the Password and Security tab to send an email to your rescue email address to reset your security questions and answers. 
    If you have one security question and you know your Apple ID passwordsign in to My Apple ID and select the Password and Security tab to reset your security question.
    If you have one security question, but don't remember your Apple ID passwordcontact Apple Support for assistance. Learn more about creating a temporary support PIN to help Apple confirm your identity when you contact Apple Support.
    Note: If you have forgotten your password and answer your security questions incorrectly too many times in a row, you will be unable to try to answer your security questions for a period of time. During that time you will not be able to reset your password and will not have access to your account.
    Cheers,
              Alec

  • I can't use my itunes money cause i can't remember the answer they ask me, please can you help me?

    Because i got my new iphone5S i can't use my i Tunes money cause they ask questions that i don't remember, please can you help me?

    Hello Mario,
    Congratulations on your new iPhone 5s!  Also, thank you for the details of the issue you are experiencing with your security questions.  I found an article with some useful information if you cannot remember the answers to your security questions:
    What should I do if I don't remember the answers to my Apple ID security questions?
    Try answering them at least once to see if you can get them right, even if you are not sure you remember the answers to your security questions.
    If you are confident you can't remember them, try one of the following:
    If you have three security questions and a rescue email address
    sign in to My Apple ID and select the Password and Security tab to send an email to your rescue email address to reset your security questions and answers.
    If you have one security question and you know your Apple ID passwordsign in to My Apple ID and select the Password and Security tab to reset your security question.
    If you have one security question, but don't remember your Apple ID password
    contact Apple Support for assistance. Learn more about creating a temporary support PIN to help Apple confirm your identity when you contact Apple Support.
    Note: If you have forgotten your password and answer your security questions incorrectly too many times in a row, you will be unable to try to answer your security questions for a period of time. During that time you will not be able to reset your password and will not have access to your account.
    You can find the full article here:
    Apple ID: All about Apple ID security questions
    http://support.apple.com/kb/HT5665
    If you continue to have issues, please contact our Account Security Team as outlined in this article:
    Apple ID: Contacting Apple for help with Apple ID account security
    http://support.apple.com/kb/HT5699
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Xf86-video-ati with S.Islands - do you like it?

    Hi!
    Some times ago I tried to use xf86-video-ati driver for my ATI AMD Radeon HD7870 card and it was not really comfortable due to hight card temperature even without hight video load.
    Now we have xorg-server and catalyst-utils in conflict, so I am wondering should I try open source drivers again to keep system up to date. I do not need 3d, only composite effects, video and low temperature. May be now situation is better with S.I. support.
    Is there any S.I. cards users with xf86-video-ati driver? What card do you have? Do you satisfied with composite and 2d performance with kwin and KDE? What is the temperature of your card? Right now I have 36 degrees without load according to aticonfig --odgt.
    P.S. At first I thought I can just try xf86-video-ati for myself, but because of package conflict it will be now not so easy to go back. I would like not to deal with custom repos and/or package downgrades.

    I would wait at least another month to see what gets revealed (if anything) to the macbook product line. With the WIFI drops associated with current release I cannot recommend anything until then.
    I would love to have a new macbook if it had an aluminum chassis like the Pro.
    If you remember, they used to have the little 13" aluminum G4 which was a sweet little machine.

  • How do you reset the Work Area Bar to auto adjust?

    This is something that's been a thorn in my side for a while. Maybe I'm just being OCD about it... but I've been wondering if there is a way, once you reposition the I / O points of the Work Area Bar (WAB) you can get Pr to go back to auto adjusting it to the end of your clip.
    You can double-click it to get it to expand to the full length of the sequence, if you remember to do that... Sometimes I'm in a rush, or I have 10 sequences and I miss the fact that my WAB is not all the way to the end. I select and batch drag them all to Media Encoder and *POW*... I've forgotten to stretch the Out to end on one sequence ... and I have to re-render. A pain, yes, something I should have double checked, but at 2am these things can get missed.
    So, can you get the Work Area Bar to auto adjust again?
    If yes, it's probably something ridiculously obvious – but I'll take it!
    Thanks
    Stephen

    I would have an issue with auto or a default  for a number of reasons.
    Not least this one...
    I now place dummy clip ( black video)  a  distance off the end of my sequence to prevent the End of Sequence Marker displaying at the end of my edited material.  I dont want that included in an export.
    Here is another...
    As I get to lock down and I am sending previews to clients...I insert Black Video head and tail of the edit so that the preview does not start  jarringly on first frame video.  I have I and Os marked so that I can simply  export "Program at length (without black head and tail) when I  come to master.
    and...
    Often I have edit versions (TVCs) on the same time line ( sequence) and I need to adjust WAB or I/Os to export them separately.
    Automating stuff to eliminate our dumb moments doesnt help much because it just opens the chance of another dumb moment driven by expectation and forgetfulness. .
    Mental checklist is the only way IMHO.

Maybe you are looking for