Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Uss c++ to do this and make sure to test your program for all the methods listed

ID: 3588350 • 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_Queue

Explanation / Answer

#define read_buffer_size 8192


int main(int argc, char* argv[])
{

   //file descriptor for opening and closing

   int file_descriptor; //size of buffer for file reading
   char read_buffer[read_buffer_size];
   ssize_t read_bytes;


   //looping through all files given in argument
   int i;
   for(i=1;i    {
           //using linux system call open file with readonly flag
       file_descriptor = open (argv [i], O_RDONLY);
           //if file not opened
       if (file_descriptor == -1)
       {
           perror ("open");
           printf("file can not be opened : %s ",argv[i]);
       }
  
           else
           {
               while((read_bytes = read (file_descriptor, &read_buffer, read_buffer_size)) > 0)
               {  
                   printf("%s",read_buffer);
               }
               //once done with file closig the file using file descriptor

               close (file_descriptor);
           }
     }

   return (EXIT_SUCCESS);
}