Create an executive class which accepts one argument through a command line.
Make a doubple.parseDouble() conversion on the input argument, print a division table from 31 to 150 with the argument.
Note the "division by zero" case either by the apropriate exception or a using a condition.
This is all I have, any advice would be helpful. Thank you.
Foxy Fox wrote:Create an executive class which accepts one argument through a command line.
I would interpret this line to mean the value is passed as a parameter to the program (and hence will appear in the args array) rather than being prompted for by the program.
Foxy Fox wrote:print a division table from 31 to 150 with the argument.
Do you know what a division table is ? I'm not familiar with the term, so you might need to explain it to get some help. Forget about code for the moment and just try describing the process for creating the table in English (or your own language). If you make the description detailed enough, it should become clearer how to write the code.
That part is unclear to me too, but that's the text of the problem i received from my professor no more no less.
This is how I understood it, the division table has rows ranging from 31 till 150 and columns are derived from the user input.
I'm guessing the print should look like this (the "2" column is the user input argument column and should show the results of the row number(31-150) divided by the user input argument):
That sounds reasonable.
So if someone asked you to write that table on a piece of paper, how would you go about it ?
Once you've worked that out, it should be straightforward to write the code. Have a go and then show us what you've got if you get stuck.