Can someone urgently help me with my java code (I WILL GIVE BRAINLIEST)?! Ive been working on it for hours and its not working! (please give an actual answer...)

*examples of required output at the bottom*

code: public class CircularList
{
private ListNode head;
private ListNode tail;
private int size;







public CircularList()

{

head = tail = null;

size = 0;

}





public int size()

{

return size;

}





public boolean isEmpty()

{

return (size == 0);

}





public int first()

{

if (head != null) {

return head.getValue();

}

return -1;

}




public Integer last()

{

if (tail != null) {

return tail.getValue();

}

return -1;

}



public void addFirst(Integer value)

{

head = new ListNode(value, head);

if (tail == null) {

tail = head;

}

size++;

}





public void addLast(Integer value)

{

ListNode newTail = new ListNode(value, null);

if (tail != null) {

tail.setNext(newTail);

tail = newTail;

} else {

head = tail = newTail;

}



size++;

}





public void addAtPos(int pos, Integer value)

{

if (pos == 0) {

addFirst(value);

return;

}

if (pos <= 0 || pos > size) {

return;

}

if (pos == size) {

addLast(value);

return;

}



ListNode ptr = head;

for(int i=0; i = size) {

return retVal;

}

if (pos == 0) {

return removeFirst();

}

ListNode ptr = head;

for(int i=0; i
ptr = ptr.getNext();

}

retVal = ptr.getNext().getValue();

if (pos == size-1) {

tail = ptr;

tail.setNext(null);

} else {

ptr.setNext(ptr.getNext().getNext());

}



size--;

return retVal;

}





public int findNode(Integer find)

{

ListNode ptr = head;

for(int pos=0; pos
if (ptr.getValue() == find) {

return pos;

}

ptr = ptr.getNext();

}

return -1;

}




public void rotate()

{

addLast(removeFirst());

}




public String toString()

{

String output = "";

ListNode iter = head;

while(iter != null) {

output += String.format("%d ", iter.getValue());

iter = iter.getNext();

}

return output;

}



}

size = 6 first = 50 last = 60
50 20 10 40 30 60

removeFirst = 50
size = 5 first = 20 last = 60
20 10 40 30 60

removed = 30
size = 4 first = 20 last = 60
20 10 40 60

size = 4 first = 20 last = 60
20 10 40 60

found at -1
removed = -1
size = 4 first = 20 last = 60
20 10 40 60

size = 4 first = 10 last = 20
10 40 60 20

Answers

Answer 1

Answer:

code 345code 4537

Explanation:


Related Questions

PlEASE HELP!

Identify in the space below three rules you feel are most important for deciding what personal information is
appropriate to post online.

Answers

Answer:

.

Names. Be careful how you use your name. Avoid using your full name. Even a nickname could spell trouble -- for instance, if it says something suggestive about your character, if it's a name you already use with others who know your real identity, or if it's made up from your real name (say, from your initials). First names are best, unless yours is extremely unusual. These days, many people do use their full names for online posting -- on social media sites and blogs for example. Just know that in doing so you're raising the risk of becoming an identity theft victim.

Photos. Bearing in mind Golden Rule #1, don't post photos you wouldn't want everyone to see. Full face, high resolution photos may be "snagged" (copied) and used for identity theft. Some people don't know how easy this is to do with any photo, with just a couple of clicks. Also, as a matter of etiquette, don't post photos of others without their permission, unless you're prepared for the consequences if the other person doesn't think it's funny. For preference, use photos in which identities are obscured. And, as a general rule, don't post photos of children online (especially not other people's children without permission). If you want to share photos of your kids, put them in a private online album, accessible by invitation or password. Or email them directly to your friends.

Explanation:

Discuss two business information systems that are used in two different sectors in a modern economy.

Answers

Explanation:

Two business information systems that are used in two different sectors in a modern economy are:

Transaction Processing System (TPS):

The Transaction Processing System (TPS) is a type of data system for capturing, storing, updating and recovering a company's data operations. Transaction systems often try to provide consistent response times to requests even if this is not as important as in real-time systems.

Management Information System (MIS)

MIS is the study of persons, technological systems and associations between them. Management Information Systems (MIS) Professionals at MIS allow businesses to profit maximally from staff, facilities and business process expenditure. MIS is a field of people with a focus on technological support.

If a coach sent a weekly update to her team every week, it would be to her benefit to create a _____ to expedite the process.

confidential group
contact group
custom contact
networked group

Answers

Answer:

contact group

Explanation:

Answer:

contact group

