Draw an E-R diagram for the singly linked list implementation from sequences-int.zip, accounting for the classes Sequence, SinglyLinkedList, SinglyLinkedListNode, their properties, and the relations between them. You don't need to represent anything other than this in the E-R diagram (e.g., the methods, or any classes other than those mentioned).
Create an abstract class named Queue, specifying an interface for queues of integer values, declaring the pure virtual functions enqueue and dequeue with appropriate parameter types and return types.
Extend SinglyLinkedList from sequences-int.zip so that it implements the Queue interface, i.e., so that it becomes a concrete subclass of the abstract class Queue.
Turn DoublyLinkedList and DynamicArray into concrete subclasses of Queue as well.
Run a performance test (runtime measurements) on all the three queue implementations obtained in this way as well as the STL queue, all for code compiled in production mode (with the -O3 compiler flag). Discuss your results.
We will be looking into the N-queens problem and variants of it. For now, use an E-R diagram to design code for an m x n chessboard with queen figures on it, accounting for at least the following:
Relevant relations can include those that would intuitively connect these classes; e.g., a chess piece can be part of a configuration, and any configuration is one out of many that are possible for the given shape of the chessboard. In addition, a chess piece may be in a position to beat another, i.e., it may be threatening it.
You can add any other items to the above that you deem appropriate or helpful.
Based on your E-R diagram, discuss: Do you want any of your classes to act as a container for objects of the other classes? If yes, explain your design choice. If no, explain how you would plan to handle memory management safely.
For which of the classes would you write which of the following: A constructor (or multiple constructors)? A destructor? A copy constructor and copy assignment operator?
Implement the code you designed above, including functionality for checking whether there are any threatened chess pieces in a configuration.
For a 24x24 board, write code that places k queens on random fields and then calls the function checking for threats to any of the queens. How does the performance of your code scale as a function of k?
(submit through Canvas by end of 12th March 2024)