X432: Create Child Class

For this question, assume the following implementation of the class Person and the following UML diagram

Person Class Implementation

public class Person{
        private String name;
        private int age;
        private double heightInCM;

        public Person (String na, int ag, double he) {
            name  = na;
            age = ag;
            heightInCM = he;

        public String getName() {
            return name;
        public int getAge() {
            return age;
        public double getHeightInCM() {
            return heightInCM;

        public String toString() {
            return getName()
                + ":\n Age: " + getAge()
                + "\n Height: " + getHeightInCM() + " cm";


Using the UML Diagram displayed here, create the Student class.

Your Answer:


Practice a different Java exercise


Your feedback will appear here when you check your answer.