Explanation:

What is used to see the fine details of
graphics on a screen

Answers

Answer:

graphics card

Explanation:

When using e-mail for business purposes, employees should _____.


be brief

use spell check

use appropriate punctuation

write in all capital letters when the message is important

use correct grammar

send out jokes to increase employee morale

proofread messages

use extra exclamation marks to indicate urgency

Answers

Answer:use spell check

proofread messages

use appropriate punctuation

be brief

use correct grammar

Explanation:

In honor of Black History Month, write an essay about a black person who has inspired YOU in some way. This person does not have to be famous, it can be a coach, a pastor, or family friend. This essay must be 10 sentences or more.​

Answers

Answer:

I will be talking about Jackie Robinson. Robinson was known for playing baseball with the Brooklyn Dodgers from 1947 to 1956, I will share a few of his other accomplishment.

In 1935, Robinson graduated from Washington Junior High School and enrolled at John Muir High School Recognizing his athletic talents, Robinson's older brothers Mack (himself, an accomplished athlete and silver medalist, at the 1936 Summer Olympics) and Frank inspired Jackie to pursue his interest in sports.

At Muir high school , Robinson played several sports , football, basketball, track, baseball and tennis. He played shortstop and catcher on the baseball team, quarterback on the football team, and guard on the basketball team. With the track and field squad, he won awards for the broad jump.

In 1936, Robinson won the junior boys singles championship at the annual Pacific Coast Negro Tennis Tournament.

He earned a place on the annual baseball tournament all-star team,

In late January 1937, the News newspaper reported that Robinson "for two years had been the outstanding athlete at John Muir, starring in football, basketball, track, baseball and tennis.

As Jackie was encouraged to move forward by his brothers Mack and Frank. Today, his accomplishments inspires me to keep moving forward.

Explanation:

Helppppp plzzzz it's computer science helpp plzzz

Answers

1. String

2. "is assigned to"

During which phase of the writing process is it best to have other
people review your document
O Pre-writing
O Drafting
Revising
O Publishing

Answers

Answer:

the answer should be Revising

With what finger do you type the letter m​

Answers

Answer:

Index Finger

Explanation:

I type m with my middle because it’s just right down from j

I am doing a inquiry task for A.I. taking over coding I need answer for in the coding industry be ok with A.I. taking over their job. Any links to webs pages like this would be useful too

Answers

Answer:

hi! How are you? I’m sorry I really need points, but I hope you find the answer soon tho <3

Explanation:

Mention the usage of crop concept in ms-word​

Answers

Answer:

Every image editing software has a crop tool that allows you to trim or eliminate the edges of an image. Cropping tools in Ms.word allow you to hide portions of picture that you do not want to be displayed in the final result.

[tex]\huge\underline\mathbb\pink{ANSWER:}\\\\[/tex]

Every image editing software has a crop tool that allows you to trim or eliminate the edges of an image. Cropping tools in Word allow you to hide portions of pictures that you do not want to be displayed in the final result.

[tex]\\\\\\\\[/tex]

HOPE IT HELPS

PLEASE MARK ME BRAINLIEST ☺️

Which validation check can be used on the following data. "XX000" 

1. Range

2. Limit

3. Format

4. Length ​

Answers

Answer:

Format and Length

Explanation:

If there is a range or limit on the data, you would need to know more about the format.

Meat and poultry exposed to some forms of radiations to extend shelf life. *

Answers

Answer:

Food Irradation

Explanation:

:)

The following statements describe the use of graphics in presentations.

Graphics should be large enough to be seen by the audience.
Graphics should be used on every slide.
Graphics should be used when they are relevant to the content.
Many graphics will make a boring presentation interesting.

Select all that apply

Answers

Answer:

I. Graphics should be large enough to be seen by the audience.

II. Graphics should be used when they are relevant to the content.

Explanation:

Presentation can be defined as an act of talking or speaking formally to an audience in order to explain an idea, piece of work, project, and product with the aid of multimedia resources, slides or samples.

PowerPoint application refers to a software application or program designed and developed by Microsoft, to avail users the ability to graphically create various slides containing textual and multimedia informations that can be used during a presentation.

Some of the features available on Microsoft PowerPoint are narrations, transition effects, custom slideshows, animation effects, formatting options etc.

Hence, the following statements describe the use of graphics in presentations;

I. Graphics should be large enough to be seen by the audience.

II. Graphics should be used when they are relevant to the content.

Answer:

I. Graphics should be large enough to be seen by the audience.

II. Graphics should be used when they are relevant to the content.

