Thread: Need some help with this program

  1. #1
    Registered User
    Join Date
    Mar 2021
    Posts
    1

    Question Need some help with this program

    Please design a class bar3D represent a 3D bar, the class bar3D must include at least three public member width, height and depth.
    Please design a constructor for bar3d. The constructor hold three parameter to set width, height and depth in order.

    The valid range for width, height and depth is greater than 0 and smaller than 1000.


    If any one of three member are out of range, then set all of them to 0.

    use this below to help:


    Code:
    class bar3d
    Code:
    { 
    };
    Last edited by Inches36; 03-09-2021 at 10:00 PM.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,323
    So, what have you done and what help do you need?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 01-25-2020, 05:06 PM
  2. Replies: 7
    Last Post: 03-15-2016, 06:35 AM
  3. Replies: 4
    Last Post: 12-21-2015, 07:17 AM
  4. Replies: 2
    Last Post: 09-09-2014, 02:36 PM
  5. Replies: 1
    Last Post: 03-03-2009, 04:47 PM

Tags for this Thread