Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×

FakeArrayList first - new FakeArrayl_ist(3)- first-set(2- 7-1)- first-.docx

Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Prochain SlideShare
3
3
Chargement dans…3
×

Consultez-les par la suite

1 sur 2 Publicité

FakeArrayList first - new FakeArrayl_ist(3)- first-set(2- 7-1)- first-.docx

Télécharger pour lire hors ligne

FakeArrayList first = new FakeArrayl_ist(3); first.set(2, 7.1); first.set(l, 4.9); FakeArrayList second = new FakeArrayList(5); second.set(0, 9.1); second.set(1, 8.4);
Solution
class main_stack_frame
{ int identifier;
int address;
float contents;
public:
void set(int id,float cont)
{identifier=id;
contents=cont;
address=address;
}
}
class heap extends main_stack_frame
{ int identifier1;
int address1;
float contents1;
public:
void set(int id1,float cont1)
{identifier1=id1;
contents1=cont1;
address1=address1;
}
}
class test
{ public static void main(String args[])
main_stack_frame first= new main_stack_frame(3); // object of stack_frame class
heap second = new heap(5);// object of heap class
first.set(2,7.1);// calling set function of main_stack_frame
first.set(1,4.9)
second.set(0,9.1);// invoking set methd of heap class
second.set(1,8.4);
}
}
.

FakeArrayList first = new FakeArrayl_ist(3); first.set(2, 7.1); first.set(l, 4.9); FakeArrayList second = new FakeArrayList(5); second.set(0, 9.1); second.set(1, 8.4);
Solution
class main_stack_frame
{ int identifier;
int address;
float contents;
public:
void set(int id,float cont)
{identifier=id;
contents=cont;
address=address;
}
}
class heap extends main_stack_frame
{ int identifier1;
int address1;
float contents1;
public:
void set(int id1,float cont1)
{identifier1=id1;
contents1=cont1;
address1=address1;
}
}
class test
{ public static void main(String args[])
main_stack_frame first= new main_stack_frame(3); // object of stack_frame class
heap second = new heap(5);// object of heap class
first.set(2,7.1);// calling set function of main_stack_frame
first.set(1,4.9)
second.set(0,9.1);// invoking set methd of heap class
second.set(1,8.4);
}
}
.

Publicité
Publicité

Plus De Contenu Connexe

Similaire à FakeArrayList first - new FakeArrayl_ist(3)- first-set(2- 7-1)- first-.docx (20)

Plus par jkristen1 (20)

Publicité

Plus récents (20)

FakeArrayList first - new FakeArrayl_ist(3)- first-set(2- 7-1)- first-.docx

  1. 1. FakeArrayList first = new FakeArrayl_ist(3); first.set(2, 7.1); first.set(l, 4.9); FakeArrayList second = new FakeArrayList(5); second.set(0, 9.1); second.set(1, 8.4); Solution class main_stack_frame { int identifier; int address; float contents; public: void set(int id,float cont) {identifier=id; contents=cont; address=address; } } class heap extends main_stack_frame { int identifier1; int address1; float contents1; public:
  2. 2. void set(int id1,float cont1) {identifier1=id1; contents1=cont1; address1=address1; } } class test { public static void main(String args[]) main_stack_frame first= new main_stack_frame(3); // object of stack_frame class heap second = new heap(5);// object of heap class first.set(2,7.1);// calling set function of main_stack_frame first.set(1,4.9) second.set(0,9.1);// invoking set methd of heap class second.set(1,8.4); } }

×