9
votes
4answers
460 views

Similar methods using loops

Is it recommended to combine two similar methods into one? ...
10
votes
1answer
322 views

When should I consider the number of my method arguments too big?

I'm writing a simple Pong game, I have a method bounce() that makes everything run: the ball, the paddles, score etc. and it uses 12 arguments: 3 counters, 2 ...
1
vote
2answers
80 views

Scanning an int variable

I have attemped to define a function which scan an int value in a specified range and returns that value. The lower bound is the lower of the two parameters, the upper bound is the larger of the two ...
1
vote
2answers
512 views

What design pattern to use on this case

I have this code that converts audio to different file formats. ...
5
votes
3answers
260 views

Calling functions (or invoking methods) in constructor

I had written something like the following, ...
8
votes
6answers
477 views

What looks better in java

I wonder what is better code practice or just what looks better in Java. Version 1: ...