1 ImportJava.util.Scanner;2 /**3 * There are a pair of rabbits, starting from the 3rd month after birth a pair of rabbits each month,4 * The rabbit grows to a third month after a pair of rabbits, if the rabbit5 * Do not die, ask the total number of rabbits per month?6 * @authorAdmin7 *8 */9 Ten Public classRabbit { One Public Static voidMain (string[] ar
Introduction to coordinate systemIllustrates the Java coordinate system. The coordinate origin is in the upper-left corner, in pixels, which is the smallest display unit on the computer screen. In the Java coordinate system, the f
Class - classTank the { the //indicates the horizontal axis of the tank the intX=0;94 the //from the ordinate of the tank the intY=0; the Public intGetX () {98 returnx; About } - Public voidSetX (intx) {101 This. x =x;102 }103 Public intGetY () {104 returny; the }106 Public voidSety (inty) {107 This. y =y;108 }109 PublicTank (intXinty) the {111 This. x=x; the This. y=y;113 }
Recent point to question:In n points on a two-dimensional plane, the distance of the nearest pair of points is fast.Java implementations:Package P2;import static Java.lang.math.*;import Java.util.arraylist;import Java.util.arrays;import Java.util.collections;import Java.util.comparator;import Java.util.scanner;public class CloestPair {//coordinate point static Class Point {public ' point () {}public point (
2017-2018-2 1723 "Java Programming" course
Pairing programming exercises-arithmetic-preparation phase
After a person struggles for nearly half a semester, finally ushered in our first team collaboration coding, that is, our first pair of programming exercises-arithmetic. Obviously, he is the test of our knowledge of the previous level of mastery, and test our ability, since it i
2017-2018-2 20172310 "Java Programming" course pair programming Exercises _ arithmetic _ Second week blog requirementsStudents in the group need to publish their own blogThe blog should contain the following content:Related processesKey code ExplanationDifficulties encountered and their solutionsWrite the part of the project that you are responsible forDivision of individual contribution (percentage contrib
2017-2018-2 1723 "Java Programming" course
Pairing programming Exercises-arithmetic-the final stage
The last week, the time is getting more and more tense, because the previous procrastination and some things delay, caused the tension today, this week should be the most efficient week for our group, because put down a lot of things began to add some things about arithmetic programming.
20172325 "Java Programming" course pair programming exercises _ Arithmetic second-week phase summary pair Partners
Study No.: 20172306
Name: Chen Liu
Knot-to-partner blog links
Chen Liu students on the high degree of programming, and in the programming ability is very good, have their own ideas and can put the idea of concrete practice out, j
problems are not problems, and we now realize the importance of Java in the IT industry, how dare ignore java. The piece is a part of the code of the elevator operation:Here's how to run the program: you can see that the lift starts at the floor where it can be reached.The following is the operation of the program: when the 19-layer response, fourth elevator random operation, 16-layer response, 4th elevato
20172311 "Java Programming" course pair programming exercises _ Arithmetic first-week phase summary pair Partners
Study No.: 20172307
Name: Steven Uptown
Partner First week blog address:
Demand analysis
Functional Requirements
1. Automatic generation of topics
can be used independently (able to write the function of the tes
Because it is a custom type, custom overrides are required for the Equals () function and the hashcode () function in HashMap.Otherwise the content of the same object corresponding to the hashcode will be different, unable to play the normal function of the algorithm, covering the Equals function, should be equivalent to C + + overloaded = = operator to ensure that the equality can be judged. Except that Java does not have a custom overloaded operator
A little summary of recent projects related to CAD data1. About listIt can save a number of different elements, but how do you determine what kind of element it is when you take an element? When you take an element, you can determine what type of element is in the list by calling the GetClass method and comparing it to the class. The element is then coerced into a type cast.2. Reference block coordinates for data in AutoCAD.A block reference in a DXF file has a definition of coordinates that can
); }}classVisitor_b { Public voidCalla (visitor_a A) {a.method1 (); }} Public Static voidMain (string[] args) {visitor_a visitor_a=Newvisitor_a (); Visitor_b Visitor_b=NewVisitor_b (); Visitor_a.method1 (); Visitor_b.calla (visitor_a);}Above, is the visitor pattern of the most basic form, through observer B to access a interface, to achieve the dual ability, in fact, is also dependent on the nature of Java's late dynamic binding mechanism capabilitiesclassFather { Public voidAccept (Ex
2017-2018-2 1723 "Java Programming" course pair programming Exercises _ Arithmetic Group members
20172327 Marian
20172320 Li Shu
20172317 Shing
Demand analysis
Automatically generate problems
can be used independently (able to write the function of the test class to create a separate problem)
can generate different levels of problems
Different l
2017-2018-2 20172310 "Java Programming" course pair programming Exercises _ arithmetic _ first week knot to small partners:
Jin 20172310
Requirements analysis (describe your own understanding of requirements and the likelihood of subsequent expansions)
can automatically generate a certain amount of topics according to the needs of users, and the level of the topic can be
30
45
Postmortem Process Improvement Plan
Summarize afterwards and propose process improvement plan
10
25
Total
880
985
FeelingsFor this pair to write code, I feel the 1+1>2 feeling, in the process of writing code two people can timely rewrite the incorrect code, and can get new ideas, and make our code more perfect, more rigorous. At the same time also can find their own
man
Standard A Hungry man (Safety protection aspect enumeration single example better than standard a hungry man)Thread-safe, efficient and lazy to load
Enumeration single Examplethread safe, efficient and lazy to load (natural avoidance of reflection and deserialization)?
Lazy (Static inner class of efficiency is better than standard idler)
Standard lazythread safe, inefficient, lazy to load
Double detection (not recommended, bug)thread safe, ineff
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.