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

How to test Say 4b?

 
Deza Linikeli
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Any suggestions on how to do a decent test before sending in a solution for 4b? I think I am close to sending my first (of many I am sure ) attempts. I have tested it out with a bunch of random numbers, but it doesn't make me feel confident that this first attempt wouldn't be wasting a nitpickers time. Any suggestion other than testing all numbers between 0-999999999999? I figured others may have had the same problem before me.

Thanks,
Dez
 
Marilyn de Queiroz
Sheriff
Posts: 9066
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a negative number
zero
a number from 1 and 9
ten
a number from 13 to 19
twenty
a multiple of 10 from 20 to 90
ninety nine
one hundred
a number from 101 to 109
a number from 113 to 119
one thousand something
one hundred thousand fifty
one billion
999,999,999,999
one trillion

java Say (no argument)

If it works for all these, it should pretty much work for any number I think.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic