• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about Cattle Drive practice assignment

 
Ken Whitestone
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10509
64
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ken Whitestone
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10509
64
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ken Ww wrote:Scratch that...I've got it now. Thanks again.

You're most welcome.

Winston
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic