Home > Back-end >  Design pattern is what? And suddenly feel that the programming test seems very logical ability.
Design pattern is what? And suddenly feel that the programming test seems very logical ability.

Time:09-18

Java based recognition all over again, begin to learn to write a small program, tanks war, for example, I did this:

1 tank size, color, speed, movement, shooting, crossing the line, disappear, response button, the relevant data variables and methods to this class,
2 tanks against me, against me have common characteristics and different characteristics, so abstract parent class tank, two subtypes of enemy tanks,
Three classes of bullets, size, color, speed, mobile...
4 wall type, size, color, position... ,
5 tanks, bullets, explosions and wall pictures of a single class,
6 Frame window class inheritance, tank bullets are painted here,
Coordinate the relationship between the classes of call, what data is public private, who need the parameters, took what parameter calculation, instance methods, which make it, what do the static method,
The above should be the so-called design pattern?

1 to 6 belongs to grammar, train of thought, basis I think is not difficult, but the point is to burn the brain, 7 string 1 to 6 into a rigorous logic, logic and programming it doesn't matter, seems to be a natural ability, there are individual differences and natural things, like people have beauty and ugliness, and the inherent logical ability can't training,

Above haven't add text, voice, network class... Or more complex logic, the brain is not enough to burn, small tanks war is so complex, excuse me everybody how to deal with daily work? Is to rely on how many hands make light work or training logical ability? How to write code can consolidate the grammar, but can improve the ability of logic?
  • Related