C++, computer programming, Programming Languages

Assignment Help:
You are to write a program which will answer a pair of questions for squares, triangles, circles and ellipses. A square is defined by its lower left corner (SLLx,SLLy), and the length of one side SW. An isosceles triangle is defined by the topmost point (Tx,Ty), its height TH, and its base TB. A circle is defined by its center (Cx,Cy) and its radius CR. An ellipse is defined by its center (EX,EY), its vertical height EH and its horizontal width EW. The square, circle, ellipse, and triangle are aligned as follows with respect to the x and y coordinate axes.

The first question involves area. Write functions squareArea, triangleArea, circleArea and ellipseArea which will compute areas from the information describing the object. Write function main to prompt the user for the information for one of each object and pass it to the area functions; the returned results should then be displayed.

The second question involves the notion of inside. Write four functions insideSquare, insideTriangle, insideCircle and insideEllipse which will take the same information describing the object as well as a coordinate pair (x,y) and determine whether or not (x,y) lies inside the object. Display these results as well. You may assume that the triangle is isoscles (but not necessarily equilateral).

Related Discussions:- C++, computer programming

Hb programming test, The purpose of the HB Programming test is to assess wh...

The purpose of the HB Programming test is to assess whether a candidate has sufficient knowledge to join our team here and beyond that where they would fit within our teams. The

Advance operating systems, Project2: A Simple Distributed Computing Platfor...

Project2: A Simple Distributed Computing Platform (Due at 11:59:59pm on 04/12/2012 (EST)) Description: You are asked to develop a replicator (client) that distributes a large job

Developing a preprocessor for java, How and where to start to develop a pre...

How and where to start to develop a preprocessor for java

Application for a mid , The assignment has two parts: first you generate a ...

The assignment has two parts: first you generate a simple application for a MID that operates independently of other MIDs. As a second part, the application is extended to keep so

System calls, #questiWrite down different system calls for performing diffe...

#questiWrite down different system calls for performing different kinds of tasks.on..

Computer education , #question.what. is cai? Explain its pitfalls .o

#question.what. is cai? Explain its pitfalls .o

Write a program to decrypt encrypted messages, You are working for a crypto...

You are working for a cryptography department, where one of your jobs is to decipher intercepted messages that have been encrypted using a book cipher. The messages are sent by dif

Shell script to change the permission of a file, Normal 0 false...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

#matlab programming , 3d Interpolation using matlab from x,y, and z coordin...

3d Interpolation using matlab from x,y, and z coordinates in a csv file and reading them after that interpolating them..

Linear time algorithm to find longest repeat prefix, A non-empty string β i...

A non-empty string β is called a repeat pre x of a string s if ββ is a pre x of s. Give a linear time algorithm to find the longest repeat prefix of s. Hint: Think of using lca

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd