1, Write a java program named Suansu , define two integer variables A and B, initialize a to 10 and B to 5 using the construction method, and define a method to find the sum (method name AddAB),...


1, Write a java program named Suansu , define two<br>integer variables A and B, initialize a to 10 and B to 5<br>using the construction method, and define a method to<br>find the sum (method name AddAB), difference (method<br>name SubAB), product (method name MultiAB) and<br>quotient (method name DivAB). Use another Java<br>program testsuansu Java test suansu Java defined<br>methods and output the results on the screen.<br>2, Create a class named Rectangle to represent a<br>rectangle whose width and height are changed. The<br>width and height of the rectangle are determined by the<br>construction method. Create the following methods for<br>the rectangle class:<br>Getarea returns the area of the rectangle. The range of<br>length and height is required to be 0~50;<br>Getperimeter returns the perimeter of the rectangle;<br>

Extracted text: 1, Write a java program named Suansu , define two integer variables A and B, initialize a to 10 and B to 5 using the construction method, and define a method to find the sum (method name AddAB), difference (method name SubAB), product (method name MultiAB) and quotient (method name DivAB). Use another Java program testsuansu Java test suansu Java defined methods and output the results on the screen. 2, Create a class named Rectangle to represent a rectangle whose width and height are changed. The width and height of the rectangle are determined by the construction method. Create the following methods for the rectangle class: Getarea returns the area of the rectangle. The range of length and height is required to be 0~50; Getperimeter returns the perimeter of the rectangle;

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here