(ii) destructor, invoked when object goes out of scope c) (i) Correct syntax for class and private members ½ + ½ declaration (ii) default constructor 1 (iii) function setPrice() definition 1 (iv) function setdetails(), display() definitions 1 d) (i) Hierarchical inheritance 1 (ii) Location, Area, Sale 1 (iii) Enter(),Show(),Register(),ShowC() 1 (iv) Input(),Output() 1 3 a) Any correct logic 3M b) 1 mark for formula 1+2 2 marks for procedure and result c) Any correct logic 2 d) 1 mark for showing step by step stack contents 1+1 1 mark for final answer e) void insert() 4 { If(rear=size-1 && front ==0|| front=rear+1) { cout<<”queue full….”; return; } else if( rear= -1){ rear++; front++;} else if(rear==size-1) rear=0; else {
(ii) destructor, invoked when object goes out of scope c) (i) Correct syntax for class and private members declaration (ii) default constructor (iii) function setPrice() definition (iv) function setdetails(), display() definitions ½ + ½ 1 1 1 d) (i) Hierarchical inheritance (ii) Location, Area, Sale (iii) Enter(),Show(),Register(),ShowC() (iv) Input(),Output() 1 1 1 1 3 a) Any correct logic 3M b) 1 mark for formula 2 marks for procedure and result 1+2 c) Any correct logic 2 d) 1 mark for showing step by step stack contents 1 mark for final answer 1+1 e) void insert() { If(rear=size-1 && front ==0|| front=rear+1) { cout<<”queue full….”; return; } else if( rear= -1){ rear++; front++;} else if(rear==size-1) rear=0; else { 4
513150762sample_paper_cpp_class_xii.docx