In a statement: Scanner keyboard = new Scanner (System.in);

it reads user input by means of a Scanner, the user types the line of input below, exactly as shown, including that same spacing.

What is the statement keyboard.nextDouble( ); returned ?

Answer "2": 1+2 is 3 and "5.0" squared is 25.0 !

Answers

Answer 1

Answer:

A misMatchException is returned.

Explanation: Keyboard.nextDouble(); is expecting a double as an input and the user entered a string first so an error is returned.


Related Questions

A large population of Aloha users manages to generate 50 requests/sec, including both originals and retransmissions. Time is slotted in units of 40 msec.a. What is the chance of success on the first attempt at a given station?b. What is the probability of exactly k collisions (for k = 1, 2,...,10) followed by a success?c. What is the expected number of transmission attempts needed?

Answers

Answer:

a) 0.1353

b) attached below

c) 7.4

Explanation:

Frame transmission rate = 40 msec

Total load  requests = 50 requests /sec

hence

Total arrival rate G in Frames ( G ) / x secs

= 50 request/sec * X sec

= 50 * ( 40*10^-3 )

= 2 requests/ x sec

a) Determine chance of success on first attempt

0.1353

b) Determine the probability of exactly K collisions followed by a success

 attached below

c) what is the expected number of transmission attempts needed

7.4

A large population of Aloha users manages to generate 50 requests/sec, including both originals and retransmissions.

What are two possible challenges of online collaboration?
I A. The lighting for certain team members may be dim.
A B. Team members in different time zones may have difficulty
showing up to meetings.
C. Working on the project can become drawn-out and boring.
D. A slow internet connection can make it difficult to communicate
and access online tools.

Answers

Answer:

B. Team members in different time zones may have difficulty showing up to meetings.

&

D. A slow internet connection can make it difficult to communicate and access online tools.

Explanation:

Working remotely allows for people to collaborate from virtually anywhere, but different time zones could negatively impact the work flow due to drastic differences in time.

In addition, technical difficulties are another issue to keep in mind because of the virtual setting you're working in.

Answer:

B. Team members in different time zones may have difficulty

showing up to meetings.

D. A slow internet connection can make it difficult to communicate

and access online tools.

Explanation:

survey and describe the system

Answers

Survey systems help create, distribute, and analyze surveys by providing a framework for designing questionnaires, managing respondents, and analyzing data.

What is survey?

A survey system lets users create surveys with different question types and response options. The system offers multiple ways to distribute surveys, including sharing a web link, email invites, website embedding, and social media.

Data is collected from respondents and stored accurately and securely, with error checking and validation in place. After survey completion, analyze data with summary stats, visualizations, filters, and cross-tabulations for identifying patterns. Survey systems have reporting features to generate detailed reports based on its data, including statistics, graphs, etc.

Learn more about survey  from

https://brainly.com/question/14610641

#SPJ1

How DNS service are to be deployed on the network (15 -30 words)

Answers

Each device connected to the Internet has a unique IP address which other machines use to find the device. DNS servers eliminate the need for humans to memorize IP addresses such as 192.168.1.1 (in IPv4), or more complex newer alphanumeric IP addresses such as 2400:cb00:2048:1::c629:d7a2 (in IPv6).

A technology that helps instructors evaluate their students learning

Answers

Answer:

calculators im not sure?

Explanation:

sorry if i couldnt help

And office now has a total of 35 employees 11 were added last year the year prior there was a 500% increase in staff how many staff members were in the office before the increase

Answers

There were 5 staff members in the office before the increase.

To find the number of staff members in the office before the increase, we can work backward from the given information.

Let's start with the current total of 35 employees. It is stated that 11 employees were added last year.

Therefore, if we subtract 11 from the current total, we can determine the number of employees before the addition: 35 - 11 = 24.

Moving on to the information about the year prior, it states that there was a 500% increase in staff.

To calculate this, we need to find the original number of employees and then determine what 500% of that number is.

Let's assume the original number of employees before the increase was x.

If we had a 500% increase, it means the number of employees multiplied by 5. So, we can write the equation:

