Question: Please write code using java programming by following these instructions: Use the Rectangle Object Class Model (attached below) to create a set of classes which

Please write code using java programming by following these instructions:

Use the Rectangle Object Class Model (attached below) to create a set of classes which creates an object; the object type is cup; this is an exercise in constructors, get- and set- methods.

Use the code below as reference and make so its for a "cup" instead of a rectangle.

Please include output photo.

Please write code using java programming by following these instructions: Use the

chaprar RectangleObjectClassModel.java 11/8/2019 import java.util.*; public class RectangleObject class Model private double lenght, width, aree, perimeter; private static int numberThings = 0; private static Date date = new Date(); !! public RectangleobjectClassModelo Default Constructov lenght = 20; width - 20; numberThings+1; incununted date.getTime(); }//end first constructor public RectangleObjectClassModel (double newLenght, double newwidth) lenght = newLenght; width = new Nidth; number Things++; counting the instance date.getTime(); time instana Los Created !//end second constructor Vited public static int getNumber Things return numberThings; ?//get count of objects public static String getDate() return date.toString(); }//end tostring method public double get Area() area = lenght *width; return area; }//end gelArca () public double getPerimeter perimeter = 2 * (lenght + width); return perimeter 1//end get Perimeter public double get Lenght) return lenght; public double gelWidth() zelurn width; public void setlenght (double newLenght) lenght = newLenght; J//end setLenght) public void setWidth (double newwidth! width = newWidth; }//end setWidth() 1//end class chaprar RectangleObjectClassModel.java 11/8/2019 import java.util.*; public class RectangleObject class Model private double lenght, width, aree, perimeter; private static int numberThings = 0; private static Date date = new Date(); !! public RectangleobjectClassModelo Default Constructov lenght = 20; width - 20; numberThings+1; incununted date.getTime(); }//end first constructor public RectangleObjectClassModel (double newLenght, double newwidth) lenght = newLenght; width = new Nidth; number Things++; counting the instance date.getTime(); time instana Los Created !//end second constructor Vited public static int getNumber Things return numberThings; ?//get count of objects public static String getDate() return date.toString(); }//end tostring method public double get Area() area = lenght *width; return area; }//end gelArca () public double getPerimeter perimeter = 2 * (lenght + width); return perimeter 1//end get Perimeter public double get Lenght) return lenght; public double gelWidth() zelurn width; public void setlenght (double newLenght) lenght = newLenght; J//end setLenght) public void setWidth (double newwidth! width = newWidth; }//end setWidth() 1//end class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!