problemļæ¼ of findingļæ¼ Relationship in Javaļæ¼ | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

problemļæ¼ of findingļæ¼ Relationship in Javaļæ¼

whats the relashon ship between these classes in java (Student class, Undergraduate class, Postgraduate class,)

2nd Apr 2021, 11:37 AM
Fancy
Fancy - avatar
2 Respostas
+ 3
// Possible combination // but not if Undergraduate contains methods that should not be accessible in Postgraduate, only if they were rewritten class Student { String name; } class Undergraduate extends Student { String thesisTopic; } class Postgraduate extends Undergraduate { String doctoralThesis; }
2nd Apr 2021, 5:19 PM
zemiak
+ 1
will actully that was helpful thank you for answering my Questionļæ¼
2nd Apr 2021, 5:12 PM
Fancy
Fancy - avatar