5 * x = 24

Dividing both sides of the equation by 5, we find:

x = 24 / 5 = 4.8

However, the number of employees cannot be a fraction or a decimal, so we round it to the nearest whole number.

Thus, before the increase, there were 5 employees in the office.

For more questions on staff members

https://brainly.com/question/30298095

#SPJ8

Which statement best describes the two main families of fonts

Answers

Answer:

There are five basic classifications of typefaces: serif, sans serif, script, monospaced, and display.

Explanation:

In Design view, which button should be selected in order to add a combo box to form?

Controls
Tab Order
Property Sheet
Add Existing Fields​

Answers

Answer:

controls

Explanation:

A combo box is a drop-down menu that lists multiple predefined choices. A viewer of the form can select only one of the choices.

Consider a 16 GByte memory (16G locations each holding one byte). What is the number of address lines (N)?

Answers

Answer:

Number of address lines (N) = 34

Explanation:

16G locations each holding 1 byte

           byte

1g    1 - 1 - 1 - 1 - 1 - 1 - 1 - 1

2g

3g

.

.

.

16g

note that; 1 byte = 8 bit

therefore for 16G location, address line(N) will be:

since it is known that \(2^{N}\) = 16G   ,and   1 gigabyte = \(2^{30}\) byte

∴ 16G = 16 × \(2^{30}\)

          = 2⁴ × 2³⁰

          = 2³⁴

since \(2^{N}\) = 16G

∴    \(2^{N}\) = 2³⁴

N = 34


how do I turn it on the orange button isn’t working :,)

how do I turn it on the orange button isnt working :,)

Answers

Answer:

keep holding it

Explanation:

Hold the button for 30 seconds

what are the main components involved in data transmission​

Answers

Answer:

connection

Explanation:

connection between each device

25 Points !! HELP ASAP . DUE TOMORROW MORNING .

Imagine you are scrolling through your social media and you see these two links, which one would you click on? Why? Explain answer 2-3 sentences long .

25 Points !! HELP ASAP . DUE TOMORROW MORNING . Imagine you are scrolling through your social media and

Answers

Answer:

The Associated Press

Explanation:

Out of the two options presented, The Associated Press caught my attention more due to its compelling content. The content displayed is visually appealing and likely to pique one's curiosity, motivating one to seek further information.

C++ code

Your task is to write a program that parses the log of visits to a website to extract some information about the visitors. Your program should read from a file called WebLog.txt which will consist of an unknown number of lines. Each line consists of the following pieces of data separated by tabs:

IPAddress Username Date Time Minutes

Where Date is in the format d-Mon-yy (day, Month as three letters, then year as two digits) and Time is listed in 24-hour time.

Read in the entire file and print out each record from April (do not print records from other months) in the format:

username m/d/yy hour:minuteAM/PM duration

Where m/d/yy is a date in the format month number, day number, year and the time is listed in 12-hour time (with AM/PM).

For example, the record:

82.85.127.184 dgounin4 19-Apr-18 13:26:16 13

Should be printed as something like:

dgounin4 4/19/18 1:26PM 13

At the top of the output, you should label the columns and the columns of data on each row should be lined up nicely. Your final output should look something like:

Name Date Time Minutes
chardwick0 4/9/18 5:54PM 1
dgounin4 4/19/18 1:26PM 13
cbridgewaterb 4/2/18 2:24AM 5
...(rest of April records)
Make sure that you read the right input file name. Capitalization counts!

Do not use a hard-coded path to a particular directory, like "C:\Stuff\WebLog.txt". Your code must open a file that is just called "WebLog.txt".

Do not submit the test file; I will use my own.

Here is a sample data file you can use during development. Note that this file has 100 lines, but when I test your program, I will not use this exact file. You cannot count on there always being exactly 100 records.

Hints
Make sure you can open the file and read something before trying to solve the whole problem. Get your copy of WebLog.txt stored in the folder with your code, then try to open it, read in the first string (195.32.239.235), and just print it out. Until you get that working, you shouldn't be worried about anything else.

Work your way to a final program. Maybe start by just handling one line. Get that working before you try to add a loop. And initially don't worry about chopping up what you read so you can print the final data, just read and print. Worry about adding code to chop up the strings you read one part at a time.

Remember, my test file will have a different number of lines.

You can read in something like 13:26:16 all as one big string, or as an int, a char (:), an int, a char (:), and another int.

If you need to turn a string into an int or a double, you can use this method:

string foo = "123";
int x = stoi(foo); //convert string to int

string bar = "123.5";
double y = stod(bar); //convert string to double
If you need to turn an int or double into a string use to_string()

int x = 100;
string s = to_string(x); //s now is "100"

Answers

A good example C++ code that parses the log file and extracts by the use of required information  is given below

What is the C++ code?

C++ is a widely regarded programming language for developing extensive applications due to its status as an object-oriented language. C++ builds upon and extends the capabilities of the C language.

Java is a programming language that has similarities with C++, so for the code given,  Put WebLog.txt in the same directory as your C++ code file. The program reads the log file, checks if the record is from April, and prints the output. The Code assumes proper format & valid data in log file (WebLog.txt), no empty lines or whitespace.

Learn more about  C++ code  from

https://brainly.com/question/28959658

#SPJ1

C++ code Your task is to write a program that parses the log of visits to a website to extract some information
C++ code Your task is to write a program that parses the log of visits to a website to extract some information

value of 3.0+4.0×6.0​

Answers

The answer is 27.0. This is just BEDMAS right?

true or false you can create a. network with 2 computers?

Answers

Explanation:

true true jsjsdkdkskdkdksksksksk

Answer:

True :)

Explanation:

Use the class below to determine IF there is an error or if some part of the code is missing.

public class acceptInput {
public static void main (String[ ] args) {

Scanner scan = new Scanner (System.in);
System.out.println("How old are you? ");
int age = scan.nextInt();
System.out.println("Wow you are " + age + " years old. ");

}
}

- Scanner object has been declared incorrectly
- .nextInteger() should be used to accept an integer from the user.
- Age variable is not correctly printed in the sentence
- import java.util.Scanner; is missing
- Program runs as expected

Answers

Based on the given class below:

public class acceptInput {

public static void main (String[ ] args) {

Scanner scan = new Scanner (System.in);

System.out.println("How old are you? ");

int age = scan.nextInt();

System.out.println("Wow you are " + age + " years old. ");

}

}

The error that can be seen here is that the Scanner object has not been created

What is Debugging?

This refers to the term that is used to describe finding errors in a given program or system that prevents a code from properly executing and involves certain steps and processes.

Hence, it can be seen that the error in the code above is that there is the use of the Scanner object, but it is yet to be created which would return errors when the program is being run.

Read more about debugging here:

https://brainly.com/question/15079851

#SPJ1

Write a program that rolls two dice until the user gets snake eyes. You should use a loop and a half to do this. Each round you should roll two dice (Hint: use the randint function!), and print out their values. If the values on both dice are 1, then it is called snake eyes, and you should break out of the loop. You should also use a variable to keep track of how many rolls it takes to get snake eyes.

Sample Run:

Rolled: 6 5
Rolled: 5 2
Rolled: 3 6
Rolled: 6 2
Rolled: 1 2
Rolled: 5 3
Rolled: 1 4
Rolled: 1 1
It took you 8 rolls to get snake eyes.

I have most of the code but when it prints it say you rolled 0 times every time.
import random

# Enter your code here

num_rolls = 0


import random
# Enter your code here

while True:

roll_one = random.randint(1,6)
roll_two = random.randint(1,6)
print ("Rolled: " +str(roll_one) +"," + str(roll_two))
if (roll_one == 1 and roll_two == 1):
print ("it took you " + str(num_rolls) + " rolls")
break

output:
Rolled: 3,5
Rolled: 6,4
Rolled: 2,4
Rolled: 3,6
Rolled: 5,2
Rolled: 1,1
it took you 0 rolls

