Write a method that takes a Rectangle as a parameter, and changes the width so it becomes a square (i.e. the width is set to the value of the length) (java)

Answers

Answer 1

Answer:

Explanation:

The following code is written in Java, it is a function/method that takes in the length and width of the Rectangle as parameters and then overwrites the width to match the length. Then it prints both the length and width.

   public static void rectangleToSquare(int width, int length) {

       width = length;

       System.out.println("Width: " + width);

       System.out.println("Length: " + length);

       

   }

Answer 2

The program takes the dimension of rectangle and transforms the width to the value of the length in other to be use to calculate the value of square. The program goes thus :

def change_width(length, width):

#initialize a function which takes two parameters

width = length

#assign the value of length to width

return length * width

#returns the area of square

print(change_width(6,2))

A sample run of the program is attached.

Learn more : https://brainly.com/question/15180104

Write A Method That Takes A Rectangle As A Parameter, And Changes The Width So It Becomes A Square (i.e.

Related Questions

Which is an example of machine-to-machine communication?
A.
talking to a friend
B.
a computer connecting to a server
C.
a computer doing statistical analysis
D.
playing a video game
E.
talking on the phone to a family member

Answers

Answer:

E or A

Explanation:

Answer:

B. a computer connecting to a server

Explanation:

What is an accessor in Java?

A
It's how Java accesses databases.

B
It's what Java classes use to get access to disk files.

C
It's a method that retrieves information from private class attributes.

D
It's a means of accessing the names of attributes in a class.

Answers

A because I know this I hade this in my class too

iḿ single wwwhhhyyyy

Answers

It sucks but I am too it Is gonna be ok

Which shortcut key aligns text to the center of a page?

Ctrl+C
Ctrl+Shift+C
Shift+C
Ctrl+E

Answers

D. Ctrl+E

Aligns the line or selected text to the center of the screen.

Answer:

d

Explanation:

8) What do the following programs print? Ishow the tables of variables in memory.
a)
def main() :
a = 5
b = 7
print (mystery (a, b))
def mystery (x, y) :
z = x + y
2 2 / 2.0
return z
main()
What does show the tables of variables in memory mean?

Answers

Answer:

The output prints 12.

Explanation:

pro scooters or skateboards

Answers

Answer:

pro scooter here.

Explanation:

i growed up with scooters and i thought i was the coolest lol.

im acutally thinking about getting a skate borad but who knows i might die on it

These might be areas employers will ask about regarding your high school performance.


friends

teachers

attendance

grades

Answers

Answer:

Option No. 4: Grades is the correct answer

Explanation:

When a company hires any personnel for a job or service they are concerned about their skills and professional attitude. Grades are usually a source to determine how well a person performs in a skill or how much knowledge does a person has about a specific field.

Out of all the given options, an employer will certainly be interested in a person's grades to determine how well he performs in a service.

Hence,

Option No. 4: Grades is the correct answer

Answer: Grades & Attendance

Explanation: maybe its just my test but edge says its both :)

According to the segment, which of the following should graphic designers maintain?


Answers

Answer:D

Explanation:

what is a document you can create with word-processing software

Answers

Answer:

Word processing software can easily create, edit, store, and print text documents such as letters, memoranda, forms, employee performance evaluations (such as Appendix A), proposals, reports, security surveys (such as Appendix B), general security checklists, security manuals, books, articles, press releases, and ... I think the answer is this

Help with Java, please!
Write a void method named reverser which takes a string as a parameter and prints the string backwards. For example, the call reverser("monitor") would print "rotinom".

Answers

public class JavaApplication95 {

   public static void reverser(String txt){

       String newTxt = "";

       for (int i = txt.length()-1; i >= 0; i--){

           newTxt += txt.charAt(i);

       }

       System.out.println(newTxt);

   }

   public static void main(String[] args) {

       reverser("monitor");

   }

   

}

I hope this helps!

The program is an illustration of loops.

Loops are used to perform repetitive operations

The void method in Java, where comments are used to explain each line is as follows:

//This defines the method

public static void reverser(String str){

//The declares and initializes newStr

String newStr = "";

//This iterates through string str, backwards

for (int i = str.length()-1; i >= 0; i--){

//This populates newStr with the reversed str

newStr += str.charAt(i);  

      }

//This prints newStr

System.out.print(newStr);

 }

At the end of the method, the reversed string is printed.

Read more about similar programs at:

https://brainly.com/question/18405844

Why are users able to log on to any computer in a domain?
because they do not need an account for each computer
because all computers act as workstations and servers
because they can reconfigure or update hardware without turning off the system
because networks use names to make accessing nodes easier

Answers

Answer:

because they do not need an account for each computer  because all computers act as workstations and servers

What are the steps for grouping worksheets in a workbook?
1. Click on the first worksheet's tab at the of the open workbook.
2. Then, select all the open tabs by holding down the key and select the last worksheet, OR select individual
sheets by holding the key and clicking the sheets you wish to group.
3. These actions automatically group the worksheets. Then, apply all formatting changes to the first worksheet, and it
will be applied to all in the group.

Answers

Answer:

1, bottom    2,shift,        3,Ctrl

