Use the inheritance hierarchy shown for GeometricObject (in Lab 01, Q4 page 3) and add two classes to represent Equilateral Triangle and Cylinder respectively. Design and create these two additional classes - EquilateralTraingle and Cylinder. Your objective is to reuse as much code as possible.
Design a complete UML diagram for the given case, then design and implement the above requirements.
Design an appropriate GUI application to set up and run the proposed Geometric Shape that would allow a user to create any Geometric Objects and read a text file containing Geometric object details and print its area and perimeter. You may use the sample design as given in the Lab 02 Question 5.
The GUI for this assignment should create at least two new classes one being the JFrame for displaying the GUI JPanel , and the GUI JPanel with its components.
The GUI needs to be able to allow
Format of the data file should be as the following:
Object Type, Data
Example
Circle, 6.0
Rectangle, 3.5, 4.5
Triangle, 2.3, 3,4, 4,2
For this part of the assignment you may assume that the Geometric Shape Constructor Application is running on the server. The server calculates area and perimeter of the object sent from the client.
The system is sending and receiving data using the User Datagram Protocol (UDP). A client sends an objects related information Object type and its attributes example radius/width/length to the server. The server will validate the message received from the client, that, it calculates area and perimeter of the Geometric Object. The server then sends back the message to the client. The server's port number for this assignment is 20171.
The server, may or may not implement the GUI. The server program must continue to listen to the client. There is no need of reading or saving data files.