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
makkiz [27]
3 years ago
6

JAVA CODE.

Computers and Technology
1 answer:
kykrilka [37]3 years ago
3 0

Solution :

public class Rectangle  

{

int len,bre;

Rectangle(int l,int b)

{

setLength(l);

setBreadth(b);

}

void setLength(int l)

{

len=l;

}

void setBreadth(int b)

{

bre=b;

}

int getLength()

{

return len;

}

int getBreadth()

{

return bre;

}

void makeSquare(Rectangle r)

{

r.setBreadth(len);

System.out.println("Square Parameter");

System.out.println("Length:" +r.getLength() + " Length: ".getBreadth());

}

public static void main(String[] args){

Rectangle r=new Rectangle(10,5);

System.out.println("Rectangle Parameter");

System.out.println("Length:"+r.getLength()+" Breadth:"+r.getBreadth());

r.makeSquare(r);

 }

 }

}

You might be interested in
The factorial of n is equal to ______.
alexdok [17]

Answer:

n! = n*(n-1)*(n-2)*(n-3)* ... *2*1

Explanation:

The factorial operator is simply a mathematical expression of the product of a stated integer and all integers below that number down to 1.  Consider these following examples:

4! = 4 * 3 * 2 * 1

4! = 12 * 2 * 1

4! = 24

6! = 6 * 5 * 4 * 3 * 2 * 1

6! = 30 * 4 * 3 * 2 * 1

6! = 120 * 3 * 2 * 1

6! = 360 * 2 * 1

6! = 720

So, the factorial of n would follow the same as such:

n! = n * (n-1) * (n-2) * ... * 2 * 1

Cheers.

5 0
3 years ago
Ideally, how long or how many sentences should your video game pitch be?
Olin [163]
Good shot hdhhdbsb suhsbsbs bbsbsbsbdbbdbdbdbdbbd
6 0
4 years ago
which midi keyboard mode allows for one sound on one end of the keyboard and another on the other end
wlad13 [49]

Answer:

Sound button in the scratch

5 0
3 years ago
(50 points) What animes should I watch?
Eddi Din [679]

Answer:

naruto,naruto shippuden and baruto

Explanation:

3 0
3 years ago
Read 2 more answers
Peter automates his email inbox such that his incoming mails are filtered with all junk mails sent directly to the spam folder.
ANEK [815]

Answer:

Improve individual productivity

Explanation:

Improving individual productivity as to do with efficiency, achieving more within a shorter period of time. One of the ways to achieve this is by using Information system tools. Information system tools supports processes, operations and intelligence which will help a worker to do more quality work spending lesser time, as well as reduce spending time on unnecessary tasks.

6 0
3 years ago
Read 2 more answers
Other questions:
  • In the Remote Access Domain, if private data or confidential data is compromised remotely, you should set automatic blocking for
    5·1 answer
  • What is the other name for repetitive strain injury
    12·2 answers
  • The elements of an integer-valued array can be set to 0 (i.e., the array can be cleared) recursively as follows: An array of siz
    8·1 answer
  • _____ are likely to support bigger government, social welfare programs, and legalized abortion.
    8·2 answers
  • Write an SQL statement to list the Name of employees who have worked on a property in New York .
    7·1 answer
  • What is the output of the following program? #include using namespace std; class TestClass { public: TestClass(int x) { cout &lt
    5·1 answer
  • Write a program name Dollars that calculates and displays the conversion of an entered number of dollars into currency denominat
    11·1 answer
  • What is computer. Write full form of mips​
    15·1 answer
  • Give an idea of a law u would like to create
    5·2 answers
  • [80 points] Fill in the missing word.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!