Create an instance of roomcarpet and ask the user

Assignment Help Computer Engineering
Reference no: EM132178416

I want C++ Programming

Carpet Calculator. This problem starts with the FeetInches class that is provided in the course Content area on the assignment page for this week. This program will show how classes will interact with each other as data members within another class. Modify the FeetInches class by overloading the following operators which should all return a bool. <= >= !=

Next add a copy constructor to the FeetInches class and a multiply function.

The copy constructor should accept a FeetInches object as an argument. It will assign the feet attribute the value in the argument's feet attribute and do the same for the inches attributes.

The multiply function should accept a FeetInches object as an argument. The argument object's feet and inches attributes will be multiplied by the calling object's feet and inches attributes. It will return a FeetInches object containing the result of the multiplication.

Next create a class called RoomDimension which will have its class declaration in RoomDimension.h and its implementation in RoomDimension.cpp. This class will have two data members which have a data type of FeetInches, one for the length of the room and another for the width of the room. The multiply function in FeedInches will be used to calculate the area of the room. RoomDimension will have a function that returns the area of the room as a FeetInches object.

Next create a class called RoomCarpet class that has a RoomDimension object as an attribute. This class will have its class declaration in RoomCarpet.h and its implementation in RoomCarpet.cpp. It should also have an attribute for the cost of the carpet per square foot. It will have a member function that returns the total cost of the carpet. For example, a room that is 12 feet long and 10 feet wide has an area of 120 square feet. If the cost per square foot is $8 then the cost to carpet the room will be $960 (120 x 8).

The main for this program will create an instance of RoomCarpet and ask the user for the dimensions of the room and the price per square foot for the carpet. The application should then display the total cost of the carpet. It should allow the user to continue doing more calculations until the user indicates they are done.

Reference no: EM132178416

Questions Cloud

What are the possible inputs to your ai system : You want to incorporate Artificial Intelligence (AI) in CPRI system so that CPRI capacity can adjust itself based on the changing user traffic.
How does the use of the cmm help to dissect : How does the use of the CMM help to dissect the primary organizational requirements for achieving enhanced analytical capabilities?
List and describe various types of nonvolatile memory : List and describe various types of nonvolatile memory. Which ones do you think are generally used in PLCs?
Develop an html web page to get four numbers : 1. Develop an HTML web page to get four numbers. You also need to set the background color to the blue with an external CSS.
Create an instance of roomcarpet and ask the user : Carpet Calculator. This problem starts with the FeetInches class that is provided in the course Content area on the assignment page for this week.
Create a program where ten viewers were asked to rate : Create a program where ten viewers were asked to rate, on a scale of 1 to 5, the quality of a movie they just watched, with 1 being "awful" and 5 being ".
Web portal features and elements : Discuss how the web portal features and elements will help you to advance your e-business.
What should be the name of a button that has shields up : What should be the name of a button that has Name as its text property. What should be the name of a button that has Shields Up as its text property.
Product that contains data on an item in retail store : Need to make a class called product that contains data on an item in retail store. The class should store the following information in attributes of data

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd