The class Payment is abstract and therefore cannot be instantiated, yet in the skeleton code for the ParkingTicket class, it is declared as a field:
private Payment payment;
I don’t think that would compile? Would we have to add the following two attributes to ParkingTicket instead:
private Cash cashPayment;
private CreditCard creditCardPayment;
Course: Grokking the Low Level Design Interview Using OOD Principles - Learn Interactively
Lesson: https://www.educative.io/courses/grokking-the-low-level-design-interview-using-ood-principles/7D6XVRqxXVj