Hey guys...i am trying to convert the java code into c++. i have tried to translate it but i am still new in java. can you guys help me out?
thnx... gracias
Code:public class Meatthemextdoor {
private boolean opened;
private List trueBent;
public Girlsdoor() {
this.opened = false;
this.trueBent = new ArrayList();
}
public void addTrueBent(Bang bang) {
trueBent.add(bang);
}
public List getTrueBent() {
return trueBent;
}
public void opening() {
System.out.println("The door is open now.");
opened = true;
final Timer timer = new Timer();
timer.schedule(new TimerTask() {
public void run() {
closemebaby();
timer.cancel();
}
}, 5000);
}
public void closemebaby() {
System.out.println("The door is closed now.");
opened = false;
}
public boolean isOpen() {
return opened;
}
}