В работе

C++ programming -- 2

Problem

Develop a menu driven program to input the sides and calculate the perimeter and area of a triangle, square, rectangle, pentagon, and polygon. The application should close on selecting the Exit option.

Q1.

Define a C++ abstract class named shape. The class will have attributes for the sides of the shape. The class will also need the accessor method getSide that returns the sides of the shape. The class also needs one mutator method called setSides which will set the sides of the shape. The setSides method should return a Boolean value indicating if the set was successful or not and update the sides accordingly. (You cannot have a 0 or negative side.)

You will need to do the class declaration in a header(.h) file and the class implementation in the .cpp file.

Also add two more methods in the class namely getArea and getPerimeter to calculate the area and perimeter of the shape. Define a method Display() for this class to print the sides of the shape on the screen.

Q2.

Make this class generic so that the sides of the shape may be integer or float.

Q3.

Use the abstract class shape to define TwoD shape and add all the functionalities to the methods.

Define the instances triangle, square and rectangle in the driver class to test the functionality of the TwoD class you have extended from the shape class.

Q4.

Define a new class ThreeD extended from ThreeD class. The constructor of ThreeD class should call constructor of TwoD class, and also the print method should call the Display() of the super class. Override the functions getArea and getPerimeter to work with the new formula. The ThreeD class will represent instances of ThreeD class as a cube and a box.

Навыки: Программирование на C++

Показать больше: programming and problem solving with c++, c++ programming problem, c# programming from problem analysis to program design pdf, c# programming from problem analysis to program design, arm microcontroller c programming, android aspnet c# programming mvc, php,, android aspnet c programming mvc php, integer linear programming ilp problem, programming logic problem solving repost, unit commitment dynamic programming example problem solution, cart problem header, programming language kiosk application touch screen, programming writing problem analysis, problem flv green screen, problem header joomla

О работодателе:
( 0 отзыв(-а, -ов) ) Surrey, Canada

ID проекта: #15186528

Поручено:

$50 CAD за 1 день
(134 отзывов(-а))
5.9
chali5

I have read all of the given description i can do it ASAP, i have very good knowledge of C++ and OOP, thanks, Regards Unified Architects Relevant Skills and Experience C++ (3 Years) OOP(2 Years) Proposed Milestones $ Больше

$30 CAD за 1 день
(5 отзывов(-а))
2.3
mehfuza

Dear Client, I have read and understood your project requirements and I'm very interested and confident to write the programs. I have experience of programming in C, C++ and Java. I have coded many programs including Больше

$25 CAD за 1 день
(10 отзывов(-а))
3.4

14 фрилансеров(-а) подали заявки на эту работу; средняя заявка - $49

dyuldashev

THis inheritance and abstraction based C++ project is super easy. I can deliver it within 24 hours from now. Please, let me know! Relevant Skills and Experience I graduated from UT Austin, and I take on C/C++ projects Больше

$30 CAD за 1 день
(28 отзывов(-а))
4.6
ig149

I will make you the project just like your requirements, in a short period of time. I have done many projects related to your requirements because I am a pro in software development. Relevant Skills and Experience c++ Больше

$15 CAD за 1 день
(38 отзывов(-а))
4.8
usman1493

Hey A C++ expert programmer is here I have good advanced expertise in C++ programming I can write the given set of programs for you in C++ Feel Free to message me Regards Relevant Skills and Experience C++ Programming Больше

$20 CAD за 0 дней(-я)
(21 отзывов(-а))
4.2
Xeeshanah

Hello there, Read your project description and it is a pretty simple task. I can provide you the solution in no time which will get you your desired results. I'm a professional Computer Scientist. Relevant Skills and Больше

$35 CAD за 1 день
(9 отзывов(-а))
3.9
$25 CAD за 1 день
(2 отзывов(-а))
2.1
bs505

Hello, How are you? I have read your project description carefully I am very interested in this project. I have a lot of experience in this type of work. I'm sure I can complete it on time with high quality acco Больше

$300 CAD за 5 дней(-я)
(1 отзыв)
0.8
$35 CAD за 1 день
(0 отзывов(-а))
0.0
$35 CAD за 1 день
(0 отзывов(-а))
0.0
KaDoom

Hello, I am very interested in your project. Please contact me for more details. Relevant Skills and Experience I am studying software engineering and I have more than 4 years experience in this field. I have been w Больше

$25 CAD за 1 день
(0 отзывов(-а))
0.0
$35 CAD за 3 дней(-я)
(0 отзывов(-а))
0.0
$25 CAD за 1 день
(0 отзывов(-а))
0.0