What will be the output of the following program?
public class RoomAndFan extends Fan {
public static void main(String[] args) {
Room r = new Room();
r.name = "Hall";
r.flooring = "Marble";
r.width = r.height = 12;
Fan f = new Fan();
f.speed = 1500;
r.fan.color = "Brown";
r.fan.numberOfWings = 3;
System.out.println(f.speed + r.fan.color + r.fan.numberOfWings);
System.out.println(r.name + r.flooring + r.width + r.height);
}
public static void a(Room r) {
r.flooring = "Italian " + r.flooring;
r.height = (r.width + 12 + 1);
r.fan.numberOfWings = 4;
}
}
class Room { String name; String flooring; int width, height; Fan fan; }
class Fan extends Room { double speed; String color; int numberOfWings; }