General notes, length program

0 views
Skip to first unread message

Tory S. Anderson

unread,
May 2, 2011, 2:36:42 PM5/2/11
to BYU CS 142 (Spring 2011) [McCarthy]
A couple of general things that threw me errors.
Despite my overjoy at being free of windows now that I am not using an
MS programming language, it seems I still can't name classes with
names including "_" or "." I don't advise trying it.

On the length problem we are asked to develop functions, but never
actually asked to DO anything with them. Further direction, please.

Sarah

unread,
May 2, 2011, 2:46:51 PM5/2/11
to BYU CS 142 (Spring 2011) [McCarthy]
Just so everyone is clear on naming restrictions in Java (and this
applies to all programming languages I know of). The name can only
contain letters, numbers, underscores, and the dollar sign. The name
cannot start with a number (and therefore can start with a letter,
underscore, or dollar sign). These rules of naming apply to class
names, variable name, method (also known as functions) names, and
pretty much anything you name anything in programming.

You can read more here: http://www.cafeaulait.org/course/week2/08.html

Jay can answer more explicitly, but you are right: he is only
requiring you to do the functions. Though, you should have a way of
testing these functions. So, you should have print statements (i.e.
System.out.format() or System.out.println()) in your main that call
your functions and verify that they are giving the correct answers. In
order to properly do the defense, you'll need to do this kind of
testing.

Sarah (TA)

On May 2, 12:36 pm, "Tory S. Anderson" <torys.ander...@gmail.com>
wrote:

Jay McCarthy

unread,
May 2, 2011, 2:51:58 PM5/2/11
to byu-cs-jm-14...@googlegroups.com
2011/5/2 Tory S. Anderson <torys.a...@gmail.com>:

Read Sarah's comment here. But let me say it too:

You don't need to do anything with the functions. You just need to
write the correct function. Your job is to write it and convince me
what you wrote is correct. The best way to do that is to use it. I
don't care _how_ you use it though.

Jay

--
Jay McCarthy <j...@cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93

Reply all
Reply to author
Forward
0 new messages