Draw the UML diagram of the class queueADT. (8) Consider the following statements: linkedQueueType queue; linkedStackType stack; long long num; int digit1, digit2;  Show what is output by the...


Draw the UML diagram of the class queueADT. (8)


Consider the following statements:


linkedQueueType queue; linkedStackType stack;

long long num;


int digit1, digit2;


 Show what is output by the following segment of code, if the input is 837298651020706. (4, 10)


cin >> num;


num = abs(num);


while (num > 0)


 {


    stack.push(num % 10);


    num = num / 10;


}


while (!stack.isEmptyStack())


{


    queue.addQueue(stack.top());


    stack.pop();


 }


if (!queue.isEmptyQueue())


{


    digit1 = queue.front();


    queue.deleteQueue();


 }


while (!queue.isEmptyQueue())


 {


    digit2 = queue.front();


    queue.deleteQueue();


    cout <><>


    digit1 = digit2;


 }


 cout




May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here