Question: Create two java program files for the following program, compile and run successfully. Program : Create an Alligator class consists of the following components. Properties


Create two java program files for the following program, compile and run successfully. Program : Create an Alligator class consists of the following components. Properties - data fields (using public access modifier) o weight: double onum_leg: int o age: double Constructors o Blank (no-argument) constructor: the constructor that has no parameter o Standard constructor: the constructor with the same number of parameters as properties. Behaviors (Methods) - otoPrint(): no return, print the name and current value of every property. o swim(): no return, describe how the alligator swim using an output statement, for example, it swim slowly after a meal. . Write a complete java program that tests and use Alligator Class, having the main() method. 1 In the main() function, do the followings actions Create two Alligator objects, one from the no-argument constructor, and another from the standard constructor. For the latter object from the standard constructor, a value should be read from the user with proper prompts for every property. At the end, call every method from each object. For both objects, change every property's value using assignment statements, with values read from the user. Call every method from each object one more time
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
