public class BnBReservation extends Reservation{
public BnBReservation(String resName, Hotel hot, String roomType, int numNights){
super(resName);
new HotelReservation(resName, hot, roomType, numNights);
}
so i have a class called hotelreservation and bnbreservation and they are both subclass of superclass reservation, would above code allow me to create a object of HotelReservation when I create an object of BnBReservation?