Question: Create a new project called PreLab09A with 3 separate class files called CircleWithPrivateDataFields.java, RectangleWithPrivateDataFields.java, and TriangleWithPrivateDataFields.java. Then, create a test program called TestShapes.java that will

Create a new project called PreLab09A with 3 separate class files called CircleWithPrivateDataFields.java, RectangleWithPrivateDataFields.java, and TriangleWithPrivateDataFields.java. Then, create a test program called TestShapes.java that will create an object of the three types..Should look as follows pic:
 Create a new project called PreLab09A with 3 separate class files

Create a new project called PreLab09A with three separate class files called Circle WithPrivateDataFields ja RectangleWithPrivateDataFields.java, and Triangle WithPrivateDataFields create an object of the three types. Your project structure should look as follows: java. Then, create a test program called TestShapes java that will Prelabo9A e D Source Packages ardeWithPrivateDataFields.java RectanglewithPrivateDataFields java TriangleWithPrivateDataFields.java Lubraries The TestShapes java file contains the main method that will create the following objects A circle object with a radius of 5.0. . A rectangle with a length of 10.0 and width of 20.0. A triangle with a base of 5.0 and height of 10.0 The TestShapes java file will then output the following The area of the circle of radius 5.0 is 78.53931633974483 The area of the rectangle of length 10.0 and width 20.0 is 200.0 . . . The area of the triangle of base 5.0 and height 10.0 is 25.0 . The number of Circle objects is 1 The number of Rectangle objects is 1 . The number of Triangle objects is 1 The number of Shapes objects is 3 The three class files should have private data fields for radius, length, width, base and height for the respective classes, and private static variables for numberOCircleObjecta. aumberQBectangleObjecta, and aumberOfTriangteQbjects, Appropriate getter and setter methods should also be included. Report the areas of each shape, the number of objecta created for each shape, and calculate the total number of objects. Zip the folder, calling it Your Name PreLab09A.zip to receive class participation credit for today, Use the sample below to model your solution The area of the eirele of radsus 5.0 s 79.53983 633974483 The area of the rectangle of iength 10.0 and width 20.0 200.0 The area of the triangle of base 5.0 and height 10.0 is 25.0 Th. numb-er of Circle object . 1 The numbez of Rectangle objects 1 The number of Triangle objects The number of Shapes objects is3

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!