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
Mnenie [13.5K]
3 years ago
7

Make a ladtract class that has 2 fields, one for the tractor's length and one for the width. The class should have a method that

returns the tract's area as well as an equals methos and a toString method.
Computers and Technology
1 answer:
Virty [35]3 years ago
7 0

Explanation:

Below is the java code for the ladtract class :-

public class ladtract

{

private double length;  //length of tractor

private double width;   //width of tractor

public double calculateArea(){  

    return length*width;    //calculate and return the area of the tractor

}

public boolean equals(Object o) {

    if (o == this) {    //check if it's the same object

        return true;

    }

       if(o.length==this.length && o.width==this.width){   //check if the length and width are same for both objects

           return true;

       }

       return false;  

}

public String toString(){

    return "Area="+calculateArea(); //return the area of the tractor as a string

}

}

You might be interested in
Do u know the way!!!!!!!
Ratling [72]
Yes brudda! to the queen!!
3 0
3 years ago
Read 2 more answers
Alicia spends all day at work on the Internet and then all night on social networking sites looking at the many interesting thin
Stels [109]

Answer:

Better regulate time spent on internet

Explanation:

Because of the time Alicia is spending on the internet, seeing interesting things that her friends are doing, and perhaps her life has been boring, this tend to play with her psychology and she will begin to become depressed and start disliking her life. In this case, the main mediator is the internet, and the best way she can deal with depression at this level is to reduce or regulate the amount of time that she spends on the internet.

4 0
3 years ago
ASAP! WILL MARK BRAINLIEST + 100 POINTS!!<br><br> Match each word to its description.
Naily [24]

When was the Ming dynasty established?

the 1100s CE

the 1200s CE

the 1300s CE

the 1400s CE

4 0
2 years ago
Read 2 more answers
Using Matlab programming I need to rotate the line defined by x,y by 45 degrees around 2,2
belka [17]

Answer:

% here x and y is given which we can take as

x = 2:2:10;

y = 2:2:10;

% creating a matrix of the points

point_matrix = [x;y];

%  center point of rotation  which is 2,2 here

x_center_pt = x(2);

y_center_pt = y(2);

% creating a matrix of the center point

center_matrix = repmat([x_center_pt; y_center_pt], 1, length(x));

% rotation matrix with rotation degree which is 45 degree

rot_degree = pi/4;      

Rotate_matrix = [cos(rot_degree) -sin(rot_degree); sin(rot_degree) cos(rot_degree)];

% shifting points  for the center of rotation to be at the origin

new_matrix = point_matrix - center_matrix;  

% appling rotation  

new_matrix1 = Rotate_matrix*new_matrix;          

Explanation:

We start the program by taking vector of the point given to us and create a matrix by adding a scaler to each units with repmat at te center point which is (2,2). Then we find the rotation matrix by taking the roatational degree which is 45 given to us. After that we shift the points to the origin and then apply rotation ans store it in a new matrix called new_matrix1.

4 0
4 years ago
Time management is all about managing your emotions. <br> True <br> False
Alex777 [14]
I’m pretty sure it’s true
5 0
3 years ago
Read 2 more answers
Other questions:
  • Ben works at a top accounting firm in Salt Lake City and his responsibilities include developing individual and departmental goa
    9·1 answer
  • Will upvote!
    12·1 answer
  • Your health insurance company gives you a discount if you wear a fitness-tracking bracelet. After wearing it for a few months, y
    5·1 answer
  • A raised dot (ú) shows where the ENTER key was pressed. <br> a. True<br> b. False
    15·1 answer
  • ) write a program that creates a vector of string called "vec". vector "vec" grows and shrinks as the user processes the transac
    6·1 answer
  • Corinne is taking a chemistry class in college. A lab assignment asks students to track the melting point of ten different subst
    8·1 answer
  • Which of the following parts of a tool would require the tool to have a guarding device?
    13·2 answers
  • The development of computer languages is classified into two categories .<br><br>true or false​
    11·1 answer
  • What is the web page path on the web server for the URL:
    12·1 answer
  • Part 1: Plan and Write the Pseudocode
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!