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
Mnenie [13.5K]
4 years ago
4

Write an application whose main() method holds two integer variables. Assign values to the variables. In turn, pass each value t

o methods named displayTwiceTheNumber(), displayNumberPlusFive(), and displayNumberSquared(). Create each method to perform the task its name implies (for example, displayTwiceTheNumber given the value 10 should display the following: 10 times 2 is 20 Part B: Modify the NumbersDemo class to accept the values of the two integers from a user at the keyboard. Output the answers to the console.
Computers and Technology
1 answer:
mr_godi [17]4 years ago
5 0

I'll provide you with the pseudocode and explanation of what's happening, and you can implement it in the language of your choice!

Part B requires seeing the `NumbersDemo` class. But if you want to get data from the user, you will need to use the appropriate library and functions. For example in Java you would need the Scanner class. Check this: https://www.w3schools.com/java/java_user_input.asp

This is for Part A: https://gist.github.com/Amaazing/74d65fc987fbf86f74e0927cccf7b8ac

It might be difficult to read with the comments, so try take them out and read the code! It's good practice :)

You might be interested in
When should you close the socket python tcp server client.
Aleksandr-060686 [28]
F socket refers to an open TCP connection, the connection is closed. If a stream socket is closed when there is input data queued, the TCP connection is reset rather than being cleanly closed. The descriptor of the socket to be closed

To close the socket you need to call shutdown() first and then close(), and shutdown takes an argument
4 0
3 years ago
Create a Python program that:
Charra [1.4K]

Answer:

```

file = open("trips.txt","r")

file = file.split("\n")

trip_date = []

fuel_used = []

miles_traveled = []

for i in file:

   trip_date.append(i.split(", ")[0])

for i in file:

   fuel_used.append(i.split(", ")[1])

for i in file:

   miles_traveled.append(i.split(", ")[2])

```

This should put the data in their own lists (i didn't test it) but im not going to solve everything for you. The rest is for you to tinker with. You shouldn't throw your question at us and expect an answer. This is the most that I will give you.

Explanation:

4 0
3 years ago
An online apparel website aims to rank on top in the search engine results. Which technique will help the business list itself a
Alex

Answer:

A. using exclusive keywords such as "leather jacket" in an image

Explanation:

A. is the correct answer. This is because generic keywords are hard to be ranked for, as they are general for all. And using exclusive keywords like "while winter jacket" will do but if we use even better keywords like the leather jacket with image will work even better, as Google prefers the images, and as an example an infographic over an article. And it prefers a video over an image, and so forth. And never ever link to phishing websites, the Search engine will ban you.

8 0
4 years ago
Read 2 more answers
A spreadsheet contains the maximum weight and maximum height for fifty dog breeds. The breeds are located in rows, and the weigh
MrRa [10]

Answer:

a. Locate

Explanation:

Question options (obtained on the net):

a. Locate

b. Sort

c. Filter

d. Replace

Explanation:

The largest value of the weights of the dog breed in row 43 is the maximum weight of the dog breed in the row

The 'MAX' formula or the 'Autosum' tool can be used to give the largest value in a row, or column

To locate the maximum value in MS Excel, the ADDRESS and MATCH and MAX functions are combined and entered into the blank cell on the right, specifying the same range for the MAX and MATCH functions, and a '0' for the MATCH function as well as a '1' for the ADDRESS function as follows;

=ADDRESS(MATCH(MAX(A1:E1), A1:E1, 0), 1)

Therefore, to navigate to the maximum weight, Emily should use a <em>locate</em>(ing) tool navigate to the information on the spread sheet

8 0
3 years ago
What is the best motivation that you can do/give to make your employees stay? ​
Lorico [155]

i'd give fringe benefits to them every month

Explanation:

to encourage them to work on the mission statement and the business goal

8 0
3 years ago
Other questions:
  • Local television news networks cover only
    8·2 answers
  • _______ ______ is the creation of a computer program by utilizing pictorial elements. Question 36 options: A. Assembly Programmi
    7·2 answers
  • We will use linear interpolation in a C program to estimate the population of NJ between the years of the census, which takes pl
    10·1 answer
  • What happens if none of the selector values match selector in a simple case expression in pl/sql
    6·1 answer
  • Franklin gave a presentation without any help from others. He didn't smile, and he looked at the floor during the presentation.
    14·1 answer
  • Define the term algorithm and describe how programmers use algorithms when designing a program.
    6·1 answer
  • Describe how a black and white image could be represented in binary
    11·2 answers
  • Which sentence describes a biotechnology method of treating sulfur liquor in the paper industry?
    11·1 answer
  • Select the correct answer.
    15·1 answer
  • Jane wants to type a math assignment involving percentages she wants to insert the percent symbol after typing a number which ke
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!