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
salantis [7]
3 years ago
8

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)
Computers and Technology
1 answer:
Bumek [7]3 years ago
3 0

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);

       

   }

You might be interested in
Use EBNF notation to describe the syntax of the following language constructs.
ZanzabumX [31]

Answer:

Following are the description to the given points:

Explanation:

To resolve basic design restrictions, EBNF has also been developed.This principle was its lack of support can identify repeatings easily. It implies that popular BNF models, like the description of a sequence of replicable elements, are complicated and rely on contra intuitive logical math.

To set a list of words divided by commas (e.g. john, coffee, logic) for instance, we would like to say something like "a list is a word accompanied by a few commas or terms." Through EBNF, they may say so. However, there have been no "many" alternatives in the standard BNF format. So, to describe something such as "a list is a term or a number accompanied by a pair with notation and script," you have to say the same thing. Which functions, although it is difficult, as it specifies a variety of lists instead of a specific list.

Essentially, "john, coffee, logic is John's list, accompanied by coffees or, and logic" would be the earlier link.  That's why in Option (a):

The return statement in Java is:

return ('”‘ (~[“] | ” [”e‘])*);

In option (c), it is the valid statement.

7 0
3 years ago
In one to two sentences, explain how to save a new document.
Eduardwww [97]

It all depends on what you are using,

If you are using Google Docs, the document automatically saves itself

4 0
3 years ago
Read 2 more answers
"What router feature provides basic security by mapping internal private IP addresses to public external IP addresses, essential
Drupady [299]

Answer:

i think phone

hope this helps u stay safe

Explanation:

4 0
3 years ago
Which statement describes the Direction option for animations and transitions?
liraira [26]

Answer:

Direction can be applied to both animations and transitions

Explanation:

5 0
3 years ago
Read 2 more answers
"if you add text, delete text, or modify text on a page, word recalculates the location of automatic page breaks and adjusts the
Flura [38]

Answer:

The answer to this question is option (a).

Explanation:

In the computer, all the data will store in a file that can be text file, image file, etc. All the file store data into (binary language that is (0,1)). In Microsoft Word or any other word software, we add, delete or modify any text that stores in file.  The software adjusts text location, memory, and breaks the pages automatically.

 So the correct answer to this question is option (a).  

8 0
3 years ago
Read 2 more answers
Other questions:
  • Jennifer’s company currently uses Windows Active Directory to provide centralized authentication, authorization, and accounting
    7·1 answer
  • One item you will NOT need to provide when opening up a bank account
    9·2 answers
  • Which group on the Home Tab allows you to add shapes to a PowerPoint slide?
    9·2 answers
  • You are a network technician for a small corporate network. It's been decided that the office needs a wireless network for emplo
    6·1 answer
  • Type the correct answer in the box. Spell all words correctly. How is it possible to access data from any location? Storing data
    12·1 answer
  • Where does the CPU store its computations?
    14·1 answer
  • How many of yall are willing too sub to my channel called "Space Juice" with around 200 subs?!​
    6·1 answer
  • Which of the following statements are true regarding models? Select 3 options.
    11·1 answer
  • Which one way in which using infrared in game console controllers could affect the experience of a person playing the game?
    8·1 answer
  • Core to resource management system is the _________that coordinates the server hardware.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!