Uss c++ to do this and make sure to test your program for all the methods listed
ID: 3588458 • Letter: U
Question
Uss c++ to do this and make sure to test your program for all the methods listed. Also, use template. Thanks In this task you are asked to implement and test LinkedList Queue a queue data structure using linked list. Your program has to include at least three files; A header file with your queue class, the implementation of LinkedList Queue, and a main function that tests all of your methods and operations. Your LinkedList_Queue has to include at least the following methods and operations: 1. The default constructor LinkedList_Queue : LinkedList_Queue (int maxNumber = MAX OUEUE SIZE) 2. The copy constructor LinkedList_Queue ::LinkedList_Queue (const LinkedList_Queue & other) 3. The destructor: LinkedList_QueueExplanation / Answer
#include #include #include class Cpu { public: virtual int dummy( int, int ) {} private: virtual int add_( int a, int b ) { return a + b; } /* A */ virtual int sub_( int a, int b ) { return a - b; } /* B */ virtual int mul_( int a, int b ) { return a * b; } /* C */ virtual int div_( int a, int b ) { return a / b; } /* D */ virtual int mod_( int a, int b ) { return a % b; } /* E */ virtual int and_( int a, int b ) { return a & b; } /* F */ virtual int or_( int a, int b ) { return a | b; } /* G */ virtual int xor_( int a, int b ) { return a ^ b; } /* H */ }; int main( int argc, char* argv[] ) { typedef int (Cpu::*Memfun)( int, int ); union { Memfun fn; unsigned char ptr[6]; } u; Cpu cpu; u.fn = &Cpu::dummy; assert( argc == 4 ); int p1 = atoi( argv[ 1 ] ); int p2 = atoi( argv[ 3 ] ); char op = argv[2][0]; assert( op >= 'A' && opRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.