Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Asmt 1.4 Suggestion

 
Allen Alchian
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marilyn or Paul,
Your directions for assignment 1.4 read, in part:
----------
I want to type
java Say 22
and see
twenty-two
More extra credit if you can handle numbers as large as nine hundred ninety-nine billion, nine hundred ninety-nine million, nine hundred ninety-nine thousand, nine hundred ninety-nine.
---------
However, when I accomplished both the tasks, your evaluation inclulded the following comments:
"So you are putting comma's between the words. Interesting, but I want you to change it so that you only write the words themselves. One of the rules of the cattle drive is don't add extra stuff unless specifically mentioned. It just makes more work for me and I'm lazy."
I can fully appreciate not wanting extra stuff added to the assignments, but if you note in the assignment statement, commas are included in the assignment statement. Like the hypens, I assumed you wanted the commas also.
I'll remove the commas from the code...that's easy to do and it was a good exercise to make them appear only at the proper location.
I'd like to suggest you remove them from the problem statement if you don't want them to appear in the code.
Thanks for the coding help!
Allen

 
paul wheaton
Trailboss
Pie
Posts: 21665
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the commas should stay in. I think proper formatting requires it, but I'm not sure. I guess this falls into the realm of anal retentive formatting of the english language: any volunteers to sort this one out?
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, my ears were ringing, and I decided to browse this forum, which I don't do ordinarily. Just a coincidence I'm sure. For my part I agree that proper formatting requires the commas. Maybe it would be slightly clearer if the problem statement explicitly asked for commas.
 
paul wheaton
Trailboss
Pie
Posts: 21665
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I did the cattle drive, I never paid attention to the commas. I let it go. I guess I felt I had bigger fish to fry.
I suppose a good test would be to run their program with a pre-determined number and direct the output to a file. Then do a "diff" or "fc" (depending on the o/s of the day) and make sure the files are exactly the same.
 
paul wheaton
Trailboss
Pie
Posts: 21665
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marilyn is now running the cattle drive. On this issue (and probably most others), I'll leave it up to Marilyn.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic