Find Jobs
Hire Freelancers

Need Help With Project Using Concrete Classes

$30-5000 USD

Terminado
Publicado hace alrededor de 22 años

$30-5000 USD

Pagado a la entrega
The project must be in C++ and in console form. Write down all the shapes you can think of (both two-dimensional and three-dimensional) and form those shapes into a shape hierarchy. The heirarchy should have base class SHAPE from which class TWODIMENSIONALSHAPE and class THREEDIMENSIONALSHAPE are derived. once you have developed the hierarchy, define each of the classes in the hierarchy. Modify the hierarchy so that class SHAPE is an abstract base class containing the interface to the hierarchy. Derive TWODIMENSIONALSHAPE and THREEDIMENSIONALSHAPE from class SHAPE (these classes should also be abstract). Use a VIRTUAL PRINT function to output the type and dimensions of each class. Also include VIRTUAL AREA and VOLUME functions, so these calculations can be performed for objects of each concrete class in the hierarchy. Derive concrete classes SQUARE and CIRCLE from class TWODIMENSIONALSHAPE and concrete classes CUBE and SPHERE from class THREEDIMENSIONALSHAPE. Also include a main driver to test these implementations. ## Deliverables The project must be in C++ and in console form. Write down all the shapes you can think of (both two-dimensional and three-dimensional) and form those shapes into a shape hierarchy. Your heirarchy should have base class SHAPE from which class TWODIMENSIONALSHAPE and class THREEDIMENSIONALSHAPE are derived. once you have developed the hierarchy, define each of the classes in the hierarchy. Modify the hierarchy so that class SHAPE is an abstract base class containing the interface to the hierarchy. Derive TWODIMENSIONALSHAPE and THREEDIMENSIONALSHAPE from class SHAPE (these classes should also be abstract). Use a VIRTUAL PRINT function to output the type and dimensions of each class. Also include VIRTUAL AREA and VOLUME functions, so these calculations can be performed for objects of each concrete class in the hierarchy. Derive concrete classes SQUARE and CIRCLE from class TWODIMENSIONALSHAPE and concrete classes CUBE and SPHERE from class THREEDIMENSIONALSHAPE. In your driver create a Circle object named “circle??, a Square object named “square??, a Sphere object named “sphere??, and a Cube object named “cube??; then, add the following code: Shape *pShapes[4] = { &circle, &square, &sphere, &cube}; for(int i = 0; i < 4; i++) pShapes[i]->print(); cout << endl; TwoDimensionalShape *p2DShapes[2] = { &circle, &square }; for(i = 0; i < 2; i++){ p2DShapes[i]->print( ); cout << "Area = " << p2DShapes[i]->area( ) << endl << endl; } ThreeDimensionalShape *p3DShapes[2] = { &sphere, &cube }; for(i = 0; i < 2; i++){ p3DShapes[i]->print( ); cout << "Area = " << p3DShapes[i]->area( ) << endl; cout << "Volume = " << p3DShapes[i]->volume( ) << endl << endl; } Math formulas for project: Square_Area = Side_Length * Side_Length Circle_Area = 3.14159 * Circle_Radius * Circle_Radius Cube_Area = 6 * Side_Length * Side_Length Cube_Volume = Side_Length * Side_Length * Side_Length Sphere_Area = 4.0 * 3.14159 * Sphere_Radius * Sphere_Radius Sphere_Volume = 4.0/3.0 * 3.14159 * Sphere_Radius * Sphere_Radius * Sphere_Radius ------------------------------------------------------ I need a complete and fully-functional working program in executable form as well as complete source code of all work done, and DETAILED DOCUMENTATION in headers of functions/classes. Complete copyrights to all work purchased. ## Platform Windows (95, 98, Me, NT) ## Deadline information I need this program done and submitted to me by 2PM EST on Friday, April 19, 2002. I need DAILY updates on this project if it will take more than a day to complete it.
ID del proyecto: 2846648

Información sobre el proyecto

13 propuestas
Proyecto remoto
Activo hace 22 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
See private message.
$25,50 USD en 14 días
4,6 (66 comentarios)
5,1
5,1
13 freelancers están ofertando un promedio de $23 USD por este trabajo
Avatar del usuario
See private message.
$12,75 USD en 14 días
4,9 (212 comentarios)
5,8
5,8
Avatar del usuario
See private message.
$17 USD en 14 días
4,4 (72 comentarios)
5,5
5,5
Avatar del usuario
See private message.
$8,50 USD en 14 días
5,0 (35 comentarios)
5,0
5,0
Avatar del usuario
See private message.
$51 USD en 14 días
4,7 (41 comentarios)
4,7
4,7
Avatar del usuario
See private message.
$42,50 USD en 14 días
5,0 (32 comentarios)
4,2
4,2
Avatar del usuario
See private message.
$21,25 USD en 14 días
4,2 (6 comentarios)
3,6
3,6
Avatar del usuario
See private message.
$17 USD en 14 días
4,8 (16 comentarios)
3,1
3,1
Avatar del usuario
See private message.
$21,25 USD en 14 días
5,0 (3 comentarios)
1,1
1,1
Avatar del usuario
See private message.
$25,50 USD en 14 días
5,0 (1 comentario)
0,8
0,8
Avatar del usuario
See private message.
$20,40 USD en 14 días
0,0 (0 comentarios)
3,1
3,1
Avatar del usuario
See private message.
$17 USD en 14 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
See private message.
$17 USD en 14 días
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de UNITED STATES
United States
4,9
9
Miembro desde mar 30, 2002

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.