Please Help!! Don't even know where to start.

Write a Pyramid class. For this program challenge, the pyramid is a right square pyramid, it has a square base and its four sides are isosceles triangles of equal dimensions. The class has the following member variables:
 base — a double for the sides of the pyramid's base in feet
 slant— a double for the slant height of all sides from the base to the apex in feet
The class should have the following member functions:
 Default Constructor—a default constructor that sets base and slant to 0.0
 Constructor that accepts the base and slant of the pyramid as arguments
 setBase—a mutator function for the base variable
 getBase—an accessor function for the base variable
 setSlant—a mutator function for the slant variable
 getSlant—an accessor function for the slant variable
 getBaseArea—returns the base area of the pyramid, which is calculated as
baseArea = base * base
 getFaceArea—returns the area of a face of the pyramid, which is calculated as
faceArea = base * slant * 0.5
 getTotalArea—returns the total area of the pyramid, which is calculated as
totalArea = faceArea * 4 + baseArea
Write a program that demonstrates the Pyramid class by asking the user for the pyramid's base and the slant of the pyramid's sides, creates a Pyramid object, and then reports the pyramid’s surface area.
Validation: Values must be entered in the set functions. All values entered must be greater than zero. If a zero or negative value is entered, the user must be given two more attempts to enter a valid value. If the base value is invalid after the total of three attempts, provide the user with a message and exit the program. If the slant value is invalid after the total of three
attempts, provide the user with a message and exit the program.
What part of the assignment are you having issues?
If it is classes, then the link may give you some assistance

http://www.cplusplus.com/doc/tutorial/classes/
This is what i have so far. Don't know where to go from here


#include <iostream>
#include "Pyramid.h"
#include <cstdlib>
using namespace std;

void heading();
double validate();

int main()
{
double pyramidSide,
pyramidSlant;

heading();

cout << "Enter the side measurement of square base (feet): ";
pyramidSide = validate();

if(pyramidSide <= 0)
{
cout << "Program exiting. Incorrect Data entered.";
system("pause");
return 1;
}

cout << "Enter slant measurement of side (feet): ";
pyramidSlant = validate();

if(pyramidSlant <= 0)
{
cout << "Program exiting. Incorrect Data entered.";
system("pause");
exit(EXIT_FAILURE);
}

Pyramid pyra(pyramidSide, pyramidSlant);

if (pyramidSide > 0 && pyramidSlant > 0)
{
cout << "The total surface area of the pyramid is " << pyra.getTotalArea() << "square feet.";
}
else
{
cout << "Incorrect Data. Calculation cannot be completed." << endl;
}

system("pause")
return 0;
}

void heading()
{
cout << "This program calculates the surface area of a right square pyramid.\n\n"
<< "You will input 2 values in feet: the base's side and the slant measurement.";

return;
}
from here, evaluate and grow it. mark off the things it already does in your requirements, then pick the next item on that list, add it, test it, mark it off, repeat until everything is done.
you have a good start, don't get overwhelmed just do one thing at a time, in small parts, until its all done.

ask if you have a specific question.
@ OP,
What does your header file of your Pyramid Class looks like?
What does your implementation file of your Pyramid Class looks like?
Topic archived. No new replies allowed.