using c++ dynamic queue. i want the output to be like that image . you can refer phython at this link. https://runestone.academy/ns/books/published//pythonds/BasicDS/SimulationPrintingTasks.html
the situation is .
On any average day about 10 students are working in the lab at any given hour. These students uses the
shared printer in the lab to print their assignments and reading materials. The time
taken for printing tasks varies from one another depending on the pages volumes
printed by students. Students can send printing instructions from any terminals
attached to same network of the printer. Hence, many students can do so at once
take note that i want it in c++ dynamic queue.
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
- Using Java. Implement a deque, except base your implementation on an array. The constructor for the class should accept an integer parameter for the capacity of the deque and create an array of that size. Use a graphical user interface based on an array of text fields similar to what is shown in the image attached. Test your deque class by constructing a deque with capacity 10. Below also is an unfinished code for the challenge. #################################Array Based Deque################################# public class ArrayBaseDeque{private String [ ] q; // Holds queue elementsprivate int front; // Next item to be removedprivate int rear; // Next slot to fillprivate int size; // Number of items in queue private int count = 0;/**Constructor.@param capacity The capacity of the queue.*/ArrayBaseDeque(int capacity){q = new String[capacity];front = 0; rear = 0;size = 0;}/**The capacity method returns the length of the array used to implement the queue.@return The capacity of the…arrow_forwardimplement a database about people, they could be made up, but you want to include a sizable number, maybe 10-20. The data that you store for each person must include a name and at least one additional piece of information, such as a birthday. You can assume that the names are unique. The database should enable you to enter, remove, modify, or search this data. You also should be able to save the data in a file for use later. Define a class Person to represent a person and another one to represent the database. A dictionary should be a data member of the database class, with Person objects as search keys for this dictionary. Write a program that tests and demonstrates your database.arrow_forwardIn Python write out the Python Code for the following in Jupiter Lab. Show code and outputs. Use a data set and build 3 different pivot tables that each have a least a different index row or column. (You cannot build 2 pivot tables that have the same index rows and columns but aggregate differently. You also cannot simply flip the index rows and columns.) For each pivot table, build a graph.arrow_forward
- codearrow_forwardThe language is Java. Given my code, I want to make my output look like the first part of the first image's output, but with the numbers in my output. The other two pictures are of my code. I want to make the output look like a tree, as opposed to being close together like that. Thanks.arrow_forwardMovie Recommendations via Item-Item Collaborative Filtering. You are providedwith real-data (Movie-Lens dataset) of user ratings for different movies. There is a readmefile that describes the data format. In this project, you will implement the item-item collab-orative filtering algorithm that we discussed in the class. The high-level steps are as follows: a) Construct the profile of each item (i.e., movie). At the minimum, you should use theratings given by each user for a given item (i.e., movie). Optionally, you can use other in-formation (e.g., genre information for each movie and tag information given by user for eachmovie) creatively. If you use this additional information, you should explain your method-ology in the submitted report. b) Compute similarity score for all item-item (i.e., movie-movie) pairs. You will employ thecentered cosine similarity metric that we discussed in class. c) Compute the neighborhood set Nfor each item (i.e. movie). You will select the moviesthat…arrow_forward
- I'm interested in creating a digital personal assistant similar to Alexa and Siri, which can efficiently manage schedules. Specifically, I want to design a tool in Java that allows users to find events during a certain time period. This tool should also enable users to add and cancel events as their schedules change. To achieve this, I plan to use a SkipListMap class with specific operations (get, put, remove, subMap) and a DoublyLinkedList class. Additionally, I'll use the FakeRandomHeight class for debugging and testing. Could you provide guidance on how to approach this project, especially in terms of implementing the SkipListMap class and managing event data efficiently? Sample Input: AddEvent 101910 BreakfastAddEvent 101913 LunchAddEvent 101918 DinnerGetEvent 101914AddEvent 101911 Data StructuresAddEvent 102007 ExercisePrintSkipListAddEvent 101915 HomeworkCancelEvent 102007AddEvent 102013 RelaxAddEvent 102011 Read a BookGetEvent 101915AddEvent 101914 Call MomPrintSkipList I…arrow_forwardYou have to use comment function to describe what each line does import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class PreferenceData { private final List<Student> students; private final List<Project> projects; private int[][] preferences; private static enum ReadState { STUDENT_MODE, PROJECT_MODE, PREFERENCE_MODE, UNKNOWN; }; public PreferenceData() { super(); this.students = new ArrayList<Student>(); this.projects = new ArrayList<Project>(); } public void addStudent(Student s) { this.students.add(s); } public void addStudent(String s) { this.addStudent(Student.createStudent(s)); } public void addProject(Project p) { this.projects.add(p); } public void addProject(String p) { this.addProject(Project.createProject(p)); } public void createPreferenceMatrix() { this.preferences = new…arrow_forwardYou are given a list of projects and a list of dependencies (which is a list of pairs ofprojects, where the second project is dependent on the first project). All of a project's dependencies must be built before the project is. Find a build order that will allow the projects to be built. If there is no valid build order, return an error.EXAMPLEInput:projects: a, b, c, d, e, fdependencies: (a, d), (f, b), (b, d), (f, a), (d, c)Output: f, e, a, b, d, carrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education