Explanation:

i got it right.

Answer:

1) Bottom

2) Shift

3) Ctrl

Explanation:

Why is a positive attitude towards work important

Answers

Answer:

it lets you get more work done

Explanation:

when you have a positive work attitude you want to do more stuff, and when it's bad you won't want to do anything

in your own words describe the benefits of creating functions in your code

Answers

- It saves time in the long term as you can reuse them at any time

- its more efficient as you dont have to rewrite all of the function again thus smaller program size

HELP ME PLEASE AM TIMED!!!~~~~ promised brainly for most reliable answer!!

How would a user ensure that they do not exceed the mailbox quota?

The user can select a mailbox that does not have a quota.
The user can flag the items as Junk Mail.
The user can just move items to the Deleted Items folder.
The user must empty items from the Deleted Items folder or Archive items.

Answers

Answer:

The Third one

Explanation:

Thanks brainly

Answer:

third one

Explanation:

thanks for brainly

how to turn on a computer

Answers

Answer:

Step 1: Find the 'on' button. It probably looks like this (but might be square or oblong!):

Step 2: Push the button. On some computers, the button lights up when the computer is on. ...

Step 3: Now you need to log in. If you're the only user of your computer, once it's turned on it may go straight to the desktop

Which of these exemplifies social steganography?
A. Joining several social networks to increase social capital
B. Finding friends through existing friends on social networks
C. Using the status update to tell everyone what you are up to
D. Sending a hidden message to invite certain people to a party​

Answers

Answer:

D.

Explanation:

Sending a hidden message to invite certain people to a party​

Sending a hidden message to invite certain people to a party​ exemplifies

social steganography.

Social steganography involves the process of hiding information or the

meanings in order to ensure a particular group of people are the only ones

who understand the message being passed across.

The option which is most appropriate is therefore option D which is sending

hidden messages to invite a certain group of people.

Read more about Steganography here https://brainly.com/question/24932120

PLEASE HELP!!! THIS IS DUE TODAY!! WILL MARK BRAINLIEST!!
Two examples of good digital citizenship, and provide your reasoning as to why they are good.

Answers

Answer:

1. Respecting rules and cookies while browsing a website.

2. Being kind and properly following the requirements the owner asks you to follow. Reporting any sort of comment or image that is hurtful/harmful.

Explanation:

1. By the rules and cookies for a website, you ensure the safety of your device  and are not putting any information at risk.

2.  Cyberbullying is a huge issue and you can reduce cyberbullying with the simple steps of being kind and respecting others.

Conclusion:

These rules are examples of good digital citizenship and following them will benefit you and your peers greatly.  

Example 1. Learning to type, use a mouse, and other computer skills.

Explanation: This is a good example of digital citizenship because by learning these skills it allows you to actively engage with others digitally and even give them pointers with their own learning.

Example 2. Avoiding harassment or hateful speech while conversing with others online.

Explanation: This is a good example of digital citizenship because by avoiding harassment or hateful speech you are contributing to making the digital world a safer place for everyone.

hopefully this deserves brainliest :)

e-commerce is the demand of modern society both in terms of time and money​

Answers

Answer:

I can't understand this question zorry

Python program which squares all the number in list number = [2,3,4,5,6,7,8,9] and store it in another list name square. Please write a program :|

Answers

Answer:

l = [2,3,4,5,6,7,8,9]

def solve(l):

for i in l:

print(i**2)

solve(l)

Explanation:

loops through each element of the list and squares it.

what has a bit and spins and can make holes

Answers

Answer:

A drill

Explanation:

A drill uses a bit to hold the screw that holds the screw, which makes a hole

Jackson is working late at night on a project that is due the next day. He is not sure how to print his Word document, and it is too late to call or text his teacher. What is the best option for Jackson?

Answers

Incomplete question. However, I answered from a general logical perspective.

Answer:

he should print the project in two or more different types of format

Explanation:

For example, on the MS Word application, a user can decide to print a document in portrait format or landscape format. In portrait format, the text of the document is placed in a vertical position on the paper, while in landscape format the text is placed in a horizontal position on the paper.

Another format is to print the text on both sides of the paper or on one side of the paper. By using this option Jackson can easily give to his teacher whatever option he tells him the next day.

assslainsdffddsvvdesdssbhasasco5m

Answers

Hahahahaha I wanna was the day I wanna was the last time I got to
Uh okay?- Ksnsjsbwns del

HELP PLEASE!!! Which development method is best explained in this way: a creation of a prototype model that will eventually be discarded or thrown away rather than becoming a part of the final delivered system?

Rapid prototyping method
Incremental method
Waterfall method
Spiral method

Answers

Answer:

Not sure but I think its Rapid Prototyping Method

Select the correct answer.
Terrence has five columns of numbers in a spreadsheet. He's entered formulas at the end of each column to calculate the average of the
numbers. One of the averages seems implausibly incorrect. Which TWO of the following might be causing this?
The spreadsheet software isn't working correctly.
Terrence made a mistake while entering the formula.
Terrence should have entered the numbers in rows rather than columns.
Terrence entered one or more numbers incorrectly.
A formula can calculate an average only if there's also a formula to calculate the sum.

