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, 23.06.2019 09:00
Before you record your own voice, you should a. record other people's voices b. warm up and practice difficult names c. listen to your favorite songs d. read a transcript of a good radio news segment
Answers: 1
question
Computers and Technology, 24.06.2019 13:30
What is the most important for you to choose before you build a network?
Answers: 1
question
Computers and Technology, 24.06.2019 18:20
The following if statement contains a logic error, not a syntax error. rewrite it so that it is correct. assume the variable age already exists and holds a valid number. if (age == 18 & & age == 19) {
Answers: 1
question
Computers and Technology, 25.06.2019 08:10
Which of the following is a difference between the systems development life cycle (sdlc) and extreme programming (xp)? the sdlc model has a separate planning and analysis phase, whereas xp combines both the phases into one phase.in the sdlc model, changes cannot be made to a system once it is delivered to the user, whereas the xp method delivers the system to the users and then make changes suggested by the user.the sdlc model develops an entire system at once, whereas xp uses incremental steps to improve an information system's qualitydevelopers following the sdlc model cannot go on to the next phase until the current phase is finished, whereas in xp, developers can move to any phase from the current phase.
Answers: 1
You know the right answer?
Consider the following class definition. public class rectangle{private double length; private doubl...
Questions
question
World Languages, 29.08.2019 12:00
Questions on the website: 13722360