Write a code for task 2 at compiler and also show the output . Task # 02.
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a code for task 2 at compiler and also show the output .
Transcribed Image Text:
Task # 02. Create a class Rectangle keeping in mind that rectangle have length and width. One should be able to calculate the perimeter () and the area () of the rectangle, can set a value to length and width and retrieve the value of Length & width. Where 0 < length < 21 0 < width < 21 Area of Rectangle=length*width; Perimeter of Rectangle = (length + width) *2; TEST PLANS Commands Rectangle r; r.set (2); r.getLength (); r.set (50); r.getLength (); Output Rectangle f=r; f.set (-20); f.getLength (); Task # 02. Create a class Rectangle keeping in mind that rectangle have length and width. One should be able to calculate the perimeter () and the area () of the rectangle, can set a value to length and width and retrieve the value of Length & width. Where 0 < length < 21 0 < width < 21 Area of Rectangle=length*width; Perimeter of Rectangle = (length + width) *2; TEST PLANS Commands Rectangle r; r.set (2); r.getLength (); r.set (50); r.getLength (); Output Rectangle f=r; f.set (-20); f.getLength ();
Expert Answer:
Answer rating: 100% (QA)
include using namespace std class Rectangle create class called Rectangl... View the full answer
Posted Date:
Students also viewed these programming questions
-
Write a C++ code for task 2 according to given condition. Task # 02. Create a class Rectangle keeping in mind that rectangle have length and width. One should be able to calculate the perimeter ()...
-
For each communication task that follows, write brief answers to three questions: Who is the audience? What is the audience's general attitude toward my subject? What does the audience need to know?...
-
Write a computer program to assist with a task such as that of Prob. 914 with a rectangular weld bead pattern for a torsional shear joint. In doing so solicit the force F, the clearance a, and the...
-
You work as a manager in the admission department of company. You were asked by your department head to present and analyze the qualifying test scores of 40 employees who are applying for 5-year...
-
What does the correlation coefficient (rij) measure? What are the two most extreme values it can take, and what do they indicate? In the real world, are more variables positively or negatively...
-
Procter & Gamble is a well-known consumer products company that owns a variety of popular brands. A recent news article contained the following information: CINCINNATI, March 9...
-
A cylindrical volume of space contains a uniform magnetic field of magnitude \(0.12 \mathrm{~T}\) but unknown direction. If the dimensions of the cylindrical volume are length \(\ell=0.060...
-
Sesame Company purchased a computer system for $74,000 on January 1, 2009. It was depreciated based on a 7-year life and an $18,000 salvage value . On January 1, 2011, Sesame revised these estimates...
-
Which three design considerations to limit the scope of EIGRP queries are correct?
-
Case: Replacement Decisions Falconville Pump Company, Inc. Brandon Joiner, president and chief executive officer of Falconville Pump Company, Inc., has a potentially serious problem on his hands. The...
-
What number is used as the base when we conduct vertical analysis on the balance sheet? Why does that number make the most sense to use as the base?
-
How would you expect a profit-maximizing retailer to choose which shoes to stock in his or her store?
-
Which of the following industries would you classify as an oligopoly? Explain your answer. If you are not sure, what information do you need to know to decide? a. Motorcycles b. Hotels c. Cruise...
-
What would you expect to see happen to the placement of Green Dragon Tea if we discovered sugar was good for us?
-
Explain whether you agree or disagree with the following statement. If all firms in an industry successfully engage in collusion, the resulting profit-maximizing price and output would be the same as...
-
Economists have found that many young single people do not buy healthcare insurance. Why not?
-
What promotion plan can I choose for Smithfield foods, a pork processing company?
-
Kenneth Hubbard has prepared the following list of statements about managerial accounting and financial accounting. 1. Financial accounting focuses on providing information to internal users. 2....
-
The following are summaries of the cash book and bank accounts of J. Duncan who does not keep his books using the double entry system. You are required to: (a) Calculate the value of J. Duncan's...
-
Read the following and answer the questions below. On 31 December 2015 the bank column of C. Tench's cash book showed a debit balance of 1,500. The monthly bank statement written up to 31 December...
-
The bank columns in the cash book for June 2016 and the bank statement for that month for D. Hogan are as follows: You are required to: () Write the cash book up to date to take the above into...
Study smarter with the SolutionInn App