I have 3 student types and I want to create one "stud" depending on which type is sent. Is there a way to do this?
Code:private void addgrad(int t){
if (type == 1){
graduate stud = new graduate();
}
if (type ==2){
partTime stud = new partTime();
}
if (type == 3){
undgrad stud = new undgrad();
}
