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
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...
(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...
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!
Create an interface named Turner, with a single method called turn(). Then create 4 classes: 1-...
Create an interface named Turner, with a single method called turn(). Then create 4 classes: 1- Leaf: that implements turn(), which changes the color of the Leaf object and returns true. If for any reason it is unable to change color, it should return false (you can come up with a reason for failure). The new color can be determined at random. 2- Document: that implements turn(), which changes the page on the document to the next page and returns...
JAVA QUESTION I want to know how to combine different Shape objects in Java into one....
JAVA QUESTION I want to know how to combine different Shape objects in Java into one. For example, if I wanted to make a class called CoffeeCup, and it was supposed to be a to go coffee cup, how would I combine a Rectangle, and two Ellipses (on the top and bottom) and then use that as one object in a different class? Thank you in advance!
Create a python class that initializes a position and an array Then create a method within...
Create a python class that initializes a position and an array Then create a method within that class that decides the next permutation of the array. Change the current permutation into whatever the next one will be as seen in the johnson trotter algorithm do your best with this information. dont have any more to give
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...
Can i have multiple example for my health class assignment. create your own example of a...
Can i have multiple example for my health class assignment. create your own example of a Health Belief Model corresponding to a behavior that you want to change
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT