wood burning stoves 2.0*
The moose likes Cattle Drive and the fly likes 1.1 - blank lines Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "1.1 - blank lines" Watch "1.1 - blank lines" New topic
Author

1.1 - blank lines

ryan burgdorfer
Ranch Hand

Joined: Jan 24, 2001
Posts: 219
Are blank lines permitted in the output of assignment 1.1?
Originally, I had a line of code to prevent them from occurring, but my first round of feedback from the nitpicker included the comment "That's a lot of math for being inside a loop. Any room for optimization?", referring to that line of code. Rather than moving the code outside any loops (which I probably should have done), I decided to just ditch it. But now I am wondering if it is required to take care of the blank line situation, or not?
~Ryan

<UL TYPE=SQUARE><I><LI>Ryan Burgdorfer<BR><LI>Java Acolyte</I></UL>
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9047
    
  10
A blank line before the first line of names or after the last line of names is not a problem. You are not allowed to have blank lines between the rows of names:
<pre>
(blank line here ok)
Gertrude Gertrude Gertrude
(no blank line here)
Gertrude Gertrude Gertrude
(no blank line here)
Gertrude Gertrude Gertrude
(blank line here ok)
</pre>

[This message has been edited by Marilyn deQueiroz (edited January 29, 2001).]


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
ryan burgdorfer
Ranch Hand

Joined: Jan 24, 2001
Posts: 219
OK, got it.
I guess I'll just wait for my next reply from you to implement the change, unless you want me to just do it and re-submit to you?
Also, perhaps that should be added to the problem specification for 1.1...
Thanks,
~Ryan
Peter Gragert
Ranch Hand

Joined: Jan 16, 2001
Posts: 424
Hallo,
You can easily prevent it, using the modulus operation,
but that is the next assignment.
ryan burgdorfer
Ranch Hand

Joined: Jan 24, 2001
Posts: 219
Yes, originally I had a line of code using modulus to do just that...but due to a comment from my first nitpicking, I removed it. In my next submission, I will re-implement it outside of any loops, which I beleive was what the nitpicker was implying.
~Ryan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 1.1 - blank lines