Comment

Comment by bedobi

java offers composition, like pretty much all programming languages

if you have a person class and you have students and teachers

the correct thing to to is NOT to make student and teacher inherit from person

it's to make student and teacher have a person attribute + the other attributes that constitute a student and teacher respectively

parent bedobi 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton