Welcome to the CSC Q&A, where you can get help (and share your knowledge) about computer science!

Method Help in the Lab.

+4 votes
My friend suggests me to change the name of the method in that messy class we had in the lab. My best effort is to change howbad to howBad, and Help to help ... Any suggestion?
asked Oct 10, 2017 in CSC 285 (F17) by Trung Le (Jayden) (100 points)

2 Answers

+2 votes

I would recommend trying to figure out what those methods actually do, and then naming the methods based on that. For example, if the howbad method counted the number of times you had a repeated word in a ArrayList, you would want to change the name of that method to something like countRepeatedWords() since howbad as a method name does not give any insight to what the method actually does.

answered Oct 10, 2017 by Lars Harvey (100 points)
0 votes
I would look through and see what the actual method does before renaming it.
answered Oct 27, 2017 by Scott Daluga (100 points)