I'm working on a computer science question and need support to help me learn.
Please read the instructions carefully.
Overview
In this assignment, students will implement a Data Structure in C++ that fulfills the requirements of both the List and Queue Abstract Data Types (ADTs). Students shall achieve this through multiple inheritance.
After completing this assignment, students will:
The class instructor shall provide students with several files that constitute a project. These include the following:
| File | Description |
| main.cpp | The driver test file (do not modify) |
| Queue.h | The pure, virtual 'interface' file (do not modify) |
| List.h | The pure, virtual 'interface' file (do not modify) |
| CircularArray.h | The student implementation of the data structure that meets the requirements specified herein. |
Note: The versions of the above files will change as the assignment progresses and oversights become apparent. The class instructor will announce on Canvas when a new version of the file is available for students.
Using these files, students shall develop their own, original source code for the CircularArray.h methods. Ultimately, students must deliver a CircularArray that correctly performs the actions specified in the two interface files. For example, every Queue must provide an enqueue operation, so students must develop this code in their own CircularArray file. For full credit, however, the final product must meet the complexity performance requirements we expect from this style of structure. Thus, adding a single item to the array must occur in constant time.
Moreover, simply creating a Circular Array, although thrilling, pales in comparison to the joy of creating one that includes buffer space and automatically expands and contracts to match the data. Therefore, the circular array for this assignment shall also behave like an array-list (or vector) by dynamically adjusting its size in response to the data it stores. Students will implement two data structures for the price of . . . two really. Both aspects of the assignment require significant work and conceptualization.
The files Queue.h and List.h define the exhaustive set of methods students must implement. The file CircularArray.h has a boiler-plate already built with the required functions, so students need only provide their unique code.
The CircularArray must demonstrate O(1) behavior for addFirst and addLast. Achieving O(1) behavior for add with a standard array is trivial, but removing the first element is impossible in under O(n). A circular array, however, makes removing from the front fast and efficient.
The CircularArray must include a buffer like Vectors and ArrayLists do, and grow dynamically in response to adding and removing items. Thus, some specific insertions and removals from the CircularArray will take longer than O(1), for the data structure occasionally resizes, but the expected value is that the time will remain constant. Students may not use the standard library vector for this purpose and must implement their own version. It is annoying, but a necessary part of the education.
On or before the due date, students shall submit their version of CircularArray.cpp and the output their program produced when they ran it locally. The instructors and graders do not require any of the instructor provided files that the students were instructed not to modify. The instructor will use the original versions of these files to make certain no modifications took place.
Grading is a Scam (and Motivation is a Myth) | A Professor Explains – YouTube (Links to an external site.)
Woops. I accidentally included that link. Please ignore it.
You earn points on this assignment through the following ways:
| Points | Requirement |
| -5 | You can earn negative points (woo-hoo!) by not including your name in the file comment in the CircularArray.cpp source file. |
| 5 | Project compiles with the instructor's files and the student's CircularArray.cpp file. |
| 5 | CircularArray uses a buffer and dynamically resizes based on contents. |
| 5 | enqueue() O(1) average complexity. |
| 5 | dequeue() O(1) average complexity. |
| 5 | Student supplies example of running output (e.g. screen redirect). |
| 5 | Clean code with consistent formatting, intelligent variable names, and including helper functions (like resizing) when necessary. |
In this assignment, students may not use external libraries or data structures. In reality, you absolutely would, and there would be no reason to do it the way we are doing it here. That said, we ARE here, so doing it the hard way is a must. It's not about having a working CircularArray from you because I need it to save the planet from being hit by a giant meteor — I have Bruce Willis for that. I will never actually use these CircularArrays for anything. Even the great ones! We do it this way here because it allows us to talk about and use some common programming techniques that will apply in the real world. Also, if you were annoyed because I said meteor and you know full well it was an asteroid, I am unspeakably proud.
Modifying the instructor-only files opens a path to danger. Frequently, students make a *tiny* change and forget about it, and this small change ends up preventing the program from compiling when used with the original files on my computer. In my experience, modifying the instructor files leads to frustration, and frustration turns to anger, anger turns to hate, and hate leads to Star Wars references. Unfortunately, although entertaining, these are not yet usable as currency. Somehow, you knew this . . . somehow, you always knew. Hopefully, however, I've made the request in such an overwhelmingly ridiculous way that you will hear it. Work on CircularArray.h, leave the other files alone, and NO disintegrations!
Before starting work, make certain you understand the requirements. I promise, it will save you time. Use the synchronous class time to clarify everything you need. I will happily answer a question someone already asked, so ask away.
Try to write as many methods in terms of other methods as possible here. There is no reason to have add(index), addFront(), and addLast() all modify the list. Instead, have addFront and addLast CALL add(0) or add(size()). This substantially simplifies the testing you need to perform. If you know add(index) works, and you use that for addFront and addLast, then you don't really need to thoroughly test the latter two methods.
Circular Arrays: Circular buffer – Wikipedia (Links to an external site.)
Array List/ Vector: Dynamic array – Wikipedia (Links to an external site.)
For additional, optional, insight into virtual destructors:Virtual Destructors in C++ – YouTube (Links to an external site.)
If you have the prerequisites, then I don't expect you to understand most of Cherno's video the first time through. It is, however, a great lead in to a helpful channel for learning to code in C++.
Try it now!
How it works?
Follow these simple steps to get your paper done
Place your order
Fill in the order form and provide all details of your assignment.
Proceed with the payment
Choose the payment system that suits you most.
Receive the final file
Once your paper is ready, we will email it to you.
Our Services
Ace Writing Center has stood as the world’s leading custom essay writing services providers. Once you enter all the details in the order form under the place order button, the rest is up to us.
Essays
At Ace Writing Center, Nowadays, students normally have extremely busy schedules. You will note that some of them have to take on some evening or weekend jobs in order to get some income that can help them to sustain in college or in the university. This can deny them a chance to write all the essays given. Others usually get bombarded with a lot of work by their lecturers. This can still delay such students from working on all their essays. However, some of them usually try to work on all these essays but end up delivering their work late. This can prevent them from graduating since most lecturers are strict on deadlines. If you want to write a business essay, the wise way is to hire an outstanding essay writing service like us, so that you can get the best results. If you are keen, you will note that many companies usually overcharge their customers. Some of them are there only to make money. And in reality, they really don’t care to build a long term commitment with students. You should not choose such companies. You should take your time and choose a reliable company to work with. Ace Writing Center is the ultimate solution for you. We have been offering our writing service for more than 7 years. This is a clear indication that you will get quality essay writing service. We have a wide range of writers who can work on any business essay that you might have. We believe in doing extensive research so that we can provide quality work to all our clients. .
Admissions
Admission and Business Papers
Have you ever had to write an admission essay for college? The majority of students face the same issues when applying to a university or college and many in such situations decide they need professional help to cope with this matter. They get in a situation when the deadline keeps coming closer but lack motivation to start because they are just not sure if their writing skills are strong enough. We have a solution for you! Ace Writing Center is the best admission essay writing service with a large professional team and years of experience in providing high-quality papers to students of all levels and faculties. The mission of our team is to help students make their dreams of entering a good college come true and that’s what we offer!.
Editing
Editing and Proofreading
Sometimes all the words for your paper just flow out of your mind and into your fingers. You type quickly at your keyboard and there they are, your beautiful words right there on the screen. But you have no idea how to polish it up. You may be wishing there was a paper writing service that offered this type of writing service. Look no more! Here at Ace Writing Center, we offer you an editing and proofreading option that you can't find anywhere else..
Coursework
College Essay Writing
In case you are familiar Ace Writing Center, you know the way to distinguish a better company from a cheap one exactly. First of all, poor service website does not have a sufficient support. We think support team is an essential part of success; it has to answer all clients’ questions and be a connecting link between clients and their writers. On our web-service you will get answers about anything you need and your writer will receive all your instructions, assignments and requirements exactly and swiftly. A writing service that we run has got a flexible pricing system that will save you from senseless wastes and many bonus systems that let you sparing money for something important for you.