Question: Need help with a project for c++ in visual studion rubric: Queue Class: Write a Queue class using doubly-linked structure and implement the following functionalities.

Need help with a project for c++ in visual studion

rubric:

Need help with a project for c++ in visual studionrubric: Queue Class:Write a Queue class using doubly-linked structure and implement the following functionalities.1. enqueue {inserts element to the end} 2. degueue {removes the frontelement and provides content) 3. isEmpty {checks whether the Queue is empty

Queue Class: Write a Queue class using doubly-linked structure and implement the following functionalities. 1. enqueue {inserts element to the end} 2. degueue {removes the front element and provides content) 3. isEmpty {checks whether the Queue is empty or not]| 1,. ma IteErnpty [J 5. peek {provides the element sitting at the topi'front, but does not remove] .print [prints all the elements from front to the end) 1. reversePrint{prints all the elements from end to the front with the help of back pointers inside your nodesi Faceboolc Class: You're going to #include the Queue class in your Facehook class that will have the following functions and data members: Functions: 1. addFriend: a given Friend should he added to the Friend list which is a Queue object. That means when you call this function engueue function from Queue should be triggered and the new Friend should he added to the end of your Queue. 2. removeFriend: you don't have to pass a user nameJr but wheneverthis function is called the degueue function from Queue should be triggered. That means the Friend at the front should he removed from the list and hislher name should he provided. 3. printFriendsF{}: this should trigger the print{} function of Queue so that you can print all the Friends from front to the end. 1,. printFriendsRIIi: this should trigger the reversePrint{J function of Queue so that you can print all the Friends from end to the front. 5. firstFriend{1I: this should trigger the peek function of Queue so that you can print the Friend who was added first. 45. resetFriendsIE}: this should triggerthe malteEn'I pty function of Queue so that your list can be emptied. :r. checklistl}: this should trigger the isEn'Iotyt} function of Queue to verify that your list is empty. Data members: 8. "int numofFriends" to keep track of the total number of Friends 9. "DataType user" who's going to be followed. 10. "QueueFriendlist" (this is the Friendlist in a Queue form, not an array!) Main Program: Your main program should #include the Facebook class and read the presidents and their home states in the file attached. This implies that it should work with Queue that we defined in earlier assignments. Additionally, your main program should satisfy the following conditions: 1. As you read the presidents and their home states from the file, your addFriend() function should enqueue them into the Friendlist. All presidents become Friends. 2. Call firstFriend() function to see the earliest president name and state (It should be George Washington, VA) and print it on the screen. 3. Call removeFriend() function and print the name and the home state of the removed president. (we need to see George Washington, VA on the screen again) 4. Call printFriendsF() to display all the names with their states (You can use your earlier print function) 5. Call printFriendsR()to display all the names with their states in reverse order. 6. Call resetFriends() to remove all Friends . 7. Call checklist to verify that your Facebook object has an empty Friendlist and report your finding with a message on the screen. Recommendation: 1. Please first make sure that your Queue works properly. To test that, design a main program for yourself and test all the functions to see if they are working. 2. Design your test main program in a way that it should read the file from text. Please see the earlier examples which help your program read from a tab-report your finding with a message on the screen. Recommendation: 1. Please first make sure that your Queue works properly. To test that, design a main program for yourself and test all the functions to see if they are working. 2. Design your test main program in a way that it should read the file from text. Please see the earlier examples which help your program read from a tab- delimited file. 3. Once you're comfortable with your Queue class, then you can #include it inside your Facebook class and design your Facebook functions accordingly. 4.I use parentheses to indicate something is a function. I don't mean to indicate that function takes parameter or not by leaving the inside of parentheses empty.\f

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!