Computer Science, asked by neelshah4903, 9 months ago

Define a class Addition which allows the user to add elements from one end (rear) and remove elements from the other end (front) only. The following details of the class Addition are given below: Class Name : Addition Data members/instance variables: St[ ] : an array to hold maximum of 100 integer elements cap : stores the capacity of the array. f : to point the index of the front. r : to point the index of the rear. Member functions/methods : Addition(int m) : constructor to initialize the data members cap =m, f=0, r=0 and to create the integer array. void pushFront(int v) : to add integers from rear index if possible else display the message “FULL”. int popValue( ) : to remove and return element from the front. If array is empty then return -9999. void display( ) : Displays the elements present in the list. (a) Specify the class Addition giving details of ONLY the constructor and member functions void pushFront(int v) and int popValue( ). Assume that the other functions are already defined. The main() function need not be written. [5] (b) What is the common name of the entity described above? On what principle does the above structure work. [2]

Answers

Answered by buneetu033
0

Answer:

are bhai thoda aur chota question nhi tha kya

Similar questions