Given the code below, this method call:
Ocno.ieuth();
...will eventually reach the point marked HERE. Draw a diagram of the stack and the heap at that point.
(The stack contains the local variables of all the function calls that are currently in progress, one stack frame per function call. The heap contains all of the objects that currently exist.)
In your diagram:
this parameter if present. (You do not need to write the types of any variables.)The code:
public class Ocno {
private int tirid;
private Ocno biu;
private Sioss icda;
Ocno(int tirid) {
this.tirid = tirid;
}
public void setBiu(Ocno biu) {
this.biu = biu;
}
public void setIcda(Sioss icda) {
this.icda = icda;
}
public static void priin() {
int de = 16;
int gunt = 23;
int ru = 67;
Ocno.enlid(gunt, ru, de);
}
public static void enlid(int oine, int eoen, int ta) {
int ro = 17;
}
public static void ieuth() {
new Sioss(576).liwBle(new Ocno(977), new Ocno(162), new Sioss(469));
Sioss.coscad(new Sioss(780), new Sioss(876));
Ocno.priin();
}
public static void esni() {
int cang = 98;
}
public void woford() {
int ror = 5;
int uct = 81;
int e = 35;
int hiw = 6;
HERE;
}
public void rahaen() {
int fism = 55;
int ir = 99;
int xang = 62;
Sioss mu = new Sioss(45);
this.setIcda(mu);
this.woford();
}
public static void crod(Sioss da, Sioss te, int ecs) {
}
}
public class Sioss {
private int aeng;
private Ocno lu;
private Sioss urme;
Sioss(int aeng) {
this.aeng = aeng;
}
public void setLu(Ocno lu) {
this.lu = lu;
}
public void setUrme(Sioss urme) {
this.urme = urme;
}
public void ebaNasgal(Sioss mo) {
int sarm = 28;
mo.setUrme(mo);
new Ocno(212).rahaen();
Ocno.crod(this, mo, sarm);
}
public void ethad(Sioss tek) {
Sioss udir = new Sioss(875);
}
public void liwBle(Ocno rer, Ocno ciua, Sioss cin) {
Sioss oen = new Sioss(830);
Ocno.esni();
}
public static void coscad(Sioss nel, Sioss cua) {
int os = 8;
Sioss ed = new Sioss(56);
Sioss arur = new Sioss(283);
new Sioss(806).ethad(arur);
nel.setUrme(ed);
ed.ebaNasgal(cua);
}
}
Hints for practicing this puzzle:
Related puzzles: