Question

I have a method that create the grid, but I want to use the grid and...

I have a method that create the grid, but I want to use the grid and change the grid in other method, how do I have the grid when I call the method 2.

class:

mian:

If method 2

create_grid method

method 2

method 3

java please

Homework Answers

Answer #1

We can call the create grid method in the method 2 by simply calling the create grid method in the method 2 or we can do the method overloading of the method 2 where we can have the name of the method with different number of parameter an different types of parameter , you can define the method 2 as in the first line you call the create grid method with the necessary parameters and than you store the value of the variables from the create grid method and use it in the method 2.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Java program question! If I pass null to a method, how can I use the passed...
Java program question! If I pass null to a method, how can I use the passed value to compare. Here is example code, it might be wrong, please make it could run on eclipse. Public class hw{ public static void main (String args[]) { method1(); } private static void method1() { System.out.println(method(null)); } public static String method(int[] a) { return null; } What I want to get in the output is just "()". It is not just to type the...
In python Please Problem We want to create a DHCP service that assigns a random, unique...
In python Please Problem We want to create a DHCP service that assigns a random, unique IP with subnet mask 255.0.0.0. This means the service only sets the last 3 octets of an IP. For example if the dhcp_service function is called by an IP of "192.0.0.0", it should keep the 192 and change the rest: 1. Create a dhcp_service(ip_address) function, outside of the ServerClass 2. Have request_dhcp_ip call the dhcp_service and set the ServerClass object's IP to the generated...
For this “Reaction paper” I want you to create a method (using reinforcement only) to increase...
For this “Reaction paper” I want you to create a method (using reinforcement only) to increase the frequency of a selected behavior of a family member, a friend or co-worker or even your pet. You will have to observe the subject and then carefully define the behavior that you want to increase in its frequency (for example, you might want to get your son to say thank you more often). This is theoretical only, I am not asking you to...
how do i create a java method that takes two ints and divides first int in...
how do i create a java method that takes two ints and divides first int in the parameter by the second int using recursion and nno division or multiplication
Use the method of Lagrange multipliers to solve this exercise. I want to fence in a...
Use the method of Lagrange multipliers to solve this exercise. I want to fence in a rectangular vegetable patch. The fencing for the east and west sides costs $6 per foot, and the fencing for the north and south sides costs only $3 per foot. I have a budget of $120 for the project. What is the largest area I can enclose? Please find answer (show steps) and will rate!
(JAVA) Create a class that represents a Customer. Use good OO programming technique. A Customer has...
(JAVA) Create a class that represents a Customer. Use good OO programming technique. A Customer has a firstName, lastName, customerNumber, emailAddress. You can add some more fields if you want to, but those 4 are a minimum. Override the equals method, and the toString method from the Object class. Implement the Comparable interface. In the main method, create some instances of the Customer class, and demonstrate the use of the accessor and mutator methods, as well as the compareTo method.
Problem 2: I want to create a bouquet of flowers consisting of 7 flowers. I have...
Problem 2: I want to create a bouquet of flowers consisting of 7 flowers. I have 10 roses, 8 tulips, 3 daisies and 6 lilies to choose from. You should set up but do not need to compute the answer. How many different bouquets can I make? How many different bouquets can I make that consist of 3 roses and 4 lilies? How many different bouquets can I make that consist of exactly 5 roses? How many different bouquets can...
Java For this assignment you need to create at least 5 classes. 1.Create a vehicle class...
Java For this assignment you need to create at least 5 classes. 1.Create a vehicle class ( super class) 2,3. Create two sub classes ( car, bus , truck train or any) for vehicle class 4 Create a subclass (sportscar or schoolbus or Goodstrain or any) for car or bus You need to use the following atleast for one class. Use a protected variable Add constructor for superclass and subclass Override a method which displays a description about the vehicle...
ONLY use method of alligation to solve the problem. I already know the answer, I want...
ONLY use method of alligation to solve the problem. I already know the answer, I want to know how to solve it with alligation. IF YOU DON'T KNOW WHAT ALLIGATION IS, DON'T ANSWER THE QUESTION. THIS IS FOR A PHARMACY EXAM. A health food store sells a mixture of raisins and roasted nuts. Raisins sell for $3.50/kg and nuts sell for $4.75/kg. How many kilograms of each should be mixed to make 20 kg of this snack worth $4.00/kg? ONLY...
I have a question relating to java in the IDE intelij: My professor wants us to...
I have a question relating to java in the IDE intelij: My professor wants us to make a sentiment analysis program in java. he gave us two java files but i do not know how to place them inside the IDE. these are the file names: MainApp.java ReviewClassifier.java how to i open them in the IDE? do i have to create a Project? how do i append them to it? I want to know the general idea of how to...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT