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
Write a program to enter 30 integer numbers into an array and display​
Rama09 [41]

Answer:

i764

Explanation:

3 0
3 years ago
Read 2 more answers
Data refer to
Yanka [14]
D. Large sets of information that can be analyzed for patterns and trends
3 0
3 years ago
What is renewable energy
faust18 [17]

Answer:

Energy that can be used over again

Explanation:

Examples include biofuel,hydroelectric power,and wind.

8 0
4 years ago
Read 2 more answers
the distribution method for audio and video programs online that lets users subscribe to a number of files or feeds is called
bazaltina [42]

The distribution method for audio and video programs online that lets users subscribe to a number of files or feeds exists named podcast.

<h3>What is meant by podcast?</h3>
  • Essentially, a talk radio show on demand is what a podcast is. This means that listeners may tune in whenever (and pretty much wherever) they choose, without having to crank up the volume and tune in live. Podcasts often have a single theme or subject.

  • One of the best ways to talk about something you love or are passionate about is through podcasting. You are able to interact openly and personally with your audience. This improves the experience for you while also being a useful tool to instruct or share your ideas with your audience.

Hence, The distribution method for audio and video programs online that lets users subscribe to a number of files or feeds exists named podcast.

To learn more about podcast refer to:

brainly.com/question/26293535

#SPJ4

8 0
2 years ago
Data_____is defined as the condition in which all of the data in the database are consistent with the real-world events and cond
mezya [45]

Answer:

d. integrity

Explanation:

Data integrity is defined as the condition in which all of the data in the database are consistent with the real-world events and conditions.

Data integrity can be used to describe a state, a process or a function – and is often used as a proxy for “data quality”. Data with “integrity” is said to have a complete or whole structure. Data integrity is imposed within a database when it is designed and is authenticated through the ongoing use of error checking and validation routines. As a simple example, to maintain data integrity numeric columns/cells should not accept alphabetic data.

4 0
4 years ago
Other questions:
  • 2.Consider the following algorithm and A is a 2-D array of size ???? × ????: int any_equal(int n, int A[][]) { int i, j, k, m; f
    12·1 answer
  • When a vehicle strikes a pedestrian, it's most often during A. a period of darkness or low visibility B. the day when pedestrian
    10·2 answers
  • I want to be a teacher some day and i know this question------------- Humans have a nose to breath , but what do fishes use to h
    6·2 answers
  • Which of the following resources is an example of a web-based application?
    15·1 answer
  • Which of the following is true? A)Checks and Debit Cards both withdraw money directly from a bank account. B)Checks are the most
    13·2 answers
  • Which of the following is an example of a Boolean condition that Python could recognize?
    9·1 answer
  • Which group contains the command to manually conduct a spell check ?
    9·1 answer
  • As you explore career options why is it important to take personal inventories and assessments
    5·2 answers
  • What are 5 different google g-suite tools that you can use to collaborate and communicate with othe
    15·1 answer
  • Consider a file/directory with the following info:
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!