I am one of the computer science student. Everyone solve problem with a different or same method, ( but actually I dont know whether they use method or I dont know whether there are such common method to approach problem.)
if there are common method, What is it ?
If there are different method, which method are you using ?
All teacher give us problem which in simple form sometimes, but they donot introduce any approach or method(s) so that we cannot make a decision to choose the method then apply that one to problem , afterward find solution then write code.No help from teacher , push us to find method to solve homework. Ex: my friend is using no method , he says "I start to construct algorithm while I try to write prog."
I have found one method when I failed the course,
More accurately, my method:
When I counter problem in language , I will get more paper and then ;
first, input/ output step ;
my prog will take this / these there argument(s) and return namely X ,
ex : in c,
input length is not known and at same type ,
so I must use pointer
desired output is in form of package ,
so use structure
second, execution part ;
in that step , I am writing all step which are goes to final output
ex : in python ;
1.) [ + , [- , 4 , [ * , 1 , 2 ]], 5]
2.) [ + , [- , 4 , 2 ],5 ]
3.) [ + , 2 , 5]
4.) 7 ==> return 7
third, I will write test code
ex : in c++
input : append 3 4 5 6 vector_x remove 0 1
desired output vector_x holds : 5 6
now, my other question is ; What is/are other method(s) which have/has been;
used to construct class :::: for c++ , python, java
used to communicate classes / computers
used for solving embedded system problem ::::: for c
by other user?
Some programmer uses generalized method without considering prog-language(java , perl .. ), what is this method ?
Why I wonder , because I learn if you dont costruct algorithm on paper, you may achieve your goal. Like no money no lunch , I can say no algorithm no prog
therefore , feel free when you write your own method , a way which is introduced by someone else but you are using and you find it is so efficient