Question: within. Yes, dinosaurs. With this software, park operators will be able to plan each of the different types of dinosaurs the park contains as it

 within. Yes, dinosaurs. With this software, park operators will be ableto plan each of the different types of dinosaurs the park containsas it develops and opens. Getting Started Begin by creating a new

within. Yes, dinosaurs. With this software, park operators will be able to plan each of the different types of dinosaurs the park contains as it develops and opens. Getting Started Begin by creating a new Java project in Eclipse, named according to the lab guidelines - project name should be "abc123-lab1", where abc123 is your UTSA ID. Create the following new Java classes, in the default package: (Use these names exactly!) - Park.java - Dinosaur.java - This will be an interface - Theropod.java - This will be an abstract class, 1 of 3 types of Dinosaur - Sauropod.java - This will be an abstract class, 1 of 3 types of Dinosaur - Stegosaur.java - This will be an abstract class, 1 of 3 types of Dinosaur - Tyrannosaurus.java - This will be a class, 1 of 2 types of Theropod - Velociraptor.java - This will be a class, 1 of 2 types of Theropod - Apatosaurus.java - This will be a class, 1 of 2 types of Sauropod - Brachiosaurus.java - This will be a class, 1 of 2 types of Sauropod - Stegosaurus.java - This will be a class, 1 of 1 types of Stegosaur Apatosaurus and Brachiosaurus are types of Sauropod. Stegosaurus is a type of Stegosaur. Place the given Lab1.java class in the default package within your project. Note that this code will not compile until you have completed the requirements of this lab. There will be syntax errors until all dependencies (classes and methods) are implemented. Lab1.java has a main method and will be the class to run our application. Follow the remaining instructions for each class in this lab in crder to get your code to compile - do not change the given class. Nelcome to Juraesic Rark! + Theropoi: Velociraptor namec ilue icerniverei + Theropod: veloctraptor named Delta lcarnivorel + Theropod: Veloctraptor named Echo Ccarntwore: - Theropod: Tyzannoasurus named kex ccarndyore: * Souropod: Afatosaurug named littlefoot laot carmivorej * Savropod: Arachiosavrus named bob inot anrnivorel * Stegosaur: Stegosaurus ramed spike (not carnivore) Park.java This class will represent a Park object, which we will define as having: - A name, represented as a String (e.g.. Jurassic Park) - Amax capacity of dinosaurs, represented as an int (e.g. in Lab1.java, the max capacity is set to 10) - Dincsaurs, stored as an array of Dincsaur objects (e.g. Dinosaurl) - A tostring() method, which calls upon the toString( method in Dinosaur.java to return as a String all needed information (see the output above). - Arn addDino(..) method, which takes as a parameter a Dinosaur object and relurns nothing. Dinosaur.java This class will represent a Dinosaur, which we will be an interface. This interface should declare the following methods (for the subclasses to implement): - A toString0 method which returns a String representation of the dinosaur (see output above) - A method isvegetarian(), which takes no parameters and returns a boolean for whether or not the dinosaur is a vegetarian (if not, they eat meatl) - A getName() which takes no parameters and retums a String of the dinosaur's name (e.g. "Echo") - AgetType( method which takes no parameters and returns a String of the dinosaur's type (e.g. "Theropod - Velociraptor") Theropod, Sauropod, \& Stegosaur These classes will be abstract classes, representing the types of dinosaurs in our park. This class should implement the Dinosaur interface and each should have: - A name, represented as a String (i.e.: Rex) - Whether or not the dino is a vegetarian - very important! This will be represented as a boolean (e.g. false, for Rex, our tyrannosaurus) - A constructor which takes in a String name and a boolean for their vegetarian diet and initializes the fields. - A toString() method which returns a String representation of the dinosaur by calling upon "getter" methods. - A getType() method, fulfilling the requirements of the super class. - An abstract method getSubType(), which takes no parameters and returns a sub type of dinosaur (e.g. "Velociraptor"). This method should be called by the getType() method. Velociraptor, Tyrannosaurus, Apatosaurus, Brachiosaurus, \& Stegosaurus addition, they should have: - A constructor which takes in a String name and a boolean for their vegetarian diet and calls the constructor in the super class. - A getType() method which fulfills the requirements of the super class. - Note that these will be very short classes in terms of amount of code. Please note for all classes: - Each class must have a constructor and getters \& setters to accommodate all of its variables. - All classes must have a toString() method - As this lab is meant to review regular arrays in Java, no other data structure may be used to store the objects required. (No ArrayLists are permitted, for example)

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!