Tamamlanmış

Build me a small C++ object oriented program

Your program should use text files as the only input. No keyboard input is permitted. The path to the input file should be the first parameter to the program.

Format output exactly as specified/exemplified in the descriptions

Follow good code writing practices:

Do not use global variables

Divide classes into .cpp and .h files

All parameters that are constants should be declared as such

All variable and class names should be in English, self-explanatory, and must use camelCase.

All code that is not used should be removed

Use code comments when the reasoning behind the solution is not obvious

Always check that that all allocated memory is released and avoid memory leaks

You should not use any external libraries other than cmath, iostream, fstream, and strings. If you wish to use another library please check with the lab assistants first.

The program should be robust against wrong input data. If there is an error with input file the program should gracefully terminate with a non zero exit code.

Real numbers should be printed with the precision of 3 decimal digits.

Implement an abstract class Shape with methods:

getType() returns a string denoting the type of a shape (point, line, polygon, triangle)

area() returns area of the object, or -1 if the shape is concave, intersecting, or does not have an area

circumference() returns circumference of the object

position() returns center coordinates of the object, or the center of the bounding box if the shape is not convex.

isConvex() returns true if shape is convex

distance(Shape s) returns distance to the center of another shape

Extend the Object classes into Point, Line, Triangle, and Polygon. Overload the inherited methods. Constructors of these classes take vertices coordinates as an input.

The program should load a shape from a file and output its surface area. The input file contains a series of real numbers indicating coordinates of vertices. Example:

1 2 3 4 5 6.43 // Denotes a triangle with vertices at (1, 2) (3, 4) (5, 6.43)

There should not be a limitation of how many points the program can load.

Example:

Input: 1 1 1 2 2 2 Output: 0.5

Input: 1 3.4 3 3 13.13 3 Output: 2.026

Input: 1 1 1 2 2 2 3 1 2 0 Output: 2.5

Input: 0 -10 Output: -1

Beceriler: C++ Programlama, Yazılım Mimarisi

Daha fazlasını gör: calgary courses object oriented program design, object oriented bank application java program client open account account balance, writting atm object oriented program java, best c++ tutorial, advanced object oriented programming c++, learn c++ fast, c++ tutorial for beginners, learn c++, object oriented programming c++ projects, object oriented programming c++ examples, object oriented programming c++ lecture notes pdf, object oriented java program mortgage payment, small project using object oriented, small project object oriented, object oriented program, introduction to object oriented programming using c++, object oriented programming in c++, the waite groups object oriented programming in c++, www java as object oriented program com, beginning c# object-oriented programming

İşveren Hakkında:
( 1 değerlendirme ) Karlskrona, Sweden

Proje NO: #18229978

Seçilen:

NovaSofts

Hello Sir/ Ma’am We are a group of Software Engineers having 10+ years of experience. Expert in JAVA, C, C++ , C# , Python, ANDROID, MATLAB. Done 550+ projects here on FREELANCER.COM. Please check our profile for ref Daha Fazla

1 gün içinde %selectedBids___i_sum_sub_4%%project_currencyDetails_sign_sub_5% USD
(260 Değerlendirme)
7.3

Bu iş için 6 freelancer ortalamada $48 teklif veriyor

Mickelson

Hi Nice to meet you. I'm senior c++/c# expert. I have plenty experience of multithreading, opencv, REST api, and entityframework. I checked your job description and no problem. Also I can write comment as well. J Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(58 Değerlendirme)
6.1
dungforever

How are you, Dear sir/madam? It's very worthwhile chance for me to let you know my skills and proposal about this project. I am an honest developer who have rich experiences in C++ OOP. I have just read your req Daha Fazla

$15 USD in 0 gün içinde
(23 Değerlendirme)
4.9
codedancer3

Hi bro. I have read your description and i am so interested in your project. I am confident in your project and I can finish it clearly on time. I am well experienced and skillful C and C++ programmer. I have man Daha Fazla

$150 USD in 2 gün içinde
(23 Değerlendirme)
4.8
qunzhuang323

Hi I have read your project description very carefully so I am confidence to complete your project I have finished lots of such projects successfully. I am an experienced and skillful web full stack. I have full Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(17 Değerlendirme)
4.4
mingguo808

Thanks for your job posting! I am a C++ Developer and your project is very interesting for me. Good relationship with client is more important than money for me. But I will work with low price for our long-term rela Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(6 Değerlendirme)
2.4