Thread: C++ Program

  1. #1
    Kenny
    Guest

    Post C++ Program

    Anyone up for this?

    1. Create a Class called SQAURE. Class will have 2 data members: int length;int width;

    2. The SQUARE class will have two member functions. One function will be a Constructor. The other function will have the identifier - Area. And will be used to calculate the area of a square using the formula: AREA = length X width.

    3. Create a Dervised Class called BOX. The BOX class will contain a data member; int height;

    4. The BOX class will have two member functions. One function will be a Constructor. The other function will have the identifier - Area. And will be used the calculate the Volume of a box using the formula: VOLUME = length X width X height.

    5. Write a C++ program that will create two SQUARE objets and two BOX objects. The first of each object will be created using the Constructor functions to value their data members. The second of the SQAURE AND BOX objects will have their data values initalized by teh programmer at the time of their creation.

    6. The C++ program will dispaly the Area of each SQAURE object and the Volume of each BOX object.

    Post source in reply if you are.

  2. #2
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    Anyone up for this?
    No. If you post what you've done and/or ask specific questions, then somebody might be.
    zen

  3. #3
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Yes we do not do homework for you. That project is not hard. Try it first by yourself. When you fail, post some code here, and we'll help.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Issue with program that's calling a function and has a loop
    By tigerfansince84 in forum C++ Programming
    Replies: 9
    Last Post: 11-12-2008, 01:38 PM
  2. Need help with a program, theres something in it for you
    By engstudent363 in forum C Programming
    Replies: 1
    Last Post: 02-29-2008, 01:41 PM
  3. Replies: 4
    Last Post: 02-21-2008, 10:39 AM
  4. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM