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

  Prepare a program to print out a multiplication table

Create a program using C++ that prints out a multiplication table up to a specific limit. The code should prompt the user for the limit and then print out the table.

  Programmingto compute the volume of water in the cubic feet

Write down an algorithm (Programming in C) in order to compute the volume of water in the cubic feet, flowing through a pipe of diameter d in feet, having a velocity of v feet per second.

  Linked list in c++

If the following C++ code is valid, show the output. If it is invalid, explain why.

  Gstring manipulation functions

Write a program that will define the followingstring manipulation functions. Each is analogous to the corresponding C++ string function.

  Take four unsigned char bytes and combine

Take four unsigned char bytes and combine them into a single integer type. You will needed shifts and one of the logical bit operators.

  The access attributes, list and describe

Without considering the access attributes, list and describe which base class members may not be inherited by a derived class and provide a rationale for why this is?

  Deal two cards at a time

Deal two cards at a time, print them out.- Check if they are identical, have just the same rank or just same suit or are completely.different. Print out a message indicating the result of your comparison.

  Create a program for a company named retail-mart

Prompt the user to enter an item name (one word only), a quantity and a price. For this step, in addition to functionality, I'll be looking at: location of the variable declarations; appropriateness of data types selected; appropriateness of the va..

  20 integers saved in a file called "data.txt"

There are 20 integers saved in a file called "data.txt" (just a random txt file with some numbers) All integers are in the range from 1 to 10

  Write a recursive definition that reverses the elements

Write a recursive definition that reverses the elements in intArray between low and high.

  Write a function that permanently swaps two floats

Write a function that permanently swaps two floats using references.

  Called cbankaccount

Create a base class, called CBankAccount, and two additional classes (each derived from CBankAccount), called CSavingsAccount and CCheckingAccount.

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