I just need some help working out this Java code! I can list the instructions below:
Modify the CountSpaces program so that contains a String that holds your favorite inspirational quote. Pass the quote to the calculateSpaces method and return the number of spaces to be displayed in the main method.
We're given this to start however I have been struggling as there are two classes and it's been confusing me. Thanks so much for any help! All good and God Bless!
public class CountSpaces
{
public static void main(String[] args)
{
// write your code here
}
public static int calculateSpaces(String inString)
{
// write your code here
}
}
Answer:
public class CountSpaces
{
public static void main(String[] args)
{
String quote = "The concept of infinity is meaningless inside of an insane human mind.";
int nrSpaces = calculateSpaces(quote);
System.out.println("Nr spaces in your quote is " + nrSpaces);
}
public static int calculateSpaces(String inString)
{
int count = 0;
for (int i = 0; i < inString.length(); i++) {
if (inString.charAt(i) == ' ') {
count++;
}
}
return count;
}
}
Explanation:
In this example there is only one class, and since all methods are static the true concept of the class is not even being used.
Q.No.2. A study of the effect of smoking on sleep patterns is conducted. The measure observed is the time, in minutes, that it takes to fall asleep. These data are obtained: [3] Smokers:69.3 56.0 22.1 47.6 53.2 48.1 52.7 34.4 60.2 43.8 23.2 13.8 Non Smokers: 28.6 25.1 26.4 34.9 28.8 28.4 38.5 30.2 30.6 31.8 41.6 21.1 36.0 37.9 13.9
Answer:
(a) [tex]\bar x_1 = 43.7[/tex] [tex]\bar x_2 = 30.25[/tex]
(b) [tex]\sigma_1 = 16.93[/tex] [tex]\sigma_2 = 7.14[/tex]
(c) Smoking increases the time to fall asleep
Explanation:
Solving (a): The sample mean of each group
Mean is calculated as:
[tex]\bar x = \frac{\sum x}{n}[/tex]
So, we have:
Smokers
[tex]n_1= 12[/tex] and
[tex]\bar x_1 = \frac{69.3 +56.0+ 22.1 +47.6+ 53.2+ 48.1+ 52.7 +34.4+ 60.2 +43.8 +23.2 +13.8}{12}[/tex]
[tex]\bar x_1 = \frac{524.4}{12}[/tex]
[tex]\bar x_1 = 43.7[/tex]
Non Smokers
[tex]n_2 = 15[/tex] and
[tex]\bar x = \frac{28.6 +25.1 +26.4 +34.9 +28.8 +28.4 +38.5 +30.2 +30.6 +31.8 +41.6 +21.1 +36.0 +37.9 +13.9}{15}[/tex]
[tex]\bar x_2 = \frac{453.8}{15}[/tex]
[tex]\bar x_2 = 30.25[/tex]
Solving (b): The standard deviation of each group
This is calculated as:
[tex]\sigma = \sqrt{\frac{\sum(x - \bar x)^2}{n-1}}[/tex]
For smokers
[tex]n_1= 12[/tex]
So:
[tex]\sigma_1 = \sqrt{\frac{(69.3 -43.7)^2+(56.0-43.7)^2+..........+(13.8-43.7)^2}{12-1}}[/tex]
[tex]\sigma_1 = \sqrt{\frac{3152.04}{11}}[/tex]
[tex]\sigma_1 = \sqrt{286.5491}[/tex]
[tex]\sigma_1 = 16.93[/tex]
For non-smokers
[tex]n_2 = 15[/tex]
So:
[tex]\sigma_2 = \sqrt{\frac{(28.6 -30.25)^2+(25.1 -30.25)^2+..........+(13.9 -30.25)^2}{15-1}}[/tex]
[tex]\sigma_2 = \sqrt{\frac{713.2575}{14}}[/tex]
[tex]\sigma_2 = \sqrt{50.9469}[/tex]
[tex]\sigma_2 = 7.14[/tex]
Solving (c): Impact of smoking on time to sleep
In (b), we have:
[tex]\sigma_1 = 16.93[/tex] --- smokers
[tex]\sigma_2 = 7.14[/tex] --- non-smokers
Smokers have larger standard deviation (i.e. large variability) than non-smokers. This means that smokers require more time to fall asleep.
Which area of Xcode provides controls to navigate breakpoints? CORRECT
Answer:
see your answer with full detail in pdf file please download
mark me brainlist
Which statement is true? Select 3 options.
1. Deques can be created empty.
2. Deques are lists.
3. Lists are deques.
4. Deques can contain lists.
5. A deque is a type of collection.
Answer:
2nd statement is True dear!!!
Answer:
Deques can contain lists.
A deque is a type of collection.
Deques can be created empty.
Explanation:
Answers can be found in Edge instructions
"You can make a deque whose members are lists."
"You can create an empty deque or create a deque with a list or a string."
"You have used lists and deques, which are two types of collections used by Python. "
Fill in the blanks
A dash is a human-readable description in the source code of a computer program
Python has dash standard data types
A dash contains items separated by commas and enclosed within square brackets
A dash consists of key-value pairs
dash cannot be changed and use parentheses
Answer:
1. Comment
2. Five (5).
3. Line.
4. Tuple; that
Explanation:
1. A comment is a human-readable description in the source code of a computer program. Thus, it's an annotation or description in the source code of a software program that is readable by humans.
2. Python has five (5) standard data types, these includes; number, string, list, dictionary and tuple.
3. A line contains items separated by commas and enclosed within square brackets i.e [ ]. Thus, it's simply an ordered collection of one or multiple data items.
4. A tuple consists of key-value pairs
that cannot be changed and use parentheses. For example, Newtuple = ("strawberry", "apple", "mango", "banana", "orange").
In today's digital world, companies have created software that makes business communication and productivity more efficient and effective. Explain why it is important for you to know how to use business communication tools such as the Microsoft Office Suite (i.e., Word, PowerPoint, Excel, etc.).
Include examples of some scenarios you faced or may face in the future (as both a student and in your career) that will require you to use these business communication tools.
300 + words
Answer:
Business communications tools are widely used and the world is becoming increasingly digital so not having those skills will hinder you.
Explanation:
Many jobs require knowledge of Microsoft tools as a qualification. By not having that expertise, I will be viewed as less qualified for a position and may be passed up for job. In corporate America, presentations are a staple and Microsoft PowerPoint is the primary software. If I deliver a poor presentation due to inexperience, I will make myself look bad and as a result get a bad quarterly review and possibly stunted any future promotions. On the flipside, as a business owner Excel is a handy tool for tracking expenses. Very customizable, quick and easy to understand.
discuss why ergonomics is important?
Hadoop is : open source software framework designed for distributing data-processing over inexpensive computers. data mining platform designed for storing and analyzing big data produced by web communications and transactions. high-speed platform used to analyze large data sets pre-configured hardware-software system designed for analyzing big data. NoSQL database technology that stores both data and procedures acting on the data as object
Answer: open-source software framework designed for distributing data-processing over inexpensive computers.
Explanation:
Hadoop refers to the collection of open-source software utilities which are important in facilitating the use of a network of several computers to solve big data.
It provides huge storage for different kinds of data, and the ability to handle concurrent tasks virtually. Therefore, the correct option is "open-source software framework designed for distributing data-processing over inexpensive computers".
How do you debug an Xcode project?
A.
by selecting the Debug option in the Tools menu
B.
by clicking on the Debug Navigator
C.
by clicking on the Run button
D.
by clicking on the Debug button on the bottom right
Answer:
in my opinion i think it is "C" by clicking on the run button...
name any three data items that can be you can be encoded using magnetized ink
Answer:
U+2446 ⑆ OCR BRANCH BANK IDENTIFICATION.
U+2447 ⑇ OCR AMOUNT OF CHECK.
U+2448 ⑈ OCR DASH (corrected alias MICR ON US SYMBOL)
U+2446 ⑆ OCR BRANCH BANK IDENTIFICATION, U+2447 ⑇ OCR AMOUNT OF CHECK and U+2448 ⑈ OCR DASH (corrected alias MICR ON US SYMBOL) are the three data items that can be encoded using magnetized ink
What is meant by encoded?Encoding is the process of arranging a string of characters letters, numbers, punctuation, and some symbols in a particular format for quick transmission or storage. The process of converting an encoded format back into the original string of characters is known as decoding.
Thus, the item is mentioned in the above statement.
For more details about encoded, click here:
https://brainly.com/question/18182530
#SPJ2
Which tab is used to create a
new e-mail?
O File
O View
O Folder
O Home
Please help!!!!!!!!!!!!!
Answer:
Mail tab
Explanation:
Please mark as brainliest answer as it will also give you 3 points
spam and i report
Maurice wants to create a variable to store the name of the second-best taco place. Maurice writes the line of code as 2ndtaco = "Tio Dan's" but gets an error message. What is the problem with Maurice’s code?
A.
There can’t be an apostrophe ' in a variable name.
B.
The equals sign should be a dash.
C.
The type of variable wasn’t specified.
D.
A variable name can’t begin with a number.
Answer:
option d is the correct answer
Answer:
For your other question I think it's true
Explanation:
Ana is a music lover. She loves to download songs and videos on her computer every time she hears a new song. One day, her computers started to malfunction, and all her files were no longer accessible. What do you think happened to Ana’s computer and what can you do to avoid the same problem
answer pleasssseeee
Answer:
Storage outage
As many new songs are released to the Internet every day, Anna might have download thousands of them, which made her computer ran out of storage and RAM(random access memory )
You are going to create multiple functions that will take in the appropriate measurements as parameters and calculate the area of the specific shape.
The following shapes must be included:
Square, Triangle, Circle, and Trapezoid
Feel free to add on more shapes if you want!!
Answer:
circle
Explanation:
Answer:
circle
Explanation:
You should not photograph where unless you have permission?
O A public park
O Your backyard
O A parade
O Into someone's window
PLZ HELP ME
Answer:
Into someone's window
Explanation:
We should not photograph into some one's window, unless we have permission
Answer:
Hello There!!
Explanation:
I believe the answer is O Into someone's window.
hope this helps,have a great day!!
~Pinky~
Select three advantages to using digital video.
A) Digital video appears to have more depth.
B) Digital video can capture a greater range of brightness.
C) Digital video is much less expensive than film.
D) Digital video be easily edited and shared.
E) Digital video can be viewed in real time where it was taken.
Answer:
Digital video be easily edited and shared., Digital video is much less expensive than film., Digital video can be viewed in real time where it was taken.
Explanation:
PLEASEEEE HELPPP!!!!! Which graphic design tool should you use to achieve the effect in the image shown here?
A. Move
B. color and painting tools
C. Layers
D. Marquee
E. Crop
Will give brainlist if right!!! Thx
Answer:
I think the answer is b yep b
Read the integer numbers in the text file "1000 Random Number from 0 to 100.txt" into a list
PLEASE HELP THANK U!!
Answer:
random_number_file = open("1000 Random Number from 0 to 100.txt", 'r')
random_number_list = random_number_file.readlines()
print('random_number_list)
Explanation:
The name of the file containing the random integer text is ; "1000 Random Number from 0 to 100.txt"
The random_number_file variable stores the opened file ("1000 Random Number from 0 to 100.txt") using the open keyword and reads it ('r')
This file stored in the random_number_file variable is the read into a list by using the readlines() method on the random_number_file
Suppose a large group of people in a room were all born in the same year. Consider the following three algorithms, which are each intended to identify the people in the room who have the earliest birthday based on just the month and day. For example, a person born on February 10 is considered to have an earlier birthday than a person born on March 5. Which of the three algorithms will identify the correct people?
I. All the people in the room stand up. All standing people form pairs where possible, leaving at most one person not part of a pair. For each pair, the person with the earlier birthday remains standing, while the other person in the pair sits down. If there is a tie, both people sit down. Any individual not part of a pair remains standing. Continue doing this until only one person remains standing. That person has the earliest birthday.
II. All the people in the room stand up. All standing people form pairs with another standing person that they have not previously been paired with where possible, leaving at most one person not part of a pair. For each pair, the person with the earlier birthday remains standing, while the other person in the pair sits down. If there is a tie, both people in the pair remain standing. Any individual not part of a pair remains standing. Continue doing this until only one person remains standing or all persons standing have the same birthday. Anyone still standing has the earliest birthday.
III. Beginning with the number 1, ask if anyone was born on that day of any month. Continue with the numbers 2, 3, and so on until a positive response is received. If only one person responds, that person has the earliest birthday. If more than one person responds, determine which person was born in the earliest month, and that person or those persons have the earliest birthday.
Answer:
II is correct.
Explanation:
Algorithm is a computer program which solves complex problems within minutes. The algorithms has different variants which are used according to user demand. In the given scenario the choice no II is correct. All standing people can form a pair with another standing person and the person standing in the last will have the earliest birthday.
Which option is not available in the Presenter view of a presentation?
Group of answer choices.
A. Next Slide Preview
B. Pen/Laser Pointer tools
C. Open Slide Show
D. Navigation Controls
Answer:
C. Open Slide Show
Explanation:
PowerPoint application can be defined as a software application or program designed and developed by Microsoft, to avail users the ability to 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.
Basically, the views that are available on the Microsoft PowerPoint application includes;
1. Slide Sorter.
2. Notes Page.
3. Reading Pane.
4. Presenter view.
Presenter view avails the user an ability to use two monitors to display his or her presentation. Thus, one of the monitors displays the notes-free presentation to your audience while the other monitor lets you view the presentation with notes that you have added to the slides, as well as the navigation and presentation tools.
Furthermore, the Presenter view was developed by Microsoft Inc. to have the following options;
I. Next Slide Preview.
II. Pen/Laser Pointer tools.
III. Navigation Controls.
However, Open Slide Show is an option which is not available in the Presenter view of a presentation.
Realiza una tabla acerca de los escenarios de usos más comunes de Excel.
Answer:
Microsoft Excel es una hoja de cálculo producida por Microsoft. La aplicación es ampliamente utilizada en empresas e instituciones, así como por usuarios domésticos. Su uso principal es realizar cálculos (por ejemplo, gastos) compilados en forma tabular. Para este uso, se aplican numerosas funciones matemáticas, financieras y de base de datos disponibles en el programa. La duplicación semiautomática de las fórmulas creadas con el uso de diferentes variantes de direccionamiento (direccionamiento relativo, direccionamiento absoluto, direccionamiento mixto) también es de gran importancia. Microsoft Excel también se utiliza para crear muchos tipos de gráficos, útiles, entre otros, en física, matemáticas y economía. También incluye un sistema para la elaboración de informes utilizando el llamado tablas dinámicas, utilizadas en la realización de análisis comerciales.
a. a large central network that connects other networks in a distance spanning exactly 5 miles. b. a group of personal computers or terminals located in the same general area and connected by a common cable (communication circuit) so they can exchange information such as a set of rooms, a single building, or a set of well-connected buildings. c. a network spanning a geographical area that usually encompasses a city or county area (3 to 30 miles). d. a network spanning a large geographical area (up to 1000s of miles). e. a network spanning exactly 10 miles with common carrier circuits.
Complete Question:
A local area network is:
Answer:
b. a group of personal computers or terminals located in the same general area and connected by a common cable (communication circuit) so they can exchange information such as a set of rooms, a single building, or a set of well-connected buildings.
Explanation:
A local area network (LAN) refers to a group of personal computers (PCs) or terminals that are located within the same general area and connected by a common network cable (communication circuit), so that they can exchange information from one node of the network to another. A local area network (LAN) is typically used in small or limited areas such as a set of rooms, a single building, school, hospital, or a set of well-connected buildings.
Generally, some of the network devices or equipments used in a local area network (LAN) are an access point, personal computers, a switch, a router, printer, etc.
Hi there!
I am writing a research paper on Satellite internet. I have about 4 out of 6 pages of information written down. What are some topics to talk about regarding satellites? It does not have to be specifically about satellites. Just some things to add to the paper. I am not sure what subject it fall under, so i'm going to post it twice.
Thank you in advance.
Answer:hi there
Explanation:
Satellite Internet access is Internet access provided through communication satellites. Modern consumer grade satellite Internet service is typically provided to individual users through geostationary satellites that can offer relatively high data speeds
An investment bank has a distributed batch processing application which is hosted in an Auto Scaling group of Spot EC2 instances with an SQS queue. You configured your components to use client-side buffering so that the calls made from the client will be buffered first and then sent as a batch request to SQS. What is a period of time during which the SQS queue prevents other consuming components from receiving and processing a message
Answer: Visibility timeout
Explanation:
The period of time during which the SQS queue prevents other consuming components from receiving and processing a message is known as the visibility timeout.
It is the length of time when a message will be hidden after such message has been grabbed by a consumer. It is essential as it prevents others from processing such message again.
an_is a sepuence of precise instructions which result in a solution
Answer:
algorithm.
Explanation:
An algorithm can be defined as a standard formula or procedures which comprises of set of finite steps or instructions for solving a problem on a computer. The time complexity is a measure of the amount of time required by an algorithm to run till its completion of the task with respect to the length of the input.
Furthermore, the processing symbols and their functions used in developing an algorithm are oval (start or stop), diamond (decision-making), circle (on-page connector), parallelogram (input and output), rectangle (calculation), arrow (flow or direction) and pentagon (off-page connector).
Some of the characteristics of an algorithm include the following;
I. An algorithm can be written using pseudocode. A pseudocode refers to the description of the steps contained in an algorithm using a plain or natural language.
II. An algorithm can be visualized using flowcharts. A flowchart can be defined as a graphical representation of an algorithm for a process or workflow.
In conclusion, an algorithm is a sequence of precise instructions which result in a solution for solving problems using a computer system.
Which of the components of the systems model provides information so
the system can adjust its function? *
A. input
B. feedback
C. process
D. output
Answer: Feedback
Explanation:
The input components of the systems model can consist of resources like people, energy, tools, capital, etc.
The feedback components of the systems model provides information so
the system can adjust its function. An example of the feedback mechanism for a system is the progress bar which shows when one is downloading a file on iTunes.
In 2011, a company called RSA, which provides security services, acknowledged its proprietary authentication system, which is employed by some defense contractors and other high-security industries, was compromised. As a result, the attackers were also able to log into systems at Lockheed Martin, and other companies, using the stolen credentials of legitimate users. This is an example of violation of ___________________.
Answer:
The answer is "Authentication"
Explanation:
The attacker had the opportunity to log into the legitimate users' stolen credentials in Boeing systems and other firms in this question. That's an example of a verification violation.
This is a recognition of the identification of a user. Various students typically require various kinds of certificates in order to create the identity of the user. The credentials are frequently a passcode that only people and the computer know and seem to be confidential.
How long you plan to keep your investments in your portfolio refers to:
A. Time horizon
B. Asset allocation
C. Personal financial health
D. Risk tolerance
Answer:
A, because it has to do with the amount of time you have it in your portfolio.
5.2
Explain ONE reason why the special equipment is used when
testing eyesight for a driver's licence.
(2)
Answer:
In order to reduce the risk of accidents on the roads.
Explanation:
The special equipment is used when testing eyesight for a driver's license in order to reduce the risk of accidents on the roads. Good eyesight is very important for good and safe driving so to find out the eyesight of the driver, the license officer used special equipment in order to check driver's eyes. If the eyesight is good, the officer provide license to the person otherwise not so that no accidents happen on the road.
of the following potential benefits, which is LEAST likely to be provided by the upgraded system?
A Human representatives will not be needed to respond to some inquiries.
B
The company will be able to provide a human representative for any incoming call.
с
Customers are likely to spend less time listening to information not relevant to their issue.
D
Customers will be unable to mistakenly select the incorrect department for their particular issue.
Answer:
The company will be able to provide human representative for any incoming call
Explanation:
The upgrade of a system is meant to resolve identified issues in an initial system and given that the available human representative is usually less than the number of incoming call at a given time, due to a constant drive for a larger customer base, we have;
The upgraded system will provide technologies such that human representative will not be required for some inquiries, customers will listen to mainly relevant information with regards to their issues and customers will be properly directed to the correct department that are concerned with their current issue
Therefore, the LEAST likely goal of the upgraded system from among the options and therefore the least likely to be provided by the upgrade is the company will be able to provide human representative for any incoming call