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
Harrizon [31]
2 years ago
10

Write a program named RectangleArea to calculate the area of a rectangle with a length of 15.8 and a width of 7.9. The program s

hould have two classes, one is the RectangleArea holding the Main(), and the other one is Rectangle. The Rectangle class has three members: a property of length, a property of width, and a method with a name of CalArea() to calculate the area. You can invoke the auto-provided constructor or write a self-defined constructor to initialize the rectangle. Calculate and display the area of the rectangle by first initialize an object named myRectangle and then calculate its area using the CalArea() method.
Computers and Technology
1 answer:
stiv31 [10]2 years ago
4 0

Answer:

public class RectangleArea {

   public static void main(String[] args) {

       Rectangle myRectangle = new Rectangle(15.8, 7.9);

       double calArea = myRectangle.calcArea(15.8, 7.9);

       System.out.println("The area is "+ calArea);

   }

}

class Rectangle{

   private double length;

   private double width;

   //Defined Constructor

   public Rectangle(double length, double width) {

       this.length = length;

       this.width = width;

   }

   public double calcArea(double len, double wi){

       return len* wi;

   }

}

Explanation:

  • This is solved with Java programming language
  • Start by creating both classes RectangleArea and and Rectangle
  • SInce both classes are in the same file, only one can be public
  • Class Rectangle contains the three members are decribed by the question
  • private double length, private double width and the method calcArea(). It also has a sefl-declared constructor.
  • In the class RectangleArea, an object of Rectangle is created and initialized.
  • The method calcArea is called using the created object and the value is printed.
You might be interested in
What are sums of money that are given out for specific reasons?
xenn [34]

Answer:

a

Explanation:

6 0
3 years ago
Read 2 more answers
After an extruded feature has been created, you can always go back and edit the feature. When you edit an existing extrude featu
Pani-rosa [81]

Answer:

After an extruded feature has been created, you can always go back and edit the feature. When you edit an existing extrude feature, <u>the shape of the sketch profile</u> cannot be changed from the Extrude Property Manager.

<u>Extrude PropertyManager</u>

A tool that is used to draw different sketch. The sketches are related to different fields. Extrude property manager is used to edit the sketch, delete some objects form the sketch but we cannot edit the shape of the sketch profile.

<em>In this tool we can edit every thing but cannot edit the shape of the sketch profile.</em>

3 0
3 years ago
Design a circuit with the following criteria. Assume existence of +5V power supply. Draw your circuit and show your work. i. Inp
tresset_1 [31]

Answer:

see attached

Vin -5V- +5V

Input current : 500 x 10^-6 A

V_r: 0V 5V

I_r: 1 mA

Explanation:

Step 1: Circuit Designing: you have to address the question what is your proposed circuit going to do (its function).

Step 2: Decide on circuit components that can address each such circuit functions.

Step 3: Decide on the operational specification for the circuit: voltages, currents, frequencies etc.

Step 4: Simulate your circuit to confirm if it works as expected with simulation software such as Multisim.

4 0
2 years ago
QUESTION 7
marishachu [46]
False, it needs to be properly cited because that is plagiarism which is illegal
6 0
3 years ago
A user creates a GPO. What do you need to do for that user to manage his or her GPO that he or she created?
d1i1m1o1n [39]

Answer: Nothing should be done.

Explanation:

Group Policy helps in the provision of a centralized management of operating systems, and applications. It should be noted that a group policy object (GPO) is simply referred to as the configurations involving the group policy.

Nothing should be done to manage the GPO created. When the permission to create a GPO has been given to someone, it means that they can also manage the GPO therefore, nothing needs to be done anymore.

8 0
2 years ago
Other questions:
  • Choose a developing country and give 3 reasons why it is a developing country ​
    15·1 answer
  • The computer has had far-reaching effects on our lives.how has the computer effected your life?
    8·1 answer
  • How can you remove heat from a computer?
    10·1 answer
  • A computer lab is an example of what type of network
    14·1 answer
  • Which is a benefit of traditional SLR cameras over digital cameras? A. They produce negatives to serve as backups. B. They make
    6·1 answer
  • Consider two vectors that are NOT sorted, each containing n comparable items. How long would it take to display all items (in an
    8·1 answer
  • What is the principal goal of data science?<br>​
    5·1 answer
  • “The software crisis is aggravated by the progress in hardware technology?” Explain with examples
    8·1 answer
  • (iii) ............ characters can be stored in memo field. (a) 50 (b) 64000 (c) 255 (d) 200 ​
    8·1 answer
  • you might propose a(n) program for your country if you wanted to hire a large number of manual laborers from neighboring countri
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!