// here i am writing C++ code
public class PricedApt extends RentalApt {
private double price;
RentalApt(firstname,price,b,lastname): PricedApt(firstname,b,lastname){
// As there is only one member in this class this means that every argument //coming to it is supposed to be passed to the parent class constructor.
// in c++ : operator is used to call the super class constructor
this.price = price;
}
}