1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
aniked [119]
3 years ago
7

Write a method that takes three numerical String values and sums their values. For example, the call sumStrings("1", "5", "7") w

ould return 13. This is done in Java.
Computers and Technology
1 answer:
masha68 [24]3 years ago
7 0

Answer:

public static int sumStrings(String s1, String s2, String s3) {

       int i1 = Integer.parseInt(s1);

       int i2 = Integer.parseInt(s2);

       int i3 = Integer.parseInt(s3);

       

       int sum = i1 + i2 + i3;

       return sum;

   }

Explanation:

- Create a method called <em>sumStrings</em> that takes three strings

- Convert each string to integer using Integer.parseInt() method

- Sum the strings

- Return the result

You might be interested in
A client contacted you to request your help in researching and supplying the hardware necessary to implement a SOHO solution at
erastova [34]

Answer:

The correct answer to the following question will be "DHCP server".

Explanation:

A network manager that dynamically supplies and delegates equipment of clients with their IP addresses, standard portals and some other networking specifications, known as DHCP server.

  • It depends on the standard operating procedure classified as Dynamic Host Configuration Protocol to answer to client-specific broadcasting commands.
  • It's used to optimize the authentication mechanism of computers on IP channels, enabling them using applications and services including NTP, DNS, and any UDP or TCP-based networking protocol.

Therefore, the DHCP server is the right answer.

7 0
3 years ago
Write a program to draw a text-based graph of a mathematical function f(x)
Makovka662 [10]
I have a very good example of the program you need written on Python. You can use this (sorry for bad tabulation):
import math import math def main(): function = input("Enter a function f(x):\n") x = 0 y = 0 for rows in range(10,-11,-1): for col in range(-10,11,1): x=col roundfx = round(eval(function)) if roundfx == rows: print("o", end="") if rows==0 and col==0 and not rows == roundfx: print("+", end="") if col == 0 and not rows == 0 and not rows == roundfx: print("|", end="") if rows==0 and not col==0 and not rows == roundfx: print("-", end="") else: if not rows == 0: if not col == 0: if not rows == roundfx: print(" ", end="") print() main()
4 0
3 years ago
Develop a CPP program to test is an array conforms heap ordered binary tree. This program read data from cin (console) and gives
mafiozo [28]

Answer:

Following are the code to this question:

#include<iostream>//import header file

using namespace std;

int main()//defining main method

{

int ar[7];//defining 1_D array that stores value      

int i,x=0,l1=1,j; //defining integer variable

for(i=0;i<7;i++)//defining for loop for input value from user ends  

{

cout<<"Enter a Number: ";//print message

cin>>ar[i];//input value in array

if(l1<=2 && i>0)//using if block that checks the array values  

{

x++;//increment the value of x by 1  

}

if(l1>2 && i>0)//using if block that checks the array values  

{

l1=l1-2;//using l1 variable that decrases the l1 value by 2  

}

j=i-x;//using j variable that holds the index of the root of the subtree

if(i>0 && ar[j]>ar[i])// use if block that checks heap condition  

{

l1++; //increment the value of l1 variable

}

if(i>0 && ar[j]<ar[i])// using the if block that violate the heap rule  

{

cout<<ar[i]<<" "<<"Violate the heap";//print message with value

break;//using break keyword  

}

}

return 0;

}

Output:

1)

Enter a Number: -15

Enter a Number: -5

-5 Violate the heap

2)

Enter a Number: 45

Enter a Number: 0

Enter a Number: 55

55 Violate the heap

Explanation:

  • In the above-given C++ language code, an array "ar" and other integer variables " i,x,l1, j" is declared, in which "i" variable used in the loop for input values from the user end.
  • In this loop two, if block is defined, that checks the array values and in the first, if the block it will increment the value of x, and in the second if the block, it will decrease the l1 value by 2.
  • In the next step, j variable is used that is the index of the root of the subtree. In the next step, another if block is used, that checks heap condition, that increment the value of l1 variable. In the, if block it violate the heap rule and print its values.
5 0
3 years ago
The help desk received a call from a user who cannot get any print jobs to print on the locally shared printer. While questionin
erma4kov [3.2K]

Answer:

a. Power cycle the printer.

Explanation:

Power Cycle: To unplug the printer and restart it, is called power cycling. The peripheral devices often tend to stop working and the cause of this is not always easily figured out. So the first and easiest way that can be done to fix this issue is to run a power cycle. For this, you have to turn off the printer and unplug it. Then wait for a few seconds (at least 30) and plug in the printer again. Turn the printer on. Power cycle helps to resolve many basic issues. It is the easiest step to take before checking the printer cable, reinstalling printer or resetting the print spooler.

4 0
3 years ago
Bill is pushing a box with 10 N of force to the left, while Alice is pushing the box with 30 N of force to the right. What is th
Greeley [361]

Answer:

Net force = 20 N

Explanation:

Given that,

Force acting on the left = 10 N

Force acting on the right = 30 N

Let right side is positive and left side is negative. Let the net force acting on the box is F. So,

F = -10+30

F = 20 N

So, the net force on the box is 20 N and it is in right side.

7 0
2 years ago
Other questions:
  • Whats a computer scientist.
    5·2 answers
  • Give some examples of CyberCrime
    9·1 answer
  • Why is fragmentation of an ip packet sometimes required?
    12·1 answer
  • Which of the following would most likely be responsible for configuring firewalls and IDPSs, implementing security software, and
    8·2 answers
  • Emerson needs to tell his browser how to display a web page. Which tool will he use?
    8·2 answers
  • PLEASE VERY IMPORTANT Conduct research on graphic design skills in your area and explore the different courses that they offer l
    12·1 answer
  • Most airlines use very modern hardware and software.<br><br><br> True<br><br> False
    9·1 answer
  • create a function that has an argument is the triple jump distance. It returns the estimate of vertical jump height. The world r
    8·1 answer
  • I neeeeeeeeeeeddddddddddddd help plz ppl
    10·2 answers
  • 2. How does the internet give us the ability to communicate?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!