Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Analyze the following problem: Gaddis, 2 0 1 5 , Programming Challenger, 9 . FeetInches Modification, 1 1 . FeetInches Class Copy Constructor and multiply

Analyze the following problem: Gaddis, 2015, Programming Challenger, 9. FeetInches Modification,11. FeetInches Class Copy Constructor and multiply Function and 12. LandTract Class Chapter 14, page 888.
9. FeetInches Modification
Modify the FeetInches class discussed in this chapter so it overloads the following
operators:
<=
>=
!=
Demonstrate the classs capabilities in a simple program.
11. FeetInches Class Copy Constructor and overload the multiply operator function
Add a copy constructor to the FeetInches class. This constructor should accept
a FeetInches object as an argument. The constructor should assign to the feet
attribute the value in the arguments feet attribute, and assign to the inches attribute
the value in the arguments inches attribute. As a result, the new object will be a copy
of the argument object.
Next, add a multiply member function to the FeetInches class. The multiply
operator function should accept a FeetInches object as an argument. The argument objects feet and inches attributes will be multiplied by the calling objects feet and inches
attributes, and a FeetInches object containing the result will be returned.
12. LandTract Class
Make a LandTract class that is composed of two FeetInches objects, one for the
tracts length and one for the width. The class should have a member function that
returns the tracts 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 FeetInches class, defined in FeetInches.h (Version 4), page 850 to solve the problems. Programming langua is C++

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

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

0764532545, 978-0764532542

More Books

Students also viewed these Databases questions