Explanation:

PLS HELP! Prompt
What is exporting?

Answers

Answer:

spread or introduce (ideas and beliefs) to another country.

Explanation:

Exporting is sending goods or services to another country for money. For example, Japan exported $16 million worth of mussels, meaning they sold $16 million worth of mussels to another country. Hope this helps!

A computer game picks a random number between 1 and 100, and asks the player to guess what the number is. If the player makes a correct guess, the game congratulates them, and stops. If the player does not make a correct guess, the game tells the player that their guess is either too high, or too low. If the player guesses with an answer that is not a number between 1 and 100, an error message is displayed. The game continues to give the player chances to guess, until the player guesses correctly. You are going to plan an interactive program to implement this game. do this using scratch

Answers

Answer:

In Python:

import random

computerguess = random.randint(1,101)

userguess = int(input("Take a guess: "))

while not (userguess == computerguess):

   if userguess<1 or userguess>100:

       print("Error")

   elif not (userguess == computerguess):

       if userguess < computerguess:

           print("Too small")

       else:

           print("Too large")

   userguess = int(input("Take a guess: "))

print("Congratulations")

Explanation:

This imports the random module

import random

Here, a random number is generated

computerguess = random.randint(1,101)

This prompts the user for a guess

userguess = int(input("Take a guess: "))

The following loop is repeated until the user guess correctly

while not (userguess == computerguess):

If user guess is not between 1 and 100 (inclusive)

   if userguess<1 or userguess>100:

This prints error

       print("Error")

If the user guessed is not correct

   elif not (userguess == computerguess):

If the user guess is less

       if userguess < computerguess:

It prints too small

           print("Too small")

If otherwise

       else:

It prints too large

           print("Too large")

This prompts the user for a guess

   userguess = int(input("Take a guess: "))

The loop ends here

This prints congratulations when the user guess correctly

print("Congratulations")

round 74,361 to the nearest 10​

Answers

Answer:

74,400 i think

Explanation:

How do I calculate this square footage?

Answers

Answer:

To calculate it, you have to break it apart. Sorry for the bad writing but after you break it apart, you multiply the smaller squares. Then with all of the smaller areas, add them together for the final answer which in this case is 456.

Question 1 of 10
When you edit your slide by making sure that that first paragraph is right
justified, what are you correcting?
A. Hyperlinks that no longer work
B.Inappropriate content
C.Grammatical mistakes
D.Text alignment
B. Inappropriate content
C. Grammatical mistakes
D. Text alignment
SUBMIT

Answers

Text alignment is the answer

When you edit your slide by making sure that that first paragraph is right justified, here, one is correcting Text alignment. The correct option is D.

What is Text alignment?

Text alignment is a paragraph formatting attribute that determines how text appears throughout a paragraph.

For example, in a left-aligned paragraph (the most common alignment), text is aligned with the left margin. Text in a justified paragraph is aligned with both margins.

Alignment or range is the setting of text flow or image placement relative to a page, column, table cell, or tab in typesetting and page layout.

The type alignment option is also known as text alignment, text justification, or type justification.

Text alignment is corrected when you edit your slide by ensuring that the first paragraph is right justified.

Thus, the correct option is D.

For more details regarding text alignment, visit:

https://brainly.com/question/13423071

#SPJ7

Complete the sentence.

involves placing a device on the network that captures all the raw data in the network traffic to try to find something valuable
A. Dumpster diving
B. Packet sniffing
C. Social engineering
D. Phishing

Answers

Answer:

D. Phishing

Explanation:

Answer: B. Packet sniffing

Explanation:

right on edge

PLS REPLY ASAP WILL MARK BRAINLIEST

Answers

Answer:

I replied ...?

Explanation:

He removed vertical borders, kept only vertical borders for the header and the totals. He also added shading to the rows.

All _______ that store more than one piece of data ​

Answers

Answer:All data structure that store more than one piece of data ​

.

Explanation:

libre office is what program​

Answers

I’m not 100% sure what this question is asking, but I believe the answer would be “an open-source office productivity software”.

All organizations need good quality cybersecurity to ensure _____. Select 4 options.

operational security

operational efficiency

operational tangibility

operational profitability

operational continuity

Answers

Answer:

option 1

Explanation:

it is because they need better security for operational

Answer:

operational continuity

operational profitability

operational security

Explanation:

Which is not a unit of Personal Computer?

Answers

Generally a system unit of personal computer do not contain modem

where can i make an animation for free?

Answers

Answer:

I've heard of flipabook and apparently that's good for simple animations

Explanation:

Hope that helped! Have a nice day!

Examples and meaning of external hardware.​

Answers

Answer:

External hardware devices include monitors, keyboards, mice, printers, and scanners. external hardware devices are usually called peripherals.

5 examples of hardware?

Mouse, Keyboard, Monitor, Printer, USB, CD Drive, RAM, Hard Drive, Joystick, Scanner, DVD, CPU, Motherboard, Etc.

Explanation:

Hope this help have a good rest of your  day

int x = 42
fill in the missing part of the following code to divide x by 3 using the shorthand division operator ​

Answers

42/3 will be equal to 14

Describe how checksum detects errors​

Answers

Answer:

For error detection by checksums, data is divided into fixed sized frames or segments. Sender's End − The sender adds the segments using 1's complement arithmetic to get the sum. It then complements the sum to get the checksum and sends it along with the data frames.

20 POINTS!!! I NEED HELPP

Answers

Answer:

Apple

Explanation:

Answer:

Windows Internet Explorer

because windows is aka microsoft windows

Other Questions
A girl named Mary Richards, who was thought remarkably pretty at the workhouse, and was not quite 10 years of age, worked at a drawing frame. Below the machine, and about a foot from the floor, was a horizontal shaft, by which the frames above were turned. It happened one evening, when her apron was caught by the shaft. In an instant the poor girl was drawn by an irresistible force and dashed on the floor. She uttered the most heart-rending shrieks! The floor manager ran towards her, an agonized and helpless beholder of a scene of horror. He saw her whirled round and round with the shaft - he heard the bones of her arms, legs, thighs, etc. successively snap asunder, crushed, seemingly, to atoms, as the machinery whirled her round, and drew tighter and tighter her body within the works, her blood was scattered over the frame and streamed upon the floor, her head appeared dashed to pieces - at last, her mangled body was jammed in so fast, between the shafts and the floor, that the water being low and the wheels off the gear, it stopped the main shaft. When she was extricated, every bone was found broken - her head dreadfully crushed. The poor girl was carried off quite lifeless. Directions: After reading the story, type your answer or use the highlight tool to mark the correct answer. Which adjective best describes the factory in which the girl works Qu le encanta hacer To Spanish? Homework (5)18. GEOGRAPHY In the continental United States,the ratio of states that border an ocean to statesthat do not border an ocean is 7:9. How manyof the states border an ocean? Helppp plzzz I will mark brainliestttt Create a food chain directions the following organisms What does "Let the kite perch and let the eagle perch too. If one says no to the other, let his wing break. mean Which condition would have resulted from the functions of prokaryotes on early Earth?Question 2 options:Earth's oceans grew largerless oxygen gas became present in the atmosphereless carbon became present in Earth's soilmore oxygen gas became present in the atmosphere A student has started a lawn care business. He charges $15 per hour to mow lawns and $20 per hour for gardening. Because he is still in school, he is only allowed to work for at most 20 hours per week. His goal is to make at least $300 per week. Create a system of equations or inequalities that models the situation. Define the variables you use. find the perimeter of the shape below 12. ALGEBRA Sherri Cole found that the 12-ounce can of frozen orange juicesells for $0.16 less than the 16-ounce can, which is $0.68 less than the24-ounce can. If the unit price of the 24-ounce can is $0.005 less than theunit price of the 12-ounce can, which of the three is the best buy basedon the lowest unit price? difference between sold and liquid Solo la persona ms inteligente de su clase de espaol puede ayudarme con esto! YOU GET 100 POINTS!!!! Select the correct graph.Based on the end behaviors, which graph is the graph of f(x) = -2x4 4x3 + x2 + x + 3? Which table shows a linear relationship?OAOB1X02012A57107y1218CDHint:Is the change in x constant and is the change in yconstant.01Bx2120D163081624 what is X please help 5x - 13.75 = 20 A person places $13900 in an investment account earning an annual rate of 2.8%, compounded continuously. Using the formula V = Pe^{rt}V=Pe rt , where V is the value of the account in t years, P is the principal initially invested, e is the base of a natural logarithm, and r is the rate of interest, determine the amount of money, to the nearest cent, in the account after 18 years. diffetences between the equator and the prime meridian Madison Foods Corp. is frustrated in its efforts to sell products in Europe because several countries are demanding that the company label products in the specific language associated with the country. These demands are examples of a Multiple Choice trade obstacle. trademark. trade role. trade name. Can someone help me with this question find the area plz and thank u have explanation