Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please help me write the pseudocode, create a flowchart with the appropriate shapes, and a Test Plan / Test Case Matrix for the following Java
Please help me write the pseudocode, create a flowchart with the appropriate shapes, and a Test PlanTest Case Matrix for the following Java code.
public class Exercise
public static void mainString args
Create a rectangle with width and height
Rectangle myRectangle new Rectangle;
Display information about the first rectangle
System.out.printlnThe area of a rectangle with width
myRectangle.getWidth and height
myRectangle.getHeight is
myRectangle.getArea;
System.out.printlnThe perimeter of a rectangle is
myRectangle.getPerimeter;
Create another rectangle with width and height
Rectangle yourRectangle new Rectangle;
Display information about the second rectangle
System.out.printlnThe area of a rectangle with width
yourRectangle.getWidth and height
yourRectangle.getHeight is
yourRectangle.getArea;
System.out.printlnThe perimeter of a rectangle is
yourRectangle.getPerimeter;
class Rectangle
private double width;
private double height;
Noarg constructor to create a default rectangle
public Rectangle
this.width ;
this.height ;
Constructor with specified width and height
public Rectangledouble width, double height
this.width width;
this.height height;
Getter method for width
public double getWidth
return width;
Getter method for height
public double getHeight
return height;
Method to calculate and return the area of the rectangle
public double getArea
return width height;
Method to calculate and return the perimeter of the rectangle
public double getPerimeter
return width height;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started