Expert answer:Create a C++ class Rectangle.

Solved by verified expert:Create a C++ class Rectangle. The class has attributes length and width, with defaults to
1.0. It has member functions for calculating the perimeter and the area of a rectangle. It has
setLength, setWidth, getLength, and getWidth functions for updating and accessing
the length and width values. The set functions should verify that length/width are each
floating-point numbers greater than 0.0 and less than 20.0. If an invalid value is encountered, the
corresponding set function should return –1 to the calling function without changing the
length/width values. Implement a main function that takes a data file name from command line
argument. The main function reads the length and width values from this input file and use the
Rectangle class to calculate the perimeter and area for each data set. (Note: the Rectangle
class should not include any I/O codes. All I/Os should be done external to the Rectangle
class). Source Files: ● Rectangle.h – contains the Rectangle class declaration. ● Rectangle.cpp – contains the Rectangle class implementation. ● hw04.cpp – contains the main function and any other functions for file I/Os. Example Output: % cat hw04.dat
3.456 2.89 0.0 2.90 12.898 20.0 -1.234 13.234 1.0 21.345 % hw04 Usage: hw04
% hw04 hw04.dat foobar.dat Usage: hw04 % hw04 hw04.dat
INPUT: Length = 3.456 Width = 2.890 PERIMETER: 12.692 AREA: 9.988 INPUT: Length = 0.000 Width = 2.900 ERROR: Invalid length: 0.000 INPUT: Length = 12.898 Width = 20.000 ERROR: Invalid width: 20.000 INPUT: Length = -1.234 Width = 13.234 ERROR: Invalid length: -1.234 INPUT: Length = 1.000 Width = 21.345 ERROR: Invalid width: 21.345Submission:Turn in the printout of the program and input data file with at least 3 sets of length/width values.Capture the source code and output into a single file

How it works

  1. Paste your instructions in the instructions box. You can also attach an instructions file
  2. Select the writer category, deadline, education level and review the instructions 
  3. Make a payment for the order to be assignment to a writer
  4.  Download the paper after the writer uploads it 

Will the writer plagiarize my essay?

You will get a plagiarism-free paper and you can get an originality report upon request.

Is this service safe?

All the personal information is confidential and we have 100% safe payment methods. We also guarantee good grades

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Order your essay today and save 20% with the discount code ESSAYHELP