2024年5月7日解決済み

MathScore、EnglishScore に科目名を渡さないのはなぜですか?

ユーザー

新しいクラス class MathScore extends Score と class EnglishScore extends Score を設定した時に、
new Score('Math', 70); と new Score('English', 80); を new MathScore(70) と new EnglishScore(80) にしたところなのですが、
Math と English をなくした理由がよくわかりませんでした。

ここを詳しく教えていただきたいです。

スタッフ

この回答を見るにはプレミアムプランへの登録が必要です

プレミアムプランとは?