Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer i n C + + . Please submit a report on the Assignment submission page with the solution to the next problems: Analyze

Please answer inC++. Please submit a report on the Assignment submission page with the solution to the next problems:
Analyze the following problem: Gaddis, 2015, Programming Challenger, 9. FeetInches Modification, 11.
Feetlnches Class Copy Constructor and multiply Function and 12. LandTract Class Chapter 14, page 888.
Feetlnches Modification
Modify the Feetlnches class discussed in this chapter so it overloads the following
operators:
!=
Demonstrate the class's capabilities in a simple program.
Feetlnches Class Copy Constructor and overload the multiply operator function
Add a copy constructor to the Feetlnches class. This constructor should accept
a Feetlnches object as an argument. The constructor should assign to the feet
attribute the value in the argument's feet attribute, and assign to the inches attribute
the value in the argument's inches attribute. As a result, the new object will be a copy
of the argument object.
Next, add a multiply member function to the Feetlnches class. The multiply
operator function should accept a Feetlnches object as an argument. The argument object's feet and
inches attributes will be multiplied by the calling object's feet and inches
attributes, and a Feetlnches object containing the result will be returned.
LandTract Class
Make a LandTract class that is composed of two Feetlnches objects, one for the
tract's length and one for the width. The class should have a member function that
returns the tract's area. Demonstrate the class in a program that asks the user to enter
the dimensions for two tracts of land. The program should display the area of each
tract of land and indicate whether the tracts are of equal size.
Use the textbook code of Feetlnches class, defined in Feetlnches.h (Version 4), page 850 to solve the
problems.
The solution must contain the following:
a. pts.) Source code.
b.(5 pts.) Separate class specifications from implementation.
c.(35 pts.) Program output. Show the operation of the copy constructor and each of the operators defined in
its class, in the drive program.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Datalog Engines In Databases

Authors: Bas Ketsman ,Paraschos Koutris

1st Edition

1638280428, 978-1638280422

More Books

Students also viewed these Databases questions

Question

Explain the causes of indiscipline.

Answered: 1 week ago