Question: UML Class Diagram: /* * Lab 03 * * Code to test the Bird class * * This is a very thin testing process. Students
UML Class Diagram:
/* * Lab 03 * * Code to test the Bird class * * This is a very "thin" testing process. Students are STRONGLY ENCOURAGED to add additional * test cases to this code. * * (c) 2020 Terri Davis */ public class Test_Bird { public static void main( String[] args ) { /* * The executable code called in the next statement has been provided to students. * The following method call will execute a standards check of your Bird.java code, * verifying that it meets MINIMUM CODING STANDARDS. * Please note that CODE THAT FAILS THIS STANDARDS CHECK WILL EARN A GRADE OF ZERO. */ Lab03_StdsCheck.standardsCheck( ); /* * Call the null constructor of the Bird class to verify that it * (a) has been coded correctly * (b) returns the expected results for the object instantiated */ Bird nullBird = new Bird( ); System.out.printf( "Bird instantiated with null constructor:%n\t%s%n", nullBird.toString( ) ); /* * Call the Full constructor of the Bird class to verify that it * (a) has been coded correctly * (b) returns the expected results for the object instantiated */ Bird realBird = new Bird( "Hyacinth Macaw", "Chico" ); System.out.printf( "Bird instantiated with full constructor:%n\t%s%n", realBird.toString( ) ); } // end main } // end Test_Bird
Instructions Write a Java class named Bird to meet the requirements described in the UML Class Diagram included in your lab materials. This lab will adhere to the published Basic Coding Standards. Failure to follow the standards will result in a grade of zero (0) for the lab assignment. You will submit your source code (Bird.java - source code only) in a zipped folder attached to the assignment in Blackboard. DO NOT submit edit/backup versions (with the in the file type) or compiled code (.class files); submission of either will result in a grade of zero (O). Failure to submit in the required format (zipped folder) will result in a grade of zero (O). Provided to You The following resources are provided: These instructions, including sample toString output The UML Class Diagram for class Bird A test harness to use in testing your code (TestBird.java) Executable code to use in validating that your solution meets minimum coding standards (Labo3_StdsCheck.class) Requirements The provided UML Class Diagram explains the requirements for Class Bird. In addition to the requirements described there, be aware of the requirements included in the Basic Coding Standards (published on Blackboard). Specifically be aware of the following: Get and set (accessor and mutator) methods are required, even though they are not indivudally listed in the UML. (Standard industry practice is to not list them, as they are always assumed to be present.) All set and get methods must use standard naming (i.e. "set" or "get" followed by the instance variable name, adjusted for proper camel casing) All get and set methods must be 'final methods. The only direct access to instance variable values is through the set and get methods; no other direct access is ever permitted. Sample toString Output Your output need not be identical to that shown here, but you MUST include all instance values in the output, in the order shown. *** Some number will appear here *** Minimum Standards Check passed for Bird.java Bird instantiated with null constructor: null is a null Bird instantiated with full constructor: Chico is a Hyacinth Macaw Bird Attributes private species: String private name: String Species of Bird, e.g. Parrot, Hawk, Cockatiel, etc. Name of individual Bird, e.g. Polly Operations public Bird ():Bird A null constructor returning a reference to a Bird object whose instance variables have all been set to "neutral defaults" (i.e., null String references here) A full constructor, requiring an input parameter for each instance value, returning a reference to a Bird object whose instance variable have all been set to specified values. public Bird( type:String, who: String): Bird public toString(): String Returns a String object: name is a species. NOTE: Accessor and Mutator (get and set) methods are not defined here, but must be included. Further, standard naming must be used for these methods. Refer to the Basic Coding Standards document, as needed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts



UML Class Diagram:
/* * Lab 03 * * Code to test the Bird class * * This is a very "thin" testing process. Students are STRONGLY ENCOURAGED to add additional * test cases to this code. * * (c) 2020 Terri Davis */ public class Test_Bird { public static void main( String[] args ) { /* * The executable code called in the next statement has been provided to students. * The following method call will execute a standards check of your Bird.java code, * verifying that it meets MINIMUM CODING STANDARDS. * Please note that CODE THAT FAILS THIS STANDARDS CHECK WILL EARN A GRADE OF ZERO. */ Lab03_StdsCheck.standardsCheck( ); /* * Call the null constructor of the Bird class to verify that it * (a) has been coded correctly * (b) returns the expected results for the object instantiated */ Bird nullBird = new Bird( ); System.out.printf( "Bird instantiated with null constructor:%n\t%s%n", nullBird.toString( ) ); /* * Call the Full constructor of the Bird class to verify that it * (a) has been coded correctly * (b) returns the expected results for the object instantiated */ Bird realBird = new Bird( "Hyacinth Macaw", "Chico" ); System.out.printf( "Bird instantiated with full constructor:%n\t%s%n", realBird.toString( ) ); } // end main } // end Test_Bird