guys i need help with this...

hi! iam a beginner in c++ ...i dont under stand how to make this programme...

Write a C/C++ program which creates a rectangle. The rectangle is defined by the floating point attributes length and width, each of which has a default value of 1, with a minimum value of 0 and a maximum value of 10.0. The rectangle is also defined by the Cartesian coordinates of the four corners of the rectangle.
The program implements the following functions, each of which MUST be called by a menu (implemented using C++ Case statement):
1- A function which prompts the user to enter Cartesian coordinates of the four corners of the rectangle.
2- A function which calculates and returns the length of the rectangle, given Cartesian coordinates of its four corners.
3- A function which calculates and returns the width of the rectangle, given Cartesian coordinates of its four corners.
4- A function which calculates and returns the perimeter of the rectangle, given its length and width.
5- A function which calculates and returns the perimeter of the rectangle, given Cartesian coordinates of its four corners.
6- A function which calculates and returns the area of the rectangle, given its length and width.
7- A function which calculates and returns the area of the rectangle, given Cartesian coordinates of its four corners.
8- A function which checks the width of the rectangle. If width is less than 0 or greater than 10, it resets to its default value.
9- A function which checks the length of the rectangle. If length is less than 0 or greater than 10, it resets to its default value.
10- A function that accepts four sets of Cartesian coordinates and verifies that each of these is in the first quadrant with no single x or y coordinate larger than 10.0. It also verifies that the four sets of coordinates form a rectangle.
11- A function which accepts four sets of Cartesian coordinates and determines if the rectangle is a square or not.
12- A function which prints Cartesian coordinates of the four corners, width, length, area and perimeter of the rectangle.
13- A function which draws the Rectangle. This can be done by printing the perimeter of the rectangle using some special characters.
14- A function which fills the Rectangle. This can be done by filling the rectangle by special characters (which are different from the characters chosen for the perimeter).
Part II
Write a C/C++ program which creates a three dimensional (3D) rectangular object. The rectangle is defined by the floating point attributes length, width, and height, each of which has a default value of 1, with a minimum value of 0 and a maximum value of 10.0. The rectangular is also defined by the 3D Cartesian coordinates of the eight corners of the rectangle. The program implements the following functions

1- A function which accepts eight sets of Cartesian coordinates. It first calculates and displays the length, width and height of the rectangle. Finally, it calculates and returns the length of the diagonal across the rectangular.
2- A function which calculates and returns the volume of the rectangle, given Cartesian coordinates of its eight corners.
3- A function which accepts the eight sets of Cartesian coordinates and determines if the resulting rectangular is a cube or not.

i got this far and then realized that i need to use cartesian coordinates.....

#include <iostream>
using namespace std;
int main()
{
int number,a,b,c,d;
cout<<"Enter the number of the programme which you want to run\n";
while(number<=17)
{
switch(number)
{
case 1:
cout<<"Enter the values of the four corners of the rectangle u desire\n";
cin>>a>>b>>c>>d;
break;
}
}
}
Last edited on
Topic archived. No new replies allowed.