Answers

Terence made a mistake while entering the formula.

Terence entered one or more numbers incorrectly.

what is the output
a = 10
b = 23
print (a+b * a)​

Answers

Answer:

240 is the output.

hope it will help you.

which function would you use to change the appearance of data in a cell from decimal to a percentage? A: Range, B: Format, C: Formula, D: Value

Answers

It’s actually, B: Format

The function that you would use to change the appearance of data in a cell from decimal to a percentage is B: Format

Meaning of Cell Format

In excel, it is possible for people to make conversions of the numbers in cells. Figures can be changed from decimals to percentage.

Phone numbers, social security numbers and currency can also be formatted. To effectively do this, right click the cell or range of cells where the operation is to be performed.

Click on Format cells and chose Number. The dialog box besides Number should be selected and the option, Format Cells is chosen. Thus, the correct option is B. Format.

Learn more about cell formatting here:

https://brainly.com/question/15431070

WILL GIVE BRAINLIEST
This is your code.
>>> A = [21, 'dog', 'red']
>>> B = [35, 'cat', 'blue']
>>> C = [12, 'fish', 'green']
>>> E = [A, B, C]
What is the value of E[1101?
1. 35
2. 21
3. dog
4. cat

Answers

Answer:

None of those answers is correct because E[1101] is index out of range.

The code is given for A, B, C, and D. The value of E[1101 is a dog. The correct option is 3.

What are codes?

Computer code, or a set of instructions or a system of rules written in a specific programming language, is a term used in computer programming. It is also the name given to the source code after a compiler has prepared it for computer execution (i.e., the object code).

A, B, C, and E, which is a list of the first three lists, are the four lists in the Python program. The index used to access lists, which are unordered indexed data structures, ranges from 0 to n. (which is the length of the list minus one).

The E-list is a list of lists that contains three list items, numbered 0 through 2. To access the first list item of the E-list, "dog," use the syntax E[0][1].

Therefore, the correct option is 3. dog.

To learn more about codes, refer to the below link:

https://brainly.com/question/20712703

#SPJ2

When running a spelling and grammar check, which of these buttons does Nora need to press when she wants to fix an error after selecting the correct option in the Not in Dictionary/Suggestion area?

Click the OK button to accept the change.
Click the Autocorrect button to accept the change.
Click the Add to Dictionary button to accept the change.
Click the Change button to accept the change.

Answers

Answer:

D. Click the Change button to accept the change.

Explanation:

I just took the edge review

Answer:

Click the Change button to accept the change.

Explanation:

edge

Learning to type takes practice. You can tell how you are improving by the increase in your...

spelling errors

ability to type with the right
fingers on the right keys

words per minute

choice of typing lessons

Answers

So what’s exactly your question?
Other Questions
Use the distributive property to write the following expression as an equivalent algebraic expression.2(4 + c)(A) 2(4c)(B) 8 + c8 + c(C) 6 2c6 2c(D) 8 2c Nine more than seven times a number, n, gives the same value as one more than the square of the number. Write an equation and solve it to find the number. How do you think the myths of earthquakes swallowing up people came about? Is there ageological phenomenon that does "swallow up people? Diego is 6 feet tall. There are approximately 2.54 centimeters in 1 inch. Which measurement is closest to Diego height in centimeters. what role does culture play in society? Can someone please help with finding the domain and range HELPP PLZZZ I put a picture g(5) if g(x) = -2x2 - 4x + 1 Enter the missing numbers in the boxes to complete the table of equivalent ratios. ? 54 ?6 ? 8 20 govt 3) 1792-951.. The only way the Republic could be created was with the_____of a King. PLS HURTY ONLY ONE MINUTE IM TRYING TO FINISH BUT IDK THIS Which prophet ministered toward the end of the restoration period?A. HaggaiB.Joel C. Malachi An essay for to kill the mockingbird- anyone? Sleep Tight, Inc. manufactures bedding sets. The budgeted production is for 42,500 comforters this year. Each comforter requires 1.5 hours to cut and sew the material. The cost of cutting and sewing labor is $21.00 per hour. Determine the direct labor budget for this year. name a specific economic and a specific health problem that african nations face today. ur smart if u can answer this ez question and extra points Long-range planning:_________a. Is prepared on a quarterly basis if the budget is prepared on a quarterly basisb. Generally presents more detailed information than an annual budgetc. Generally encompasses a longer period of time than an annual budgetd. Is usually more accurate than an annual budget You evaluated an expression using X=6 and y=9. You correctly got an answer of 105. Which expression did you evaluate?A. 3x+6yB. 5x+10yC.6x+9yD. 10x+5y Why does precipitation occur more often near the equator than near the poles?O Colder air holds less water.O Warm ocean breezes near the equator bring rain.O There is less water vapor in the air near the equator.O Air holds more moisture in hot areas such as the equator. Can anybody solve this? Just an easy question: ________ is 1/10 of (186.79 - 29.09). Round that answer to the nearest tenths and compare it to 15.7. Whichever number is bigger- add that to the difference between 34.45 and 12.6. Round that to the nearest whole number. What is the value of X