package com.nowcode.www.demo03;

public class Student {
    protected String name;
    protected int age;
    public Student(){
        
    }
    public Student(String name,int age){
        super();
        this.name=name;
        this.age=age;
    }
    public void show(){
        System.out.println("name:"+name+"age:"+age);
    }
}
class Undergraduate extends Student{
    private String degree;
    public Undergraduate(){
        
    }
    public Undergraduate(String name, int age,String degree) {
        super(name, age);
        this.degree=degree;
    }
    public void show(){
        System.out.println("name:"+name+"age:"+age+"degree:"+degree);
    }
}