Ask your own question, for FREE!
Computer Science 15 Online
OpenStudy (christos):

C++, Can you help me solve this problem? http://screencast.com/t/ODb5sVGzq

OpenStudy (rsmith6559):

Break it down into smaller parts, and break them down into smaller parts and keep breaking it down until you're basically forced to write code.

OpenStudy (christos):

what do u mean ?

OpenStudy (rsmith6559):

Large problems, taken as a whole, are daunting and confusing. The first step in writing a program is almost always decomposing the problem ( breaking it down into smaller problems that together solve the larger problem ). Then you decompose the smaller problems. You keep repeating this until the problems take just a few lines of code to solve. Each of the sub-problems correspond roughly to a function. One course that I did said that functions should generally be 15 or less lines of code. I've started to like, as I'm decomposing, writing the function's comments, and definition and then coming back later and actually coding and debugging it.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!