Is there a way to add more command line arguments?

2 views
Skip to first unread message

Daniel Wyleczuk-Stern

unread,
Nov 30, 2010, 11:46:58 AM11/30/10
to Cornell CS 2110
I'd like to be able to have it so the user can choose to pass in a
value to the program. Is that doable at all?

Jack Zhou

unread,
Nov 30, 2010, 11:53:25 AM11/30/10
to cornell...@googlegroups.com
No, the entry point to the program is Simulator.main(). The Simulator class is given so you cannot modify it in any way whatsoever.

Why do you need to pass in a value?

On Tue, Nov 30, 2010 at 11:46 AM, Daniel Wyleczuk-Stern <smi...@gmail.com> wrote:
I'd like to be able to have it so the user can choose to pass in a
value to the program.  Is that doable at all?

--
You received this message because you are subscribed to the Google Groups "Cornell CS 2110" group.
To post to this group, send email to cornell...@googlegroups.com.
To unsubscribe from this group, send email to cornell-cs211...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cornell-cs2110?hl=en.


Lonnie Princehouse

unread,
Nov 30, 2010, 12:01:49 PM11/30/10
to cornell...@googlegroups.com
For your own edification, you could write your own main() that pre-configures static variables in your Naturalist before launching the simulator.  But the graders will be running the stock simulator, so you should have sensible default values for whatever parameters you need.

The simulator itself is always going to use the default constructor to create your naturalist.


On Tue, Nov 30, 2010 at 11:46 AM, Daniel Wyleczuk-Stern <smi...@gmail.com> wrote:
I'd like to be able to have it so the user can choose to pass in a
value to the program.  Is that doable at all?
Reply all
Reply to author
Forward
0 new messages