Write a class and name it Sample that should include the following members:
a) Two private integer fields named side1 and side2 that are both initialized to 5.
b) Write set and get methods for each field variable.
c) A method named area which is overloaded, the first method has no parameters, it does not have return value. This method should:
• Calculate the area of the square using the private fields.
• Display the area using the message dialog box.
1
Expert's answer
2010-12-14T06:18:19-0500
Your question requires a lot of work to do and cannot be done for free. Submit it as an assignment to the control panel and our experts will assist you.
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment