Please enable JavaScript to use CodeHS

Want to receive Question of the Day updates? Subscribe Here

AP CSA Question of the Day Feb. 27, 2025

Reference
  1. Incorrect Correct No Answer was selected Invalid Answer

    The Shape class is defined as follows:

    public class Shape {
        private String name;
    
        public Shape(String name) {
            this.name = name;
        }
    
        public String getName() {
            return name;
        }
    }
    Java

    Which of the following will properly create a Circle class that is a subclass of the Shape class? A Circle is a Shape and has a radius as well as a getRadius method.