suppose to say:
It took you (however many rolls) not 0

Answers

import random

num_rolls = 0

while True:

   r1 = random.randint(1, 6)

   r2 = random.randint(1, 6)

   print("Rolled: " + str(r1) + "," + str(r2))

   num_rolls += 1

   if r1 == r2 == 1:

       break

print("It took you "+str(num_rolls)+" rolls")

I added the working code. You don't appear to be adding to num_rolls at all. I wrote my code in python 3.8. I hope this helps.

The program uses loops and conditional statements.

Loops perform repetitive operations, while conditional statements are statements used to make decisions

The program in Python where comments are used to explain each line is as follows:

#This imports the random module

import random

#This initializes the number of rolls to 0

num_rolls = 0

#The following loop is repeated until both rolls are 1

while True:

   #This simulates roll 1

   roll_one = random.randint(1,6)

   #This simulates roll 2

   roll_two = random.randint(1,6)

   #This prints the outcome of each roll

   print ("Rolled: " +str(roll_one) +"," + str(roll_two))

   #This counts the number of rolls

   num_rolls+=1

   #When both rolls are the 1

   if (roll_one == 1 and roll_two == 1):

       #This exits the loop

       break

#This prints the number of rolls

print ("it took you " + str(num_rolls) + " rolls")

Read more about similar programs at:

https://brainly.com/question/14912735

The arrows in this question indicated the determination of two attributes. For example, the arrow that goes ProductID to ProductDescription indicates that ProductID determines the ProductDescription. This in turn means that ProductId can be considered as primary key for ProductDescription. a) Write the tables b) Place the tables in 3rd normal form (if necessary) c) Create ERD based on the normalized tables

Answers

Abcdefghijklmnopqrsosossss

the time base for a timer instruction is 0.01 seconds. what is the delay time if the preset value is 3000

Answers

Answer:

suppose time base is set to 0.1 and delay increment is set to 50. timer has 5 sec delay (0.1*50)

not sure.

This is C++
Enter wall height (feet):
12
Enter wall width (feet):
15
Wall area: 180 square feet
(2) Extend to also calculate and output the amount of paint in gallons needed to paint the wall. Assume a gallon of paint covers 350 square feet. Store this value using a const double variable. (2 pts)
Enter wall height (feet):
12
Enter wall width (feet):
15
Wall area: 180 square feet
Paint needed: 0.514286 gallons
(3) Extend to also calculate and output the number of 1 gallon cans needed to paint the wall. Hint: Use a math function to round up to the nearest gallon. (2 pts)
Enter wall height (feet):
12
Enter wall width (feet):
15
Wall area: 180 square feet
Paint needed: 0.514286 gallons
Cans needed: 1 can(s)

Answers

Answer:

#include <cmath>

#include<iostream>

using namespace std;

int main()

{

double height, width;

cout<<"Enter wall height (feet): ";

cin>>height;

cout<<"Enter wall width (feet):  ";

cin>>width;

//1

double area;

area = width * height;

cout<<"Wall area: "<<area<<" square feet"<<"\n";

//2

const double gallon = area/350.0;

cout<<"Paint needed: "<<gallon<<" gallons"<<"\n";

//3

cout << "Cans needed :" << round(gallon) << " can(s)";  

return 0;

}

Explanation:

This line declares the height and width as double

double height, width;

This line prompts user for height

cout<<"Enter wall height (feet): ";

This line gets user input for height

cin>>height;

This line prompts user for width

cout<<"Enter wall width (feet):  ";

This line gets user input for width

cin>>width;

//1  Question 1 begins here

This line declares area as double

double area;

The line calculates area

area = width * height;

The line prints the calculated area

cout<<"Wall area: "<<area<<" square feet"<<"\n";

//2  Question 2 begins here

This line declares and calculates gallon as a constant double variable

const double gallon = area/350.0;

This line prints the calculated gallon

cout<<"Paint needed: "<<gallon<<" gallons"<<"\n";

//3  Question 3 begins here

This line rounds gallon to nearest whole number and prints the result

