Question 1. Please write at least two method headers and how you would call them. Also, explain the methods. Mix up the parameters (have at least one with a parameter) and have one return something. For example: public void doSomething(String s, double z) public int getSomething() doSomething expects a String to be passed in. It does not return anything. getSomething does not have any parameters - so nothing has to be passed in. getSomething will return an int. To call these methods you could do this: doSomething("Hello!", 5.5); int answer = getSomething(); Try to think of something that makes more sense, other than my doSomething and getSomething methods. Question 2. Explain Encapsulation in your own words
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 1 | 2 | 3 | 4 | 5 |