this is CircularLinkedList.java
package circularlinkedlist;
import java.util.Iterator;
public class CircularLinkedList implements Iterable {
// Your variables
Node head;
Node tail;
int size; // BE SURE TO KEEP TRACK OF THE SIZE
// implement this constructor
public CircularLinkedList() {
}
// I highly recommend using this helper method
// Return Node found at the specified index
// be sure to handle out of bounds cases
private Node getNode(int index ) {
return null;
}
// attach a node to the end of the list
public boolean add(E item) {
this.add(size,item);
return false;
}
// Cases to handle
// out of bounds
// adding to empty list
// adding to front
// adding to “end”
// adding anywhere else
// REMEMBER TO INCREMENT THE SIZE
public void add(int index, E item){
}
// remove must handle the following cases
// out of bounds
// removing the only thing in the list
// removing the first thing in the list (need to adjust the last thing in the list to point to the beginning)
// removing the last thing
// removing any other node
// REMEMBER TO DECREMENT THE SIZE
public E remove(int index) {
return null;
}
// Turns your list into a string
// Useful for debugging
public String toString(){
Node current = head;
StringBuilder result = new StringBuilder();
if(size == 0){
return “”;
}
if(size == 1) {
return head.item.toString();
}
else{
do{
result.append(current.item);
result.append(” ==> “);
current = current.next;
} while(current != head);
}
return result.toString();
}
public Iterator iterator() {
return new ListIterator();
}
// provided code for different assignment
// you should not have to change this
// change at your own risk!
// this class is not static because it needs the class it’s inside of to survive!
private class ListIterator implements Iterator{
Node nextItem;
Node prev;
int index;
@SuppressWarnings(“unchecked”)
//Creates a new iterator that starts at the head of the list
public ListIterator(){
nextItem = (Node) head;
index = 0;
}
// returns true if there is a next node
// this is always should return true if the list has something in it
public boolean hasNext() {
// TODO Auto-generated method stub
return size != 0;
}
// advances the iterator to the next item
// handles wrapping around back to the head automatically for you
public E next() {
// TODO Auto-generated method stub
prev = nextItem;
nextItem = nextItem.next;
index = (index + 1) % size;
return prev.item;
}
// removed the last node was visted by the .next() call
// for example if we had just created a iterator
// the following calls would remove the item at index 1 (the second person in the ring)
// next() next() remove()
public void remove() {
int target;
if(nextItem == head) {
target = size – 1;
} else{
target = index – 1;
index–;
}
CircularLinkedList.this.remove(target); //calls the above class
}
}
// It’s easiest if you keep it a singly linked list
// SO DON’T CHANGE IT UNLESS YOU WANT TO MAKE IT HARDER
private static class Node{
E item;
Node next;
public Node(E item) {
this.item = item;
}
}
public static void main(String[] args){
}
}
this is SolitaireEncryption.java
public class SolitaireEncryption {
public static char encryptChar(char letter, int key) {
int value = letter – ‘a’;
int encryptedValue = (value + key) % 26;
char encryptedChar = (char) (encryptedValue+’a’);
return encryptedChar;
}
public static char decryptChar(char letter, int key) {
int value = letter – ‘a’;
int decryptedValue = (value + (26-key)) % 26;
char decryptedChar = (char) (decryptedValue+’a’);
return decryptedChar;
}
public int getKey(CircularLinkedList deck){ // calls the steps methods
return -1;
}
private static void step1(CircularLinkedList deck){
}
private static void step2(CircularLinkedList deck){
}
private static void step3(CircularLinkedList deck){
}
private static void step4(CircularLinkedList deck){
}
private static int step5(CircularLinkedList deck){
return -1;
}
public static void main(String[] args) {
CircularLinkedList deck = new CircularLinkedList<>();
}
}
please make the code can run and show the whole code for methane you
Elitewriterhelp.com is an online academic writing site that provides a variety of services to students and professionals in need of essay, dissertation, and research paper assistance. This website was founded by experienced writers and editors who understand the needs of today’s student community. With their help, students can get a well-written paper without having to worry about the quality or accuracy of their content.
Elitewriterhelp.com offers a wide range of services that are designed to meet the needs of any student or professional looking for some extra help with their academic work. From simple editing services to complete custom writing pieces, they have something for everyone! Their team consists of highly qualified writers and editors who have years of experience in both academia and industry sectors across all fields such as English literature, nursing sciences, medical science, engineering design & technology, accounting & finance etc., making them one of the best providers around when it comes to providing quality content writing services.
When it comes to their custom writing service, Elitewriterhelp.com provides everything from essays & dissertations to research papers & lab reports; all written according to your exact specifications & requirements so that you can be sure your professor will be impressed with what you submit! They also provide formatting help which includes APA/MLA/Chicago style formatting for those stuck on tedious details like citations or bibliography entries; perfect for those last-minute assignments!
For those looking for proofreading & editing services instead; Elitewriterhelp.com has you covered too! The team at this website offer professional copyediting which can check grammar errors and spellings mistakes while still preserving your original voice within the text; ensuring that whatever piece you submit looks great while still sounding exactly how you want it do sound! What’s more is if required they can also provide advice on how best to improve certain parts in order make sure your work meets the criteria set by your professors so no marks are lost due to minor mistakes made in hurry or ignorance.
Last but not least is Elitewriterhelp’s paraphrasing service which helps take care off any plagiarism risks associated with submission an assignment where quotes are used extensively taken from sources outside class materials (eBooks etc.). The team will ensure that anything being submitted sounds fresh while leaving out any potential legal issues plaguing people using other authors works without proper permission given first when appropriate credit isn’t given otherwise – definitely something worth investing into before submitting examples cited within studies found elsewhere apart from class material sources only mentioned once during seminars etc..
To sum up: Elitewriterhelp offers students access top-notch custom writing pieces as well as editing/proofreading packages for existing ones already written – perfect for double checking against silly grammatical errors / typos overlooked during initial composition stages meaning there’s always hope even when running short on time ahead up coming deadlines looming near after long lectures spent inside classrooms sat away from laptops used mainly taking notes by hand easily misplaceable later down line afterwards rendering past efforts worthless sadly…
Why Work with Us
Top Quality and Well-Researched Papers
We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.
Professional and Experienced Academic Writers
We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.
Free Unlimited Revisions
If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.
Prompt Delivery and 100% Money-Back-Guarantee
All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.
Original & Confidential
We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.
24/7 Customer Support
Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.
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
No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.
Essays
No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.
Admissions
Admission Essays & Business Writing Help
An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.
Reviews
Editing Support
Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.
Reviews
Revision Support
If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.