cout << "Cans needed :" << round(gallon) << " can(s)";  

Anna is creating a digital portfolio, including her professional work showcasing the designs she created. What should she add to each work?

A. brief description of the work and project details
B. only title of the work
C. only date and title of the work
D. only project details of the work

Answers

A. Brief description of the work and project details.

Which of the following statements is true of a pie chart?
a) It uses vertical bars sized relative to the values in the data series.
b) It uses horizontal bars sized relative to the values in the data series.
c) It uses horizontal bars sized relative to the values in the data series.
d) It connects data values with lines.

Answers

Answer:

d

Explanation:

The global communication network that allows computers to connect and pass through information is called?

Answers

Answer: Internet

Explanation:

Answer:

The Internet.

Explanation:

2. Answer any
a. What are the reasons that determine that God is great?
Illustrate. (God's Grandeur)
b. How does Mrs. Mooney succeed in her mission at the
end? Explain. (The Boarding House)
C. Why is Martin Luther King's speech so popular till now
Explain. (I Have a Dream)
d. How were the handicapped, black and weak childre
viewed in the past? (The Children who Wait)
e. Why is Lydia Pinkham the most notable character in th
essay? Explain.(Women's Business)
f. What are the consequences of overpopulation? Sugges
some of the solutions of it. (Two long Term Problems​

Answers

Answer:

C

Explanation:

martin luther kings speech is being restated in todays current events in the BLM protests because martin luther king was basically fighting for black peoples rights and the 14th and 15th amendments were supposed to help black peoples rights and freedom but today people aret following that because of police violence/brutality

When a Cascading Style Sheets (CSS) document is _____, it confirms that all of the code is correct and follows the established rules for CSS.

Answers

Answer:

validated

Explanation:

This occurs when the Cascading Style Sheets (CSS) document is validated. Being validated basically means that it was approved. Before a CSS document is called to be used in the website it is first scanned completely in order to make sure that the entire code is correctly written and that there are no errors and that it follows CSS coding rules. Once approved it is executed and applied to the website which it is attached to.

I need help finishing this coding section, I am lost on what I am being asked.

I need help finishing this coding section, I am lost on what I am being asked.
I need help finishing this coding section, I am lost on what I am being asked.
I need help finishing this coding section, I am lost on what I am being asked.

Answers

Answer:

when cmd is open tell me

Explanation:

use cmd for better explanatios

Write the Number class that can be used to test if the number is odd, even, and perfect. A perfect number is any number that is equal to the sum of its divisors. Write the NumberAnalyzer class that has an ArrayList of Number to determine how many numbers in the list are odd, even, and perfect.

Answers

Answer:

Explanation:

The following code is written in Python. It creates a class that takes in one ArrayList parameter and loops through it and calls two functions that check if the numbers are Perfect, Odd, or Even. Then it goes counting each and printing the final results to the screen.

class NumberAnalyzer:

   def __init__(self, myArray):

       perfect = 0

       odd = 0

       even = 0

       for element in myArray:

           if self.isPerfect(element) == True:

               perfect += 1

           else:

               if self.isEven(element) == True:

                   even += 1

               else:

                   odd += 1

       print("# of Perfect elements: " + str(perfect))

       print("# of Even elements: " + str(even))

       print("# of Odd elements: " + str(odd))

   def isPerfect(self, number):

       sum = 1

       i = 2

       while i * i <= number:

           if number % i == 0:

               sum = sum + i + number / i

           i += 1

       if number == sum:

           return True

       else:

           return False

   def isEven(self, number):

       if (number % 2) == 0:

           return True

       else:

           return False

clicker game creating in code.org (PLEASE HELP FAST!!!)

clicker game creating in code.org (PLEASE HELP FAST!!!)

Answers

Use code.org's visual programming tools to create a clicker game by adding buttons, score tracking, and event handlers.

To create a clicker game in code.org, you can use the visual programming tools available.

Follow these steps:

1) Start by designing the game interface.

Add buttons, labels, and any other elements you want to display.

2) Create a variable to track the score or points in your game.

Initialize it to 0.

3) Add an event handler to the button's click event.

When the button is clicked, increment the score variable by a specific amount.

4) Update the score display to reflect the updated score value.

5) Consider adding a timer or level system to make the game more challenging.

6) Add sound effects or animations to enhance the user experience.

7) Test and debug your game to ensure it functions as intended.

8) Share and enjoy your clicker game with others.

For more such questions on Visual programming:

https://brainly.com/question/29362725

#SPJ11

There is a limit of 15 slides that PowerPoint will allow you to have for any presentation:
O True
O False

Answers

True there is a limit to slides on power point

Real world simulations are too expensive or dangerous to test can be represented using computer ____-

Answers

Answer:

Ok, sure.

Explanation:

Real world simulations are too expensive or dangerous to test can be represented using computer models.

Other Questions
Green light has a wavelength of 500nm in air.(ii). The green light is sent into a Michelson interferometer that is adjusted to produce a central bright circle. How far must the interferometer's moving mirror be shifted to change the center of the pattern into a dark circle? Choose from the same possibilities as in part (i). (a) 1000 nm(b) 500 nm(c) 250 nm(d) 125 nm(e) 62.5 nm . review the first capture file (nokia) and determine what is happening with the 802.11 traffic. hint: use the analyze/conversation filter d. describe the traffic: what packets are involved and what is happening? (include source, destination, time of capture) e. take a screenshot of the actual packets within the capture file that you observed this behavior. Cost International had sales of $2,000,000 and Cost of Goods Sold of $800,000. What is their gross profit percentage? ....................... Cost International had beginning inventory of $300,000. Purchased $100,000 of inventory and had cost of goods sold of $50,000. What is Cost Internationals ending inventory balance? $400,000 $50,000 $300,000 $350,000 The first four topics can be summarized using the acronym C.A.L.M. to explain why teaching about the Bible and Christianity can be done in public schools. What does C.A.L.M. stand for True False A "prisoners dilemma" situation in which a failure to cooperate leaves both parties worse off is less likely in a multi-period game than in a single-period game. True False Name and explain at least three ways in which Zondo commission does or does not comply with specific reference to the coverage Which of these pairings wouldcreate an octet for each atom?A. one calcium atom and sulfur atomB. one lithium atom and one sulfur atomC. one strontium atom and one nitrogen atomD. one aluminum atom and one oxygen atom HELP ME OUT PLS!!!! The graph shows the distance traveled by 4 runners and the time it took for their race. Which colored line on the graph represents the slowest runner? blue yellow green red pls help me i will make u a brainestIn a virtual reality game, Ansh places 5 identical cards on a perfectly flat table as shown below. What is x + y? P-please. Help me with question 12 Evaluate the expression for the given value of the variable. 41 + 5/7t = t= -1/2 41 + 5.7t= Answer? What is the y-intercept of this line?y = x - 2b = [?] Sherrie's biology class is studying the ability of a certain microbe to dissipate oil spilled in seawater. to be effective the population of microbes must grow exponentially. she has recorded the microbe population growth as follows: # days after march 1st 0, 1, 5, 10 population 57, 95, 700, 8525 a. using sherrie's data, find the best exponential equation for this growth using the substitution method. must show work. b. using the same data get an equation using calculator's regression feature. then estimate the microbe population on march 21st Who was the first romantic poet? Give 1 example of a chemical reaction that is involved in coralbleaching. the series of events in a story that develop a problem for the characters, lead up to a climax and provide a resolution to the problem is termed as Why is the event of the old man freeing the stork so important to the story?1.It makes the old woman proud of the old man for doing a good deed.2.It leads to the stork changing into a young girl to repay the old man.3.It causes the old man to feel warm inside, which protects him from the cold. Do you think the Aztecs helped bring about their own downfall? Explain. (Please respond, using text support (14-15 magazine) in at least 5-10 complete 7th grade sentences) many neurons contain and release two neurotransmitters. this situation is called Four possible obtacles you may face in trying to achieve a career as your life-goal