Concept explainers
I have been given a project called "Assassin" friom my computer science class, and I cannot seem to be able to create the correct methods in order to run this code properly. I am going to paste my current code for this project. If you would like the instructions, please allow me to either email or create another query, as the instructions are on a word document. Please offer assitance if you can, thank you.
My current code:
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 6 images
While your code does work, there is the problem of the constraints put on us for this project. I will paste them from the instructions document.
Constraints
• You may not construct any arrays, ArrayLists, LinkedLists, Stacks, Queues, or other data
structures; you must use list nodes. You may not modify the list of Strings passed to your constructor.
• If there are n names in the list of Strings passed to your constructor, you should create exactly n new AssassinNode objects in your constructor. As people are killed, you have to move their node from the kill ring to the graveyard by changing references, without creating any new node objects.
• Your constructor will create the initial kill ring of nodes, and then your class may not create any more nodes for the rest of the program. You are allowed to declare as many local variables of type AssassinNode (like current from lecture) as you like. AssassinNode variables are not node objects and therefore don’t count against the limit of n nodes. You should write some of your own testing code. AssassinMain requires every method to be written in order to compile, and it never generates any of the exceptions you have to handle, so it is not exhaustive.
Would it be possible to adjust the code within these parameters? These limitations are the main issue when trying to create a solution.
While your code does work, there is the problem of the constraints put on us for this project. I will paste them from the instructions document.
Constraints
• You may not construct any arrays, ArrayLists, LinkedLists, Stacks, Queues, or other data
structures; you must use list nodes. You may not modify the list of Strings passed to your constructor.
• If there are n names in the list of Strings passed to your constructor, you should create exactly n new AssassinNode objects in your constructor. As people are killed, you have to move their node from the kill ring to the graveyard by changing references, without creating any new node objects.
• Your constructor will create the initial kill ring of nodes, and then your class may not create any more nodes for the rest of the program. You are allowed to declare as many local variables of type AssassinNode (like current from lecture) as you like. AssassinNode variables are not node objects and therefore don’t count against the limit of n nodes. You should write some of your own testing code. AssassinMain requires every method to be written in order to compile, and it never generates any of the exceptions you have to handle, so it is not exhaustive.
Would it be possible to adjust the code within these parameters? These limitations are the main issue when trying to create a solution.
- I have posted this multiple times and people keep giving me answers that don't correspond to the question or is unloadable. So please read this carefully. Answer the operand given below on the bottom left and the fill in its value that is on the bottom right. Please make it loadable before sending as previous tutors sent a black page and please answer what is being asked in the question !! Again bottom left is the operand and please fill in its value which is on the bottom right..arrow_forwardWe want to display the following message to user of our Android app:Message: Your file has been deleted.Write the Java statement needed to display the above message.arrow_forwardUsing DrawingPanel.java (from chapter 3G), draw a grid for filling in a 4 x 4 square of cell containing integers. For this part of the assignment the values are not important, but you are welcome to use the values shown in the magic square from below. Note that the values in any horizontal row, vertical column or main diagonals add up to 34, in addition to various sub-squares in the larger square also add up to the same value. Requirements: The magic square should be centered in the panel The values in each of the cells should be centered in that cell (both horizontally and vertically). You can assume the values will be <= 99 (i.e., at most 2 digits). For this part of the assignment, you can hard-code the values; you will store them in a 2-dimensional array (from chapter 7) when implementing Part B of the assignment. The title "CSC 142 Magic Square" is centered horizontally in the panel and at y = 50 You are free to choose the colors, fonts, font sizes and effects. This is what I used…arrow_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