aspose file tools*
The moose likes Cattle Drive and the fly likes Question about Cattle Drive practice assignment 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 "Question about Cattle Drive practice assignment" Watch "Question about Cattle Drive practice assignment" New topic
Author

Question about Cattle Drive practice assignment

Ken Whitestone
Greenhorn

Joined: Jul 22, 2013
Posts: 15
Regarding: Assignment Java-1b (Hundred)

Is the purpose of this exercise only to keep from splitting up the words, or should the format match that of the example? What I mean is, the example shown has the word "Gertrude" printed eight times per line, with four occurrences on the last line. But my example has 9 occurrences per line (11 lines), with one occurrence on the last line, on an 80 character width console, without splitting, and using no more than 5 lines of code in the main method.

Is this acceptable or am I supposed to match the formatting?
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 8008
    
  22

Ken Ww wrote:Regarding: Assignment Java-1b (Hundred)

Is the purpose of this exercise only to keep from splitting up the words, or should the format match that of the example? What I mean is, the example shown has the word "Gertrude" printed eight times per line, with four occurrences on the last line. But my example has 9 occurrences per line (11 lines), with one occurrence on the last line, on an 80 character width console, without splitting, and using no more than 5 lines of code in the main method.

Is this acceptable or am I supposed to match the formatting?

Well, I didn't write the exercise, but the question says:
"Write a program that will read in a name from the command line and write it out 100 times."

I don't see anything about formatting in there. Do you?

Winston

Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Ken Whitestone
Greenhorn

Joined: Jul 22, 2013
Posts: 15
Oh, I see now. I clearly misunderstood. I didn't realize that the name was being passed as an argument and could therefore be any name.

Apparently, I have to figure how to write a program that accepts arguments from the command line. Thank you for your response.

[Edit:] Scratch that...I've got it now. Thanks again.
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 8008
    
  22

Ken Ww wrote:Scratch that...I've got it now. Thanks again.

You're most welcome.

Winston
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question about Cattle Drive practice assignment