Create a class called point3d

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

Create a class called Point3D to represent 3D point in space, a class called Sphere and a class called Cylinder. The sphere is characterized by its center point and the radius while the Cylinder can be characterized by its center point, radius and height..

In your design provide a constructor for each class that enables an object of this class to be initialized when it is declared. The constructor should contain default values in case no initializers are provided. Provide public member functions to set/get private data members, to calculate the surface area and the volume for each class in the hierarchy. You must write you code in two different approaches:

  1. Incorporate inheritance to implement the class hierarchy for the three classes Point3D, Sphere and Cylinder using inheritance.
  2. Many programs written with inheritance could be written with composition instead, and vice versa. Rewrite the classes Point3D, Sphere and Cylinder using composition rather than inheritance

Reference no: EM13158500

Questions Cloud

Calculate the internal energy change for vaporization : Calculate the internal energy change (deltaU) for vaporization of 100 g of Cl2(liq.) at this temperature and 1 bar? (b) Calculate its molar entropy change (AS) for vaporization at this condition
What is the number of moles of gas : If 20.0L of neon gas exerts a pressure of 125 psi at 423 k , what is the number of moles of gas?
What factors might decrease pool of oxaloacetate available : What factors (or metabolic conditions) might decrease the pool of oxaloacetate available for the activity of the citric acid cycle?
Adjusting entries for the month : The office equipment has a 5-year life with no salvage value. It is being depreciated at $295 per month for 60 months. Invoices representing $1,005 of services performed during the month have not been recorded as of June 30. (a) Prepare the adjusting..
Create a class called point3d : Create a class called Point3D to represent 3D point in space, a class called Sphere and a class called Cylinder. The sphere is characterized by its center point and the radius while the Cylinder can be characterized by its center point, radius and he..
Characteristics of project life cycle : All of the following are common characteristics of project life cycle descriptions except: Cost and staffing levels are low at the start, higher towards the end and drop rapidly as the project ends
Write a recursive method to produce a pattern : Write a recursive method to produce a pattern of n lines of asterisks.
Compute the change in entropy : Calculate the change in entropy (deltaS) when one mole of diamond is heated from a temperature of 0 K to 400 K at a constant pressure of 1 bar. The temperature-dependent heat capacity of diamond is Cv
Different aspects of religion : Examine how each of the three theoretical approaches directs toward different aspects of religion. Provide examples of how religion has promoted dramatic social transformation.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Design and implement a library system

Design and implement a library system that does the following: ? Takes details of a student/library users: first name, last name, other names, user ID number, and nationality.

  Write short c program to develops two processes

Write down a short C program which develops two processes. Each process must repeatedly write its own unique message to test file, one character at time. Do you see garbled messages in the file? Explain why or why not?

  Calculate the net pay as the gross less the taxes

Design and code a new function that accepts as parameters the gross pay by value and the federal tax, state tax, local tax, SS tax, and net Pay by reference.

  C programme to find the minimum and maximum value

write a c programme to find the minimum and maximum value each elements in each row ,to create table b,having 5 rows and 2 coloums,the first coloum of table b is the maximumvalue and thye second coloum is the maximum value in each row.

  Write a program for find greatest common divisor

Write code for a recursive implementation of Euclid's algorithm

  Design and write a c++11/fltk game program

The project is to design and write a C++11/FLTK game program with a graphical user interface. The game is based on "pancake sorting," which actually has some mathematical significance.

  Write a driver program called testrationalnumber.cpp

Write a driver program called testRationalNumber.cpp to test each of the above functions and overloaded operators in the RationalNumber class.

  Use the top-down modular approach to design program

Use the top-down modular approach and pseudocode to design a suitable program to solve it. Where appropriate, use defensive programming techniques.

  Implement a semantic analysis

The program will implement Semantic Analysis. The assignment provides two options to define variable scope, either using the Global Option or the Local Option.

  Why does the neverwet spray protect it from water

As is know, acetone is a polar molecule like water, so isn't it suppose to mix? So my question is: why does the Neverwet spray protect it from water but not from oils and detergents?

  Implement the tronomino tiling algorithm

Implement the tronomino tiling algorithm,  our program should take an arbitrary input positive integer  k  in the Linux command line and generate a 2 k  * 2 k  board.

  Write c program which has parent process and child process

Write a C program that has a parent process, a child process, and a grandchild process. The parent process should print its id and the square or 5.

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