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
solong [7]
3 years ago
7

Implement a class Rectangle. Provide a constructor to construct a rectangle with a given width and height, member functions get_

perimeter and get_area that compute the perimeter and area, and a member function void resize(double factor) that resizes the rectangle by multiplying the width and height by the given factor
Computers and Technology
1 answer:
Luba_88 [7]3 years ago
3 0

Answer:

Explanation:

The following code is written in Java. It creates the Rectangle class with the height and width variables. The constructor takes these variables as parameters to create Rectangle objects. It creates the get_perimeter method that sums up two of each side in order to get the perimeter of the Rectangle. A get_area method multiplies the height by the width to get the area. Finally, a resize method takes in a double factor variable and multiplies the height and the width by the factor to get a resized Rectangle object.

class Rectangle {

   double height, width;

   public Rectangle(double height, double width) {

       this.height = height;

       this.width = width;

   }

   

   public double get_perimeter() {

       return (this.height + this.height + this.width + this.width);

   }

   

   public double get_area() {

       return (this.height * this.width);

   }

   

   public void resize(double factor) {

       this.height *= factor;

       this.width *= factor;

   }

}

You might be interested in
The Caesar Cipher has 25 different shifts to try.
statuscvo [17]

Answer:

D. 25x24x23x22x21.....3x2x1.

Explanation:

The ceasar cipher is a encryption technique, that uses a combination of information or keys to encrypt an information.

The 25 shift ceasar cipher has 25 different combinations, so the number of probable random cipher substitution is 25!,

That is = 25 × 24×23× 22×..... ×2×1.

3 0
2 years ago
Sorting Records in a Form
Naya [18.7K]

Answer:

1. Open the form in the standard form view.

2. Put the cursor in the field to use for sorting.

3. Open the Home tab

4. In the Sort & Filter group, click ascending or descending

Explanation:

Took the test :)

7 0
3 years ago
Please help me with these two questions! 60 points!
RUDIKE [14]

Answer:

Networks prevent unauthorized access to data and protect equipment. Networked computers are less likely than single computers to suffer equipment failure. Networks allow computers to connect quickly and to share data or equipment.

Explanation:

3 0
2 years ago
How to create a delete button in Python?
deff fn [24]

Answer:

class Db_test(models.Model):

   name = models.CharField(max_length=50)

   comment = models.CharField(max_length=200)

   created = models.DateField(auto_now_add=True)

   modified = models.DateField(auto_now=True)

   class Meta:

       db_table = "db_test"

Explanation:

5 0
3 years ago
How do you delete extensions on a chrome book bought on the chrome web store?
nirvana33 [79]
If you're using google chrome if you look in the top right corner there are a button with 3 horizontal lines, click it, once you do that go down that list and click settings once you click that, hit extensions on the left side of the screen, after that you will see a list of extension you have find the extension you would like to delete and look far right to the extension and click the trash can. Once you click the trash can a pop up will appear and will say "Confirm Removal"  and under that "Remove_______" If that is the extension you would like to remove continue if not go back to finding that extension If it is click remove
6 0
2 years ago
Read 2 more answers
Other questions:
  • If you are driving at night, you should not use high-beam headlights within _________ of oncoming vehicles. Florida Road Rules 4
    9·2 answers
  • What is used to monitor the activity of a network and notify network administrators when it identifies something as suspicious?
    15·1 answer
  • 2. (8 points) When creating the Academic Database, there were several instances of data
    11·1 answer
  • Which best describes obliteration in a forged document?
    11·1 answer
  • At what x position are the ellipses drawn??? thanks ♡​
    6·1 answer
  • When calling a function with arguments that should be modified, the __________ of those arguments are passed.
    5·1 answer
  • The use of desktop computer equipment and software to create high-quality documents such as newsletters, business cards, letterh
    14·1 answer
  • Michael needs to ensure that those items that are automatically archived are still easily accessible within Outlook. Which optio
    5·2 answers
  • This code --> plt.plot(x,y) is used to draw :
    8·1 answer
  • In this paper https://arxiv.org/pdf/2008.10150.pdf, I'm having a hard time understanding how the assignment in the picture is de
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!