Explanation:
public class CircularLinkedListTest
{
private Node head;
private int size;
private class Node
{
private int num;
private Node next;
public Node(int n)
{
num = n;
next = null;
}
public int getNum()
{
return num;
}
public void setNext(Node n)
{
this.next = n;
}
public Node getNext()
{
return next;
}
}
public CircularLinkedListTest ()
{
head = null;
int numNodes = 0;
}
public void add(int num)
{
int numNodes = 0;
if(head == null)
{
head = new Node(num);
head.setNext(head);
numNodes++;
}
else
{
Node temp = head;
while(temp.getNext() != head)
temp = temp.getNext();
temp.setNext(new Node(num));
temp.getNext().setNext(head);
numNodes++;
}
}
public int size()
{
int numNodes = 0;
return numNodes;
}
public int get(int index)
{
Node t = head;
for(int i = 0; i < index; i++)
t= t.getNext();
return t.getNum();
}
public int remove(int index)
{
if(index < 0 || index >= size)
{
System.out.println("Error, index out of Qbounds.");
System.exit(0);
}
Node temp = head;
if(index == 0)
{
while(temp.getNext() != head)
temp = temp.getNext();
int value = head.getNum();
if(size > 1)
{
head = head.getNext();
temp.setNext(head);
}
else
head = null;
size--;
return value;
}
else
{
for(int i = 0; i < index - 1; i++)
temp = temp.getNext();
int answer = temp.getNext().getNum();
temp.setNext(temp.getNext().getNext());
size--;
return answer;
}
}
public static void main(String args[])
{
CircularLinkedListTest suitors = new CircularLinkedListTest ();
for(int i = 1; i <= 6; i++)
suitors.add(i);
int currentIndex = 0;
while(suitors.size() != 1)
{
for(int i = 1; i <= 2; i++)
{
currentIndex++;
if(currentIndex == suitors.size())
currentIndex = 0;
}
suitors.remove(currentIndex);
if(currentIndex == suitors.size())
currentIndex = 0;
for(int i = 0; i < suitors.size(); i++)
System.out.print(suitors.get(i) + " ");
System.out.println();
}
}
}
Write a program that prompts the user to enter two points (x1, y1) and (x2, y2) and displays their distance between them. The formula for computing the distance is: Square root of ((x2 - x1) squared + (y2 - y1) squared) Note that you can use pow(a, 0.5) to compute square root of a.
Answer:
x1 = input("enter x value of first number: ")
y1 = input("enter y value of first number: ")
x2 = input("enter x value of second number: ")
y2 = input("enter y value of second number: ")
ans = (float(x2)-float(x1))**2 + (float(y2)-float(y1))**2
ans = pow(ans, 0.5)
print(ans)
it is important organic mineral that is found in the soil as ash
Answer:
Calcium is the most abundant element in wood ash and gives ash properties similar to agricultural lime. Ash is also a good source of potassium, phosphorus, and magnesium.
What are the disadvantages of using folders
Answer:
√ folders can cause some inconvenience situation...
√ The decompress / compress action takes time.
√ When you double-click on a file inside a “folder”, what really happens is the file gets extracted to a temporary folder.
heres one:
when you delete a folder, he stuff inside gets deleted, and there isnt a way to get it back.
How many components of a computer?
Answer:
There are five main hardware components in a computer system: Input, Processing, Storage, Output and Communication devices. Are devices used for entering data or instructions to the central processing unit.
Explanation:
3.5 code practice question 1
Answer:
what is this a question or just saying something?
Explanation:
Answer:
uh what?
Explanation:
It can be hard to get close enough to photograph animals in the wild true or false
Answer:
True
Explanation:
Answer:
true
Explanation:
// The QuickCopy company currently makes 100,000 copies per year// at 15 cents each.// They expect to increase the number of copies produced// by 4 percent per year each year for the next 10 years,// starting with this year.// They also expect the price of each copy to increase// by 3 cents per year, starting with this year.// This program displays the company's expected// income for each of the next 10 years.// Modify it to be more efficient.startDeclarationsnum year = 1num copies = 100000num price = 0.15num total = 0num COPIES_INCREASE = 0.04num PRICE_INCREASE = 0.03copies = copies + copies * COPIES_INCREASEprice = price + price * PRICE_INCREASEtotal = total + copies * priceoutput year, totalyear = year + 1copies = copies + copies * COPIES_INCREASEprice = price + price * PRICE_INCREASEtotal = total + copies * priceoutput year, totalyear = year + 1copies = copies + copies * COPIES_INCREASEprice = price + price * PRICE_INCREASEtotal = total + copies * priceoutput year, totalyear = year + 1copies = copies + copies * COPIES_INCREASEprice = price + price * PRICE_INCREASEtotal = total + copies * priceoutput year, totalyear = year + 1copies = copies + copies * COPIES_INCREASEprice = price + price * PRICE_INCREASEtotal = total + copies * priceoutput year, totalyear = year + 1copies = copies + copies * COPIES_INCREASEprice = price + price * PRICE_INCREASEtotal = total + copies * priceoutput year, totalyear = year + 1copies = copies + copies * COPIES_INCREASEprice = price + price * PRICE_INCREASEtotal = total + copies * priceoutput year, totalyear = year + 1copies = copies + copies * COPIES_INCREASEprice = price + price * PRICE_INCREASEtotal = total + copies * priceoutput year, totalyear = year + 1copies = copies + copies * COPIES_INCREASEprice = price + price * PRICE_INCREASEtotal = total + copies * priceoutput year, totalyear = year + 1copies = copies + copies * COPIES_INCREASEprice = price + price * PRICE_INCREASEtotal = total + copies * priceoutput year, totalstop
Answer:
See Explanation
Explanation:
Required
Modify the program
To modify the program, we simply make use of an iterative statement.
To do this, I'll make use of a do while loop.
So, we have:
Declarations
num year = 1
num copies = 100000
num price = 0.15
num total = 0
num COPIES_INCREASE = 0.04
num PRICE_INCREASE = 0.03
do:
copies = copies + copies * COPIES_INCREASE
price = price + price * PRICE_INCREASE
total = total + copies * price
output year, total
year = year + 1
while year<=10
The above do while loop enables the program to repeat the statements in the following block:
do:
----
---------
---
-
while year <=10
The loop calculates the copies & price in each year and also updates the values of the variables; so that they can be used for the nexr iteration
What Is an Antivirus?
Answer:
Antivirus software is a type of program designed and developed to protect computers from malware like viruses, computer worms, spyware, botnets, rootkits, keyloggers and such. Antivirus programs function to scan, detect and remove viruses from your computer.
Explanation:
What is a Web server application?
A.An application that receives information, provided by an end user on a user-input form, from a Web server or a database server.
B.An application that is used to make Webpages interactive
C.An application that stores and processes the information provided by an end user on a user-input form
D.An application that authoritatively confirms the identity of a person, host or organization
Answer:
I prefer to go for the answer D
If a program has no syntax errors, can we assume that it is secure? Why or why not?
Answer:
We cannot say it is secure until it has gone through security testing.
Explanation:
Syntax errors are caused by errors that occur in the source code. Some of these errors are caused by spellings and punctuation. If the code does not follow the syntax of the programming language that it is being written, it would likely display a syntax error.
A program is secure only when it has gone through security testing and found to be protected from vulnerabilities and attacks.
An if statement must always begin with the word “if.” True False python
Answer:
true
Explanation:
The given statement is true, that an if statement must always begin with the word “if.” in python.
What is the python?A high-level, all-purpose programming language is Python. Code readability is prioritized in its design philosophy, which makes heavy use of indentation. Python uses garbage collection and has dynamic typing.
It supports a variety of paradigms for programming, including functional, object-oriented, and structured programming. An “if” statement must always be the first word in a sentence.
One of the most often used conditional statements in computer languages is the if statement in Python. It determines whether or not particular statements must be performed. It verifies a specified condition; if it is true, the set of code included within the “if” block will be run; if not, it will not.
Therefore, it is true.
Learn more about the python, refer to:
https://brainly.com/question/18502436
#SPJ2
what do you mean by an ISP? why do we need a modem to access the internet? name any two Internet browsers
Answer:
ISP means INTERNET SERVICE PROVIDER. These are organisations that provide internet to public.
Modems are needed to access the internet as they act like a server for us to get internet.
Internet browsers-
1. Goo.gle Chrom.e
2. Micro.soft Ed.ge
3. Fire.fox
A restaurant buys a pizza oven that is 4.5 feet long, 5 feet wide and 6 feet tall. What is the volume of the pizza oven?
Answer:
135 as 4.5 times 5 times 6 gives you the volume and it =135
After building muscle memory, what comes next when you are learning to type?
Speed
GWPM
Finger placement
Home row keys
Answer:
B
Explanation:
Its B because i had a test like dat go it correct.
Hope this helps!
After building muscle memory, GWPM comes next when you are learning to type. Thus, option B is correct.
What are windows key?The Starting keys are also known as the windows key. It was introduced in 1994 by the Microsoft Natural keyboard. The Numeric keypad is also known as number pad, Numpad, etc. This keypad has a 17-key palm segment of a standard computer keyboard, normally at the far right.
The cursor is also known as Cursor control keys. These are buttons that push the cursor on a computer keyboard. That's why the answer to this question is "home row".
It is easy to add zero digit number here it will be we can club the two number or we can club two pair so as to form 10 in each of the pair
It will be (8+2) which gives 10
And (9+1) which gives 10
And it will very easy and fast to add 10 + 10
Rather than any other pair.
Therefore, After building muscle memory, GWPM comes next when you are learning to type. Thus, option B is correct.
Learn more about windows key on:
https://brainly.com/question/11884418
#SPJ2
why use a chart legend?
Answer:
A legend or key helps the user build the necessary associations to make sense of the chart.
Explanation:
Legends summarize the distinguishing visual properties such as colors or texture used in the visualization.
Write a program which asks the user for their name and age. The program should then print a sentence.
What is your name?
Cory
What is your age?
48
Cory is 48 years old.
Answer:
name = input("What is your name? ")
age = int(input("What is your age? "))
print("%s is %d years old."% (name, age))
Explanation:
This is a solution in python.
NO THIS ISNT ANY HOMEWORK!
Does anyone know a laptop under $200 that can run Minecraft Java edition and maybe 60fps?
PLEASE NAME A SPECIFIC ONE not to be rude but please don’t waste my time!
Sorry if I’m asking for too much we’re gonna travel soon and it’s gonna be for long months and I can’t bring my entire set up but I also don’t have much money and I can’t find any laptop like that so if you can help? Thank you!
Answer:
Name CPU, GPU & RAM My Rating (Out of 10)
HP Pavilion 15 Intel Core i7-8565U Nvidia MX 250 16GB 8.1
Asus VivoBook S15 Intel Core i5-8265U Nvidia MX250 8GB 7.8
Dell Inspiron 15 Intel Core i5-8250U Intel HD Graphics 16GB 7.6
Acer Aspire 5 Intel Core i5-8265U Nvidia MX250 8GB 7.5
Explanation:
I dont know the prices, I just searched it, though I will look into it more
Answer:
dont know the price but my mom bought me a macbook pro 13 inch and it works great !
Explanation:
edit: oop lol its like 1200 dollars
Give a regular expression for binary numbers. They can be integers or binary fractions. A leading - sign is always allowed. Leading 0's are not allowed except when the integer part is 0. When the binary points is present, then neither the integer part nor the fractional part are allowed to be empty. If the integer part has more than 3 bits, then grouping with commas is required. Examples: Allowed: -0 1,111,010 -1,111.00 Not allowed: .11 1000 The 4-letter alphabet consists of 0, 1, dot, and comma.
Solution :
We have to provide an expression for the binary numbers. There can be binary fractions or integers. Whenever there is leading 0, it is not allowed unless the integer part is a 0.
Thus the expression is :
[tex]$(-+ \in )$[/tex] [tex]$[(1+10+11+100+101+110+111)(,000+,001+,010+,011+,111+,100+,101+,110)^*$[/tex] [tex]$(\in +.(0+1)^*(0+1))+(0.(0+1)^*(0+1))]$[/tex]
In this exercise we have to have knowledge about binary code to calculate with these numbers, so we have:
[tex](E+(0+1)*(0+1))[/tex]
What is a binary code?A binary code represents text, computer processor instructions, or any other data using a two-symbol system. The two-symbol system used is often "0" and "1" from the binary number system.
Knowing this now we can perform the calculations like:
[tex](1+10+11+100+101+110+111)(000+001+010+011+111+100+101+110)\\(E+(0+1)*(0+1))[/tex]
See more about binary code at brainly.com/question/7960132
Your goals as the IT architect and IT security specialist are to: Develop solutions to the issues that the specified location of IDI is facing. Develop plans to implement corporate-wide information access methods to ensure confidentiality, integrity, and availability. Assess risks and vulnerabilities with operating IT facilities in the disparate locations where IDI now functions and develop mitigation plans and implementation methods. Analyze the strengths and weaknesses in the current systems of IDI. Address remote user and Web site user’s secure access requirements. Develop a proposed budget for the project—consider hardware, software, upgrades/replacements, and consulting services. Prepare detailed network and configuration diagrams outlining the proposed change to be able to present it to the management. Develop and submit a comprehensive report addressing the learning objectives and your solutions to the issues within the scenario. Prepare a 10- to 15-slide PowerPoint presentation that addresses important access control, infrastructure, and management aspects from each location.
Please help ASAP!
Combined with a set number of steps to determine size, what number of degrees would you use for turn degrees to command a sprite to trace a triangle with three equal sides?
A. 90, 90
B. 45, 45
C. 90, 180
D. 120, 120
Answer:
GIVE this man Brainliest!
Explanation:
1. Create an optimized function "print s(n,s)" that prints the given argument s (representing a string) k times. k represents the number of iterations of the inner loop. The print statement that prints s is in the inner loop of the function (a) Initial conditions: i = 1, j = 1, i <= n, and j <= i (b) i and j increments: i = i + 1 and j = j ∗ 2 (c) input as arguments in the function: n (an integer representing the size of the input), and s (the string) (d) output: print s k times (e) example: n=5, s="hello CSC510-01 class", given these conditions, the function "print s(n,s)" will print s 11 times
Answer:
The program in C is as follows:
void prints(char arr[], int n){
int count =0;
for(int i=1 ;i<=n; i++){
for(int j=1;j<=i; j=j*2){
count++; } }
for(int i =0;i<count;i++){
printf("%s ",arr);
}
}
Explanation:
This defines the method
void prints(char arr[], int n){
This declares and initializes count variable to 0
int count =0;
This creates the outer loop
for(int i=1 ;i<=n; i++){
This creates the inner loop
for(int j=1;j<=i; j=j*2){
This increments count by 1
count++; } }
This iterates through count
for(int i =0;i<count;i++){
And print the string in count times. If count is 3, the string will be printed 3 times.
printf("%s ",arr);
}
}
See attachment for complete program that includes the main method
what is invention and inovation do more responsible think for making computer a succsessful product?explain
Answer:
I can't explain but I think it is the GUI
What are to be considered before software installation? Why?
Answer:
before software installation we should consider the following things:
1. Software must be virus free
2.Required components for software should be installed
3.Computer requirements must be little bit high required for that software
4.software musn't be corrupt
Directions Interview your parent or any member of your family. Identity
v. Performance Tasks
sources of your family income. Classify the types of your family
income if it is Money Income, Real Oncome or Psychic income
Answer:
Total family income is first classified by it's four major source, earings of a male head , earings of a wife or female head , earings of a family members , and property or transfer income.
Create a list called numbers containing the values from 1 through 15, then use slices to perform the following operations consecutively: a. Select number’s even integers. b. Replace the elements at indices 5 through 9 with 0s, then show the resulting list. c. Keep only the first five elements, then show the resulting list. d. Delete all the remaining elements by assigning to a slice. Show the resulting list.
Answer:
Kindly check explanation
Explanation:
From python :
List containing values from 1 through 15:
my_list = list(range(1,16))
#creates a list of values from 1 to 15,(16 is excluded)
B.) select even integers :
for digits in my_list :
if digit%2 == 0;
print(digit)
# prints numbers in the list which does not leave a remainder when divided by .
C.)
for digits in my_list[4,9]:
my_digit[digits] = 0
my_digits
#Replaces the elements at indices 5 through 9 with 0s, then show the resulting list.
D.)
my_digits[:5]
#selects digits with index 0 up to 4
E.)
del my_digits[:5]
#DELETE elements in my digits starting from the fifth index
What is the action take to the input called?
Answer:
Control types created with INPUT; Examples of forms containing INPUT controls ... The scope of the name attribute for a control within a FORM element is the FORM element. ... Applications should use the id attribute to identify elements. ... The program that will handle the completed and submitted form (the action attribute).
Explanation:
What was the Internet was built off ot?
A) IPv6
B) CIDR
C) NAT
D) IPv4
Answer:
The internet was built around IPv4.
write asswmbly prgram and do the following:
You have two numbers, the first one is 32 bits and the second is a 16 bits number. Find the result of division and store it in memory location called RESULT then store the reminder of division in memory location called MOD. (Use MACRO)
Answer:
I did this last year :/ i feel your pain.
Explanation:
Which function will display 6 as the output in the following formula?
C1*(C2+B1)
where C1 is 6, C2 is 2, and B1 is 4
_________
Answer:
36
Explanation:
hi add creeper_king101 i need views on snap
Answer: i just did the pretest and the answer was 36 no cap
Explanation:
3. Create tables CheckingAccount(CheckingAccountNumber, CustomerName, Balance, CustomerID), SavingsAccount(SavingsAccountNumber, CustomerName, Balance, InterestRate, CustomerID), Transactions(TransactionNumber, TransactionAmount, TransactionType, TransactionTime, TransactionDate, FromAccount, ToAccount, CustomerID). Use varchar(50) for any non-numerical value including AccountNumber and TransactionNumber, and float for any numerical value. CustomerID here means Username.
Answer:
Your answer is B
She forgot to record a transaction.
Explanation:
Edge 20 it’s right