Import static java. lang. System.*;
import static java. lang. Math.*;
public class OOP...
Computers and Technology, 21.10.2021 02:50 6FOOT
Import static java. lang. System.*;
import static java. lang. Math.*;
public class OOPTestReview
{
public static void main (String [] args)
{
Dog1 woof = new Dog1(28,5,10);
woof. printStuff();
woof. printStuff2();
woof. printStuff3();
woof. doStuff();
woof. printStuff2();
}
}
class Dog1
{
private int teeth, legs, spots, weight;
public Dog1()
{
teeth = 30;
legs = 3;
spots = 8;
weight = 30;
}
public Dog1(int tth, int spt, int wt)
{
teeth = tth;
legs = 4;
spots = spt;
weight = wt;
}
public void doStuff()
{
teeth = teeth + 1;
}
public int doStuffTwo()
{
int cow;
cow = spots + legs;
return cow;
}
public int doStuffThree(int x)
{
weight = weight + x;
return weight;
}
public int doStuffFour(int x)
{
legs = doStuffThree(teeth) + x;
return legs;
}
public void printStuff()
{
out. println(doStuffThree(3));
}
public void printStuff2()
{
out. println(doStuffFour(spots));
}
public void printStuff3()
{
out. println(doStuffTwo());
}
}
What is the output of line 9?
What is the output of line 10?
What is the output of line 11?
There is no output for line 12.
true/false
What is the output of line 13?
Answers: 3
Computers and Technology, 22.06.2019 20:00
What statement best describes operating systems? it’s possible for modern computers to function without operating systems. most operating systems are free or very inexpensive. operating systems are managed by the computer’s microprocessor (cpu). operating systems manage the computer’s random access memory (ram).
Answers: 1
Computers and Technology, 23.06.2019 07:10
If you want to import a picture into a dtp application, what must you do first? draw an image frame. import text. open the folder containing the file. select get image… from the windows menu.
Answers: 2
Computers and Technology, 23.06.2019 13:00
Which of the following statements is false? a. a class can directly inherit from class object. b. if the class you're inheriting from declares instance variables as private, the inherited class can access those instance variables directly. c. a class's instance variables are normally declared private to enforce good software engineering. d. it's often much more efficient to create a class by inheriting from a similar class than to create the class by writing every line of code the new class requires.
Answers: 3
Computers and Technology, 23.06.2019 13:30
Jace needs to answer a question on square roots to win a quiz. how can he use a spreadsheet to find the square root of 786? a. use the functions round and count b. create a table and chart c. use the function sqrt d. use the function now
Answers: 3
Social Studies, 12.11.2020 21:20
Mathematics, 12.11.2020 21:20
Biology, 12.11.2020 21:20
Social Studies, 12.11.2020 21:20
Mathematics, 12.11.2020 21:20
Engineering, 12.11.2020 21:20
English, 12.11.2020 21:20
Mathematics, 12.11.2020 21:20
Mathematics, 12.11.2020 21:20