I have a Java evaluation that is marked by a robot whenever I upload my assignment so that it Shows a screen.
A good object-oriented design keeps each method in the most appropriate category. The most appropriate class for the method should be the same class as the data square, which is required to access the method. If you do not keep any method in the right category, then it will increase the amount of communication required between your classes. The score below measures the amount of communication between your classes The lower the points the better the passage between the class 7 arguments has been passed between the 15 results that occurred between the method invention classes: Communication = Invitation + 2 * Inputs The amount of + 2 * output = 63
Now what is the meaning of "the method invented between classes", "passage between logic classes" and "the result between classes"?
Method invocations between classes
As Your class has its own methods If you want to call the method from another class, then you have to use example this Class .
For example:
class A {public zero method A () {}} class B {public zero method B () {}}
/ Pre>If I want to call
methodA ()
from class toB
then I should use it:public Zero Method B () {A a = new A (); A.methodA ();
Logic passed between classesThis time the
methodA ()
is logic andb < / Code> can be used as field as logic .
class A {public zero method A (int argument) {}} square b {private int fieldB = 42; Public void method B () {}}
to call
methodA ()
toB
you logic from one class to anotherpublic zero method B () {A a = new A (); A.methodA (fieldB); Logic passed between classes //}
Result between classes
and now
methodA ( )
returns the result is this code.class A {public entry A () {return 42; }} Class B {private area B; Use the value return return
b
You have to do this:public zero method B () {A a = new A (); FieldB = a.methodA (); // returning between results sections}
Comments
Post a Comment