Write a program in C to implement the following in a queue of size 9: Read the input from keyboard a. Enqueue first 6 digits of your phone number. Display location of front and back pointers, and elements of queue. b. Dequeue 5 times. Display location of front and back pointers, and elements of queue. c. Enqueue last 4 digits of your phone number. Display location of front and back pointers, and elements of queue. d. Dequeue 5 times. Display location of front and back pointers, and elements of queue.
Q: pose for many fact taBles, and how do th
A: Is there a purpose for many fact taBles, and how do they function?
Q: Is it more likely that a new smartphone will run Windows 8, OS X, or Android? Explain your response.
A: An OS is a software interface that is responsible for managing and operating hardware assisting the ...
Q: What are the two sorts of files that exist in general? What is the distinction between these two typ...
A: Given :- What are the two sorts of files that exist in general?What is the distinction between these...
Q: Write a program that accepts a number imput and checks if the difference between the sum of digits a...
A: here we have written a program in c which accepts a Fibonacci number and check the difference betwee...
Q: Make a list of six different access technologies. Each one should be classified as either home acces...
A: Introduction : There are six different types of access technologies: Dial-up modem: 56kbps maximum t...
Q: ) If binary tree and binary search tree are to be used in storing data in a database, explain givin...
A: In binary search tree all the elements at left subtree are less then root and all elements at right ...
Q: 12,13,14, 15 public static void m { int c = 12; while( { System.out.
A: Below the output of the following program
Q: A- System.out.print(Math.floor(5.7)); Answer please
A: Introduction: System.out.print(Math.floor(5.7)); The question was asked directly. Make use of the fl...
Q: Which of the following propositions is tautology O a. p ^ (-p V q) → -p O b. -p ^ (p V q) → p O c. -...
A: The use of lexical items to convey a same thing in a different way in the same argument is known as ...
Q: As shown in the figure below, computer A will send a data packet to computer B, which is in a differ...
A: Given network diagram contains 2 different networks which are connected through a Router R and each ...
Q: What is a relational database, and how does it work?
A: Database relational: - It is a collection of data that enables quick access to data sources via esta...
Q: For each of the following pairs of functions ff and gg, circle one of the answers f \in o(g), f \in ...
A: 1. option b
Q: Multitasking is defined as the ability to do many tasks at the same time.
A: What is Multitasking is given below :
Q: Write a C# program that initializes 15 values in array and prints all the multiples of 15.
A: This program is related to C# and here to print the values, Where 15 is entered by user upto 15 valu...
Q: In Java, Describe a real world application for a Map that uses hashing. Explain what your key and ...
A: The real world example is JAVA Spring Boot : The Java Spring boot is used as a backend development t...
Q: hexadecimal 2. values and show 1. 6 7 5 5 6 16 6 7 8 2 2 9 10 your complete solution + 7 6 7 7 5 + 5...
A: 1) 2) 3)
Q: The Humane Society’s goal is to find adoptive homes for each of the animals in their care. Design a ...
A: lst=[]week=0tot=0num = int(input('How many days: '))for n in range(num): n = int(input('Enter num...
Q: Describe the characteristics and duties of the data management system that solved traditional file m...
A: Security Management This is one of the foremost important functions within the DBMS. Security manage...
Q: Discuss the principal threats to the operating system and the control techniques used to minimize th...
A: Some major threats of operating system : The following are a couple of the most well-known danger ve...
Q: Make a distinction between the three levels of data modeling
A: Data modeling is a process of creating the data model. This contains mainly three phases which are u...
Q: In this python program, convert into java program please. Thank you Source Code: print("The fun...
A: print("The function is f(x)= 2x+3(2)")print("Width is 0.05")lowLim=float(input("Enter Lower Limit: "...
Q: Define and briefly describe eprescribing. In addition, list the components of an ePrescribing System...
A: Introduction: Electronic prescribing, often known as e-prescribing, is a technology framework that a...
Q: Recall that multiplication is just repeated addition. Write a program called Product.java that promp...
A: Importing modules Create class Define main method Declare variables Take input for the integers from...
Q: Random access memory (RAM) is a kind of computer memory that works in a variety of ways. Separate th...
A: RAM and how it works In computer terminology, random access memory (RAM) is a read/write memory tha...
Q: 1. Use C PROGRAMMING LANGUAGE ONLY 2. Use RECURSION type of program 3. Copy and paste your code(no n...
A: #include <stdio.h>int quotient(int a, int b){ return a / b;} int main(){ int a, b, quo; ...
Q: Captcha protects against data corruption and spam? How? Explain your response.
A: Introduction: CAPTCHA (Completely Automated Public Turing Test to Tell Computers and Humans Apart) i...
Q: selection algorithm SEL that can be called on A and B separately and, in addition, a small number (s...
A: the answer is an given below :
Q: n O(n log n) time and finds the longest sequence of moves. Do not write the code, give steps and me...
A: given - Given n distinct integers on an array and a positive integer K. step1. choose any two intege...
Q: 1. Use C PROGRAMMING LANGUAGE ONLY 2. Use RECURSION type of program 3. Copy and paste your code(no n...
A: Given: To write a C program to find quotient of two numbers.
Q: Why should I use the CYMK colour model instead of the RGB colour model for blow ups?
A: Introduction: CMYK is a colour model that is commonly used in printing. It is a subtractive colour m...
Q: java There is only one type of constructor and it is a constructor that does not take any parameter...
A: Java Constructor are a methods that get invoked whenever we call the class for which the constructor...
Q: Computer Science Your supervisor has unveiled what she firmly believes is a great new plan that wil...
A: Answer : From- Sender's name To- Supervisor's name Subject - Important suggestions regarding the pla...
Q: RTC means?
A: Introduction: Real-time computing (RTC) refers to hardware and software systems that are subject to ...
Q: There are two notation to represent real numbers in C++ floating Decimal notation O Exponential nota...
A: 1) all the above Both exponential and decimal
Q: Discuss addressed-based solution against session hijacking, highlighting its limitations. For the to...
A: The answer of this question is as follows:
Q: Write a php program to take the current room temperature from the user in degree celsius and try to ...
A: Required:- Write a PHP program to take the current room temperature from the user in degree celsius ...
Q: RSA problem: given plaintext P, e, prime numbers p, q, compute ciphertext C. Decrypt C and verify yo...
A:
Q: Assuming there is a class that uses JavaFX to build a GUI, write the header for the method that acts...
A: JavaFX Application Structure: Stage A stage (a window) includes all the objects of a JavaFX software...
Q: Let's say that an employee's regular pay is rate times hours. If they work more than 40 hours, they ...
A: Solution: Given, If they work more than 40 hours, they get time and a half. In that case, we subt...
Q: A sample SPF computation
A: Given To know about the sample SPF computation
Q: actoring is a powerful simplification technique in Boolean algebra, just as it is in real-number alg...
A: A. F = Y + YZ F = Y(1+Z) F = Y {1+Z=1} F=Y
Q: Microcontroller (PIC16F877A) : GOTO instruction: I need some explanation about this instruction (GO...
A: Microcontroller: A microcontroller is a compact integrated circuit designed to govern a specific ope...
Q: In what way does data mining differ from other methods? Give an example of a data mining job descrip...
A: Introduction : Data mining is the process of collecting information from data by identifying pattern...
Q: REMINDER: - Every recursive function must have one or more base cases, - The general (recursive) cas...
A: The answer given as below:
Q: Assume x goes to $s0, y goes to $s1, and z goes to $s2. Convert the following MIPS code to C. sub $...
A: So here we have to provide equivalent C code for given MIPS code Sub $s2 , $s0, $s1
Q: Convert 109 (base 10) from decimal to hexadecimal, showing the steps of your computation. • Convert ...
A: Introduction: Here we are required to convert from decimal to hexadecimal and vice-versa in 2nd part...
Q: Heapsort analysis in python or java implement the Heapsort algorithm. Include a counter so at the e...
A: Heap Sort Algorithm It is a data structure which is a complete binary tree All the levels are compl...
Q: Contrast the layered architecture of IoT with the TCP/IP approach.
A: The TCP/IP stack is a new addition to the OSI (Open-Systems-Interconnection) architecture. It really...
Q: Enumerate three examples, each for series and parallel connections
A: A series connection is any switch in your home that controls a single bulb. The light and the switch...
Step by step
Solved in 2 steps
- The implementation of a queue in an array, as given in this chapter, uses the variable count to determine whether the queue is empty or full. You can also use the variable count to return the number of elements in the queue. On the other hand, class linkedQueueType does not use such a variable to keep track of the number of elements in the queue. Redefine the class linkedQueueType by adding the variable count to keep track of the number of elements in the queue. Modify the definitions of the functions addQueue and deleteQueue as necessary. Add the function queueCount to return the number of elements in the queue. Also, write a program to test various operations of the class you defined.In C++, Write a program which is menudriven ( i) Enque, ii) Deque, iii) Peek iv) Print). It will create a circularQueue of integer type data using array. You have to implement the followingoperations.a. Enqueue (Insert a data to the queue)b. Dequeue (Remove an item from the queue and printit)c. Peek (Print the item at the Front)Print (Print the elements present at the queue)Write a method that uses two data structures, a stack and a queue, to split numbers The numbers must be split into even and odd numbers. If the number is odd and divisible by 3, it is added into the queue; otherwise the top element, if any, of the stack is removed and the square of the number is added onto the stack.
- Write a C++ program for the following question: Given a queue of integers, rearrange the elements by interleaving the first half of the list with the second half of the list. For example, suppose a queue stores the following sequence of values: [11, 12, 13, 14, 15, 16, 17, 18, 19, 20]. Consider the two halves of this list: first half: [11, 12, 13, 14, 15] second half: [16, 17, 18, 19, 20]. These are combined in an alternating fashion to form a sequence of interleave pairs: the first values from each half (11 and 16), then the second values from each half (12 and 17), then the third values from each half (13 and 18), and so on. In each pair, the value from the first half appears before the value from the second half. Thus, after the call, the queue stores the following values: [11, 16, 12, 17, 13, 18, 14, 19, 15, 20].write a code in c++ and implement an Emergency Room Patients HealthcareManagement System (ERPHMS) that uses stacks, queues, linked lists, and binary search tree The system should be able to keep the patient’s records, visits, appointments, diagnostics,treatments, observations, Physicians records, etc.It should allow you to1. Add new patient2. Add new physician record to a patient3. Find patient by name4. Find patient by birth date5. Find the patients visit history6. Display all patients7. Print invoice that includes details of the visit and cost of each item done8. Exit PLEASE SHOW THE CODEWrite a program that maintains a personal phone book in C. The program allows to:▪ Add and Delete entries from the phone book,▪ Search the phone book for a specific entry by last name or by phone number, and▪ Print out the entire entries in the phone book.The data in the phone book is maintained by storing in memory with the use of a singly linked list, withone list node per entry. Each node contains members for storing a person’s family name, first name, address,and the phone number. Use strings to store this information. The linked list must be kept in increasingalphabetical order, sorted by family name. There are no duplicate entries with the same family nameallowed in the phone book. This program should be menu driven, with the user being offered a choice of the following commandsdescribed below:▪ Insert a new entry into the phone book.The program should prompt the user for a new family name and first name, an address and a phonenumber. This information should be placed in a new…
- Write a program that maintains a personal phone book in C. The program allows to:▪ Add and Delete entries from the phone book,▪ Search the phone book for a specific entry by last name or by phone number, and▪ Print out the entire entries in the phone book.The data in the phone book is maintained by storing in memory with the use of a singly linked list, withone list node per entry. Each node contains members for storing a person’s family name, first name, address,and the phone number. Use strings to store this information. The linked list must be kept in increasingalphabetical order, sorted by family name. There are no duplicate entries with the same family nameallowed in the phone book. This program should be menu driven, with the user being offered a choice of the following commandsdescribed below:▪ Insert a new entry into the phone book.The program should prompt the user for a new family name and first name, an address and a phonenumber. This information should be placed in a new…program in C# the following sequence: S1 = N; S2 = S1 + 1; S3 = 2*S1 + 1; S4 = S1 + 2; S5 = S2 + 1; S6 = 2*S2 + 1; S7 = S2 + 2; … Using the Queue class, write a program in C# which by given N prints on the console the first 50 elements of the sequence. Example: N=2 2, 3, 5, 4, 4, 7, 5, 6, 11, 7, 5, 9, 6, …Write a program for implementing queue using linked lists, for which you should use a structure to create a node with data and the next pointer. The program should be able to insert, delete and display nodes in the queue. The user will be asked to enter his choice either to insert a node (enqueue), delete a node (dequeue), display or to exit from the program.The options for the user should be as the following:1. Insert a node (Enqueue)2. Delete a node (Dequeue)3. Display4. Exit For example if user selected option 1 then the following should appear in the output:Enter the value to insert:Node is inserted If user selected option 2 then the following should appear in the output:Deleted Element is: If the user selected option 3 then the program should display the elements that are available in the queue The program will keep on running and taking inputs from the user until he selects the 4th option to exit.
- Write a java function toRemoves the element at the front of this queue and returns a reference to it. return the element removed from the front of the queue throws EmptyCollectionException if the queue is empty.Write a c program for implementing queue using linked lists, for which you should use a structure to create a node with data and the next pointer. The program should be able to insert, delete and display nodes in the queue. The user will be asked to enter his choice either to insert a node (enqueue), delete a node (dequeue), display or to exit from the program. The options for the user should be as the following: 1. Insert a node (Enqueue) 2. Delete a node (Dequeue) 3. Display 4. Exit For example if user selected option 1 then the following should appear in the output: Enter the value to insert: Node is inserted If user selected option 2 then the following should appear in the output: Deleted Element is: If the user selected option 3 then the program should display the elements that are available in the queue The program will keep on running and taking inputs from the user until he selects the 4th option to exit.Write a program using the data structure language java I created a medical clinic in which I know the variables of the patient's name, age, number and case description And enter the data in a linked list, stack, queue, binary tree, provided that the program is without importing ready offices or ready functions