TASK: Write a static method called repeatString that takes as input a String parameter word followed by an int parameter num. It should return a String that would be the result of repeating word exactly num times. If num is 0 or negative, the method should output an empty string.
HINT: Don't print out anything! Your method should return a string, not print it. print the output of your method behind the scenes to check that your method returns the right string; if you add your own print statements then the output won't be correct.
HINT: Make use of String concatenation!
Answer:
Follows are the method definition to this question:
public static String repeatString(String word, int num)//defining a String method repeatString that takes two parameters
{
String Val= "";//defining String variable Val
for(int x = 0;x<num;x++)//defining for loop to calculate number of string
{
Val=Val+word;//hold calculated value in Val
}
return Val;//return Val value
}
Explanation:
Follows are the full code to this question:
import java.util.*;//import package for user input
public class Main//defining class Main
{
public static String repeatString(String word, int num)//defining a String method repeatString that takes two parameters
{
String Val= "";//defining String variable Val
for(int x = 0;x<num;x++)//defining for loop to calculate number of string
{
Val=Val+word;//hold calculated value in Val
}
return Val;//return Val value
}
public static void main(String[] ar)//defining main method
{
int num;//defining integer variable
String word; //defining String variable
Scanner on=new Scanner(System.in);//creating Scanner class Object
System.out.print("Enter numeric value: ");//print message
num=on.nextInt();//input value
System.out.print("Enter String value: ");//print message
word=on.next();//input value
System.out.print(repeatString(word,num));//call method and print its return value
}
}
Output:
Enter numeric value: 3
Enter String value: data
datadatadata
Description:
Inside the main class, a static string method "repeatString" is defined that accepts two parameters "word and num", in which one is a string and one is an integer.
Inside the method, the string variable "Val" is defined, which uses the "for" loop to calculate the number of string and store its value in the variable.
In the main class, the above two variables are defined, that uses the Scanner class object for input the value and pass into the method and print its value.
Which statement best explains the purpose of using online note-taking tools?
Online note-taking tools guarantee better scores on tests.
Online note-taking tools let students take notes quickly and easily.
Online note-taking tools tell students exactly what they need to study.
Online note-taking tools turn disorganized notes into organized notes.
Answer:
B
i did the instruction
Explanation:
The statement which best explains the purpose of using online note-taking tools is that Online note-taking tools let students take notes quickly and easily. Thus, the correct option for this question is B.
What is an online note-taking tool?An online note-taking tool may be characterized as a type of software tool that significantly allows users to capture, store, and manage voice and text notes on different devices.
It makes note-taking convenient and accessible and allows you to write and study flexibly. Unlike other note-taking apps, you can view documents and take notes at the same time on one screen.
The primary purpose of note-taking is to encourage active learning and to prepare study materials for exams. Developing note-taking skills should help you organize information into an understandable format that will assist in your studying process.
Therefore, the correct option for this question is B.
To learn more about Note-taking tools, refer to the link:
https://brainly.com/question/18546670
#SPJ2
Which devices typically generate computer output? monitor, printer, speaker, projector, keyboard mouse, printer, speaker, projector, Braille embosser monitor, webcam, speaker, projector, 3D printer monitor, printer, speaker, projector, Braille embosser
The devices are monitor, printer, speaker, projector, Braille embosser. The correct option is 4.
What are output devices?Any piece of computer hardware that converts information into a human-perceptible form or, historically, into a physical machine-readable form for use with other non-computerized equipment is considered an output device. Text, graphics, tactile, audio, or video can all be used.
A monitor displays visual output, such as text and images, on a screen.A printer creates physical output on paper or other media, such as text and images.Music, sound effects, and spoken words are all produced by a speaker.A projector projects visual information onto a screen or other flat surface.A Braille embosser generates output in Braille format, which people who are blind or visually impaired can read.Thus, the correct option is 4.
For more details regarding output devices, visit:
https://brainly.com/question/13014449
#SPJ1
Your question seems incomplete, the probable complete question is:
Which devices typically generate computer output?
monitor, printer, speaker, projector, keyboard mouse, printer, speaker, projector, Braille embosser monitor, speaker, projector, 3D printer monitor, printer, speaker, projector, Braille embosserWhich symbol is at the beginning and end of a multiline comment block? &&& """ %%% ###
Answer:
#
Explanation:
I have notes on it we learned it in 8th
###
the other guy was correct.
Select the five factors measured in the big five personality test.
A-extraversion
B-passivity
C-neuroticism
D-Openness
E-passion
F-energy
G-agreeableness
H-Conscientiousness
the answers are:
- a. extraversion
- c. neuroticism
- d. openness
- g. agreeableness
- h. conscientiousness
The five factors measured in the big five personality test are extraversion, neuroticism, openness, agreeableness, and conscientiousness. The correct options are a, c, d, g, and h.
What is personality test?A person's motives, preferences, interests, emotional makeup, and manner of interacting with others and situations are all subjected to a series of questions on personality tests.
A wide range of personality tests are now used, and many of them are based on particular theories or systems of personality.
Personality tests are frequently used in business to evaluate potential hires and assist in forming cohesive teams, as well as in psychology to help clarify diagnoses.
They can also assist people in realizing their talents and limitations so they can develop into their best selves.
The Big Five Personality Test measures extraversion, neuroticism, openness, agreeableness, and conscientiousness as its five main personality traits.
Thus, the correct options are a, c, d, g, and h.
For more details regarding personality test, visit:
https://brainly.com/question/8789865
#SPJ2
What are the key ideas in dealing with a superior?
respect and ethics
respect and understanding
respect and timeliness
respect and communication
Answer:
respect and ethics
Explanation:
What is the difference between Narrow AI and Artificial General Intelligence (AGI)?
(not from google please)
the hardware device that allows the user to see the results after processing is the monitor,scanner,webcam,Camara
Answer:hey
Explanation:
A device is one that is an external device and includes Printer, monitor, keyboard, and scanner. The input device includes the mouse and other point devices.
The camera is also an input device, a web-cam is a external device. The external device that lets the user see the output or the result on the screen is monitor.Hence the option A is correct.
Learn more about the device that allows the user to see the results.
brainly.com/question/25756373.
Write the code for an if statement that adds 5 to the variable num1 if the value stored in the variable testA equals 25. Otherwise subtract 5 from num1.
In python
if testA == 25:
num1 += 5
else:
num1 -= 5
I hope this helps!
so can u please follow my new ig acc i just started it yesterday its called stunnerspamz
Answer:
why are you advertising in brainly?????
Impersonal communication involves _________________. a. sharing personal information b. trying to become friends c. barriers to developing positive relationships d. both b and c
Answer:
its ccccccc
Explanation:
Answer:
c took it on e2020 and got 100 on my test
Explanation:
PLEASE HELP
Question #6
Multiple Select
Which of the following describes an application error? Select 2 options.
O Every time you try to run your new game, it crashes after displaying the opening screen.
After a recent Windows update, you can no longer access the internet on your laptop.
You see a message that the active application has stopped responding to input.
Nothing happens when you press the space bar on your keyboard, but the other keys are working.
Nothing happens when you press the Power button on your desktop PC.
Answer:
A and B
Explanation:
A: In this case, the application/game ran into an error not properly caught/not caught at all. Very little can be done about this error as it typically is a programatical error and not a end user error.
B: In this case, the error is within the Operating System(Windows) or a driver error. This can be fixed, either using troubleshoot or finding the driver to your Wifi Adapter and installing the newest update.
The statements that describes an application error are every time you try to run your new game, it crashes after displaying the opening screen and after a recent Windows update, you can no longer access the internet on your laptop. The correct options are a and b.
What is application error?An application error is defined as a flaw in an application program that causes it to fail and terminate unexpectedly.
Specifically, application errors The Access Violation error is typically caused by your computer's inability to properly sequence the documents and settings necessary to run a specific program or installation.
Many distinctive issues can prompt a Windows program to refuse to respond, freeze, or become unresponsive.
A conflict between the program and the computer's hardware, a lack of system resources, or software bugs, for example, can cause Windows programs to stop responding.
When you try to run your new game, it crashes after displaying the opening screen, and you can no longer access the internet on your laptop due to a recent Windows update.
Thus, the correct options are a and b.
For more details regarding application error, visit:
https://brainly.com/question/14702194
#SPJ5
Please answer quick:))))
Help ASAP!!Choose all the basic elements of algorithms. A.Selection B.Loops C.Flow Charts D.Sequencing E.Combinations F.Iteration
Answer:
b c d
Explanation:
Answer:
A, C, E, F
Explanation:
Just took the test
What is the special set of characters that indicates the start and end of an HTML element and that element's type?
the answer is HTML Tag
How would you declare a variable x of type double and set it equal to 25.25? In JAVA
In java, you have to use the double keyword.
double x = 25.25;
You have to end the statement with a semi-colon. I hope this helps!
guys my (R) key just bwoke and I have to copy and paste it every time I want to use it so now I'm talking in this nasty UwU voice... like the wide is every long and wuff like I can't evennnnn ahAHHAHAAAHAhahaHHAHh help please I don't know what to dooooooo like I can't even spell my own name like who am I now audwee
Answer:
Copy (Ctrl+c) Paste (Ctrl+v) Cant you click the rubber thing under the key you broke hoped i helped
Explanation:
Answer: then use a new keyboard or suffer with the UwU WHatS tHiS
Explanation:
hey yall i need help with email plz explain to me what happened
Answer: Oh looks like they disabled it :/ you should wait a little while so they can fix it I’m guessing
Explanation:
Answer:
Hi, I can try to help you.
I am on the software development club of my high school, and I also attended a summer camp at Google's headquarters. The steps below are written by me.
Explanation:
I have lots of experience with computers and Google. Generally, this problem usually happens when there's too much happening with your google account. This could happen from too many devices being logged into your account, or from sending/receiving a very large amount of messages. One common thing that happens is that there can be too many cookies and your computer cache may become full.
I recommend taking these steps:
1. Make sure you're not logged into your account on too many devices. If you are, for example, logged into the account on an iPad, iPhone, Macbook air, and a Mac, then you need to log out of the account on the devices you're not using at the time.
2. Clear your browsing history and cache. On a Macbook, just go to the top bar and click "History." Then, click "Show Full History" and then click "Clear Browing Data and Cache." This can resolve the issue.
3. If the issue is not resolved, restart your computer. This helps by rebooting your computer, and often you just need to restart it to resolve the issue.
4. If that hasn't worked, then I recommend that you wait. Generally, Google will unfreeze your account in a couple hours or so. If the above steps don't work, I recommend just waiting it out.
I hope this helps! If you feel this helped, feel free to give me Brainliest. :)
On the Cities worksheet, click cell F13. The lodging is based on a multiplier by City Type. Some cities are more expensive than others. Insert a VLOOKUP function that looks up the City Type (B13), compares it to the City/COL range (A7:B10), and returns the COL percentage. Then multiply the result of the lookup function by the Total Base Lodging (B5) to get the estimated lodging for the first city. Copy the function from cell F13 and use the Paste Formulas option to copy the function to the range F14:F18 without removing the border in cell F18.
Answer:
I have found and attached a spreadsheet (cities.xlsx) that matches this question.
First we remember the VLOOKUP sintax:
=VLOOKUP (lookup_value, table_array, col_index_num, [range_lookup])
We need to look up the City Type (B13),
compare it to the City/COL range (A7:B10),
and return the COL percentage (2nd column of City/COL)
so the VLOOKUP function on cell F13 has to be:
=VLOOKUP(B13,$A$7:$B$10,2)
Next, to multiply the result by the Total Base Lodging (B5):
=VLOOKUP(B13,$A$7:$B$10,2) *$B$5
Finally que copy the formula to the F14:F18 cells
Notice the use of $ to make cells static and avoid errors while copying the formulas to different cells.
I have attached the completed spreadsheet as "cities final.xlsx"
The individual pages on a website should maintain a consistent layout and style from one page to the next.
True or False
Answer:
I think they should.
Explanation:
It would be very confusing for people using the website to go from one page to the next and have the two pages look completely different.
Answer:
True
Explanation:
I WILL GIVE BRAINLIEST TO WHO ANSWERS FIRST AND CORRECTLY.
How do you add text to a blank slide layout?
Select text from the Insert menu.
Click in the Task Pane and insert text.
You can't add text to a blank slide layout.
Draw a text box and enter text.
\The answer is B; Draw a text box and enter text
By default, we add text to a PowerPoint slide by typing it directly into a placeholder. However, you can use a text box to enter text into a blank slide or outside the placeholders. To add text on a blank slide click on the insert menu and select the Text box option. Click and hold down your mouse button while you drag the mouse. You will then clink inside the text box and starting typing.
Shannon wants to work with renewable energy. She is researching what it would take to become a geochemist. A geochemist is someone who uses chemistry to study water and elements in it. What skill or ability well Shannon need to be the most effective in this position?
Answer:
Critical thinking
Explanation:
Shannon needs to be a Critical thinker to be effective in this position. Critical thinking has to do with giving deep and good thoughts while doing analysis, or assessment in other to come up with good judgements about a subject or topic.
Since she is going to be studying water and elements in it, she would be doing a lot of analysis and assessments and In other to do good in her field she must learn to think critically before arriving at her conclusions.
Answer:
Critical thinking
Explanation:
Shannon needs to be a Critical thinker to be effective in this position. Critical thinking has to do with giving deep and good thoughts while doing analysis, or assessment in other to come up with good judgements about a subject or topic.
Since she is going to be studying water and elements in it, she would be doing a lot of analysis and assessments and In other to do good in her field she must learn to think critically before arriving at her conclusions.
What is the purpose of a computer toolbar?
A. To alphabetize programs
B. To hold frequently used icons
C. To organize files
D. To view all files in the computer
Answer:
B
Explanation:
In computer interface design, a toolbar (originally known as ribbon) is a graphical control element on which on-screen buttons, icons, menus, or other input or output elements are placed. Toolbars are seen in many types of software such as office suites, graphics editors and web browsers.
The purpose of a computer toolbar is to hold frequently used icons. The correct option is B.
What is toolbar?A Toolbar is a group of buttons or icons which are the integral part of the window or any software program's interface. Toolbar of the software program's interface has all commands under the menu bar.
In the computer interface, a toolbar has on-screen buttons, icons, menus. Toolbars are available in office suites, graphics editors and web browsers.
Thus, the purpose of a computer toolbar is to hold frequently used icons. The correct option is B.
Learn more about toolbar.
https://brainly.com/question/11496721
#SPJ2
Which is the faster cpu and why?
Answer:
Core i7 unlocked
Explanation:
This is known to not only be faster but also more stable.
Answer:
Intel Core i7 Unlocked has more GHz (gigahertz) along with an Octa core.
Explanation:
More gigahertz means your CPU would run all applications at a faster speed and be more efficient. Not only that, an octa core is much more efficient than a quad core. (Octa meaning 8 while Quad being 4).
5. Choose the correct options:
a. Each bead in the heaven of Abacus has .... value
i) One
ii) Three
iii) Five
iv) None of the above
Answer:
in my opinion the answer is number 2 three opinion the answer is correct then mark me as brain list
I WILL GIVE BRAINLIEST TO WHO ANSWERS FIRST AND CORRECTLY.
All slides in a presentation must use the same transition.
True
False
Answer:
true
Explanation:
this device can be used to type documents,send email,browse the internet,handle the spreadsheets,do presentations,play games,and more?
Answer:
im pretty a computer
Explanation:
A computer is an electronic device that manipulates information, or data. It has the ability to store, retrieve, and process data. You may already know that you can use a computer to type documents, send email, play games, and browse the Web.
Why do filmmakers release trailers?
A. To arouse interest in viewers
B. To compete with other filmmakers
C. To dramatically announce the film’s release date
D. To see how the movie looks on the big screen
Repl.it Assignment 4.1.3 (Max and Min)
Please help me
I will give brainliest and a like
I WILL GIVE BRAINLIEST TO WHO ANSWERS FIRST AND CORRECTLY.
select all that apply
What guidelines should you follow when adding graphics to your presentations?
They should be used to make a bad presentation better.
Graphics should appear on each slide.
Graphics should only be used when they improve the communication.
Their size should be appropriate for viewing by your audience.
They should be relevant and appropriate to the content.
Answer:
the third and the last one