Mix up the parameters (have at least one with a parameter) and have one return something.

computer science

Description

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


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.