20.11. Write Code Questions

  1. Create a subclass of the Parent class named Child, and create a method eye_color() to override the parent method and print “I have green eyes.” Then, create a Child object named lil_child, and call the method on the Child object.

    Create a subclass of the Parent class named Child, and create a method eye_color() to override the parent method and print “I have green eyes.” Then, create a Child object named lil_child, and call the method on the Child object.

  2. Create a subclass of the Parent class named Child, and put a pass statement in the subclass. Then, create a Child object named lil_child, and call the Parent method on the Child object to see what color eyes the lil_child has.

    Create a subclass of the Parent class named Child, and put a pass statement in the subclass. Then, create a Child object named lil_child, and call the Parent method on the Child object to see what color eyes the lil_child has.

  3. Create a subclass of the Parent class named Child, and use super() to inherit the eye_color method. Then, create a Child object named lil_child, and call the eye_color method on the Child object to see what color eyes the lil_child has.

    Create a subclass of the Parent class named Child, and use super() to inherit the eye_color method. Then, create a Child object named lil_child, and call the eye_color method on the Child object to see what color eyes the lil_child has.

  4. Create a subclass of the Parent class named Child, and use the format Parent_Class.method to inherit the eye_color method. Then, create a Child object named lil_child, and call the eye_color method on the Child object to see what color eyes the lil_child has.

    Create a subclass of the Parent class named Child, and use the format Parent_Class.method to inherit the eye_color method. Then, create a Child object named lil_child, and call the eye_color method on the Child object to see what color eyes the lil_child has.

You have attempted of activities on this page