Provide a three-argument constructor

Assignment Help C/C++ Programming
Reference no: EM13719058

Question: Create a class called Point that has two data members: x- and y-coordinates of the point. Provide a no-argument and a 2-argument constructor.

Provide separate get and set functions for the each of the data members i.e. getX, getY, setX, setY.

The getter functions should return the corresponding values to the calling function. Provide a display method to display the point in (x, y) format. Make appropriate functions const.

Derive a class Circle from this Point class that has an additional data member: radius of the circle. The point from which this circle is derived represents the center of circle. Provide a no-argument constructor to initialize the radius and center coordinates to 0. Provide a 2-argument constructor: one argument to initialize the radius of circle and the other argument to initialize the center of circle (provide an object of point class in the second argument). Provide a three-argument constructor that takes three floats to initialize the radius, x-, and y-coordinates of the circle. Provide setter and getter functions for radius of the circle. Provide two functions to determine the radius and circumference of the circle.

Write a main function to test this class

Reference no: EM13719058

Questions Cloud

The rate of entropy production within the duct, : Air at 300 kPa, 63oC, and a velocity of 423 m/s enters an insulated duct of varying cross-sectional area. The air exits at 150 kPa, 88oC. At the inlet, the cross-sectional area is 6.57 cm2. Assuming the ideal gas model for the air and variable specif..
Determine the quality of the steam at the turbine exit : Steam at 550 lbf/in.2, 700oF enters a turbine operating at steady state and exits at 1 lbf/in.2. The turbine produces 500 hp. For the turbine, heat transfer is negligible as are kinetic and potential energy effects.
Determine the amount of entropy produced : Air contained in a rigid, insulated tank fitted with a paddle wheel, initially at 4 bar, 40oC and volume of 0.2 m3, is stirred until its temperature is 500 K. Assuming the ideal gas model for the air, determine the amount of entropy produced, in kJ/K..
Evaluate the average force exerted on the car : A car crashes into a wall. You are given the mass, initial velocity and compression of the car. evaluate the average force exerted on the car
Provide a three-argument constructor : Create a class called Point that has two data members: x- and y-coordinates of the point. Provide a no-argument and a 2-argument constructor - Provide a three-argument constructor
Evaluate the thickness of the oil film : A film of oil that has an index of refraction of 1.45 rests on an optically flat piece of glass of index of refraction n = 1.60. Determine the thickness of the oil film
Determine the magnitude of the average force : A 67.6 kg person jumps from rest off a 2.91 m-high tower straight down into the water. Neglect air resistance during the descent. Determine the magnitude of the average force
Thin-walled tube has plastic anisotropy : A drawn, thin -walled tube has plastic (orthotropic) anisotropy. The axial direction of the tube is similar to the rolling direction of anisotropic sheet metal. The tube diameter is 3 inches and the wall thickness is 0.040 inch.
Materials for competitive strategy : The second paragraph should identify an organisation which would benefit from the application of these ideas and explain how the ideas should be applied.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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