Convert UML class diagrams to Java code
You are required to convert the UML class diagrams shown below into Java code.
Step 1: Create a NetBeans project
Create a new project called PetShop in a folder called T29.
Step 2: Understand the UML diagrams
Make sure you understand the UML diagrams given above.
Step 3: Create the classes
Add to your NetBeans project the required Java classes. Following the UML diagrams precisely, write the Java code for the classes you have just created.
Hint: Remember to ensure that the constructor methods in the subclasses call the superclass’s constructor method.
Step 4: Write an application class
Add to your project a Java class called PetShopApplication. The main() method,
add a method called printPetDetails() method, which outputs to the console window the contents of thepets array in a tabulated format. Thepets array must be passed to the method as a parameter.