subject

Consider the following class definition. public class rectangle{private double length; private double width; public rectangle(){length = 0; width = 0; }public rectangle(double l, double w){length = l; width = w; }public void set(double l, double w){length = l; width = w; }public void print(){system. out. println(length + " " + width); }public double area(){return length * width; }public void perimeter(){return 2 length + 2 width; }}suppose that you have the following declaration. rectangle bigrect = new rectangle();
which of the following sets of statements are valid in java?
(i) bigrect. set(10, 5);
(ii) bigrect. length = 10; bigrect. width = 5;

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:40
"it security policy enforcement and monitoring" respond to the following: describe how monitoring worker activities can increase the security within organizations. describe the rationale that managers should use to determine the degree of monitoring that the organization should conduct. explain the extent to which you believe an organization has the right to monitor user actions and traffic. determine the actions organizations can take to mitigate the potential issues associated with monitoring user actions and traffic.
Answers: 3
question
Computers and Technology, 23.06.2019 00:30
Which of the following would you find on a network
Answers: 3
question
Computers and Technology, 23.06.2019 15:00
What is the total resistance in a circuit that contains three 60 ohm resistors connected in a series? a. 20 ohms b. 120 ohms c. 60 ohms d. 180 ohms
Answers: 2
question
Computers and Technology, 23.06.2019 22:20
Learning sign language is an example of a(n) learning sign language is an example of a(n)
Answers: 2
You know the right answer?
Consider the following class definition. public class rectangle{private double length; private doubl...
Questions
question
Health, 15.05.2021 06:10
question
Mathematics, 15.05.2021 06:10
question
Mathematics, 15.05.2021 06:10
question
Mathematics, 15.05.2021 06:10
Questions on the website: 13722367