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
marissa [1.9K]
3 years ago
7

Write code which takes inputs and creates two Rectangle objects (using the edhesive.shapes.Rectangle class) and compares them us

ing the equals method.
JAVA!!
Computers and Technology
1 answer:
iogann1982 [59]3 years ago
6 0

Answer:

System.out.println("Enter length:");

Scanner scan = new Scanner(System.in);

Double x = scan.nextDouble();

System.out.println("Enter 2 lengths:");

Double a = scan.nextDouble();

Double b = scan.nextDouble();

Rectangle rect = new Rectangle(x);

Rectangle rect2 = new Rectangle (a,b);

if (rect2.equals(rect)){

 System.out.print("Congruent Rectangles");

}

else {

 System.out.print("Different Rectangles");

}

 }

}

Explanation:

You might be interested in
Anyone know what the very first question that was sent on brainly is?
VMariaS [17]

Answer:

Hmmm don't know at all, it would be lost in the questions that millions of people have asked.

5 0
3 years ago
Read 2 more answers
A nonpipelined system takes 300ns to process a task. The same task can be processed in a 5-segment pipeline with a clock cycle o
Vladimir79 [104]

Answer:

Pipelined architecture is 1.667 times more speedy than non pipelined architecture.

Explanation:

There are five stages to to complete an instruction to execute in pipeline architecture. as

Stage 1:  Instruction Fetch

Stage 2: Instruction Decode

Stage 3: Execute

Stage 4: Memory Access

Stage 5 : Write Back

The pipeline architecture processed instruction as given below. Each Stage take 1 clock cycle, which is represented as CC.

                Stage 1           Stage 2         Stage 3         Stage 4            Stage 5

I1:              1cc                  2cc                 3cc                4cc                   5cc

I2              2cc                 3cc                  4cc               5cc                   6cc

I3              3cc                  4cc                 5cc              6cc                    7cc

I4              4cc                 5cc                  6cc              7cc                    8cc

each four Instructions set takes 8 Clock Cycles.

I5              9cc                  10cc                11cc               12cc                 13cc

I6              10cc                 11cc                  12cc             13cc                 14cc

I7              11cc                  12cc                 13cc              14cc                 15cc

I8              12cc                 13cc                  14cc              15cc                16cc

.

.

.

I97:             193cc            194cc              195cc              196cc               197cc

I98             194cc             195cc             196cc               197cc               198cc

I99            195cc             196cc              197cc              198cc               199cc

I100         196cc                197cc             198cc            199cc                 200cc

<u>Pipelined architecture Time Calculation</u>

So in pipeline architecture 100 instructions takes 200 clock cycles to execute.

1 Clock Cycle time period is = 60ns.

200 Clock Cycle =  60ns * 200 = 12000 ns

<u>Non Pipelined architecture Time Calculation</u>

1 task Time period= 300ns

100 task time period = 100 * 300 =  30000 ns

The difference between pipelined and non pipelined architecture time period is = 30000 - 12000 = 18000 ns

<u>Speedup ratio</u>

<em>Speed up ratio= 30000/18000 =  1.667</em>

7 0
3 years ago
Use the drop-down menus to complete each sentence.
gizmo_the_mogwai [7]

Answer:1 3 and 5 is Columns and 2 4 and 6 is Rows theres your answer.

Explanation: its self explanatory.

3 0
2 years ago
Read 2 more answers
At a local burger chain, a customer became extremely angry. Everyone took notice at the person, who was yelling at anyone he cou
leonid [27]

Answer: Donald, the branch manager displayed people skills  

Explanation: People skills are a combination of behavior and behavioral interactions between people. There are many abilities that fall under the category of people skills, for example, personal effectiveness, interactive skills and negotiation skills. While the customer was shouting, Donald patiently heard and tried to calm the customer which reflected that he respected and valued the customer and kept a positive behavior towards the customer.


5 0
3 years ago
Read 2 more answers
Laxmi was not confident that she could learn to program a computer. When she found out that two girls with similar GPA’s in her
Lapatulllka [165]

Answer:

She got motivated to work harder. She did not want to be less smarter that the other girls.

Explanation:

She was shy in the beginning, but then once she heard out the  other girls could do it very well. She then got motivated.

7 0
2 years ago
Other questions:
  • How would you say an hard drive works
    9·2 answers
  • If you decide to get married, a trade-off would be that you have to give up being single.
    12·2 answers
  • Alright, don't judge me, this is a question that involves my Childhood game PvZ GW 2. So I noticed mods and stuff that get uploa
    12·2 answers
  • The___provides access to the internet; may also be internal
    11·1 answer
  • To achieve asymptotically optimal performance, a skip list must use promotion probability . true or false and
    14·1 answer
  • Microsoft windows malicious software removal tool fake or real
    8·1 answer
  • Do word provides an undo button that can be used to cancel the most recent command or action
    13·1 answer
  • What is output?
    13·1 answer
  • Which role will grant a delegate read-only access to a particular workspace within a user’s Outlook mailbox?
    15·2 answers
  • What is the answer in music class
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!