The quadratic equation 15[tex]x^{2}[/tex]-22x -7 = 0 has solution x = 1.7355 or -0.26886
In algebra, a quadratic equation (from Latin quadratus 'square') is any equation that can be rearranged in standard form as
a[tex]x^{2}[/tex] + bx + c =0
where x represents an unknown value, and a, b, and c represent known numbers. One supposes generally that a ≠ 0; those equations with a = 0 are considered degenerate because the equation then becomes linear or even simpler. The numbers a, b, and c are the coefficients of the equation and may be distinguished by calling them, respectively, the quadratic coefficient, the linear coefficient and the constant or free term.
The values of x that satisfy the equation are called solutions of the equation, and roots or zeros of the expression on its left-hand side. A quadratic equation has at most two solutions. If there is only one solution, one says that it is a double root. If all the coefficients are real numbers, there are either two real solutions, or a single real double root, or two complex solutions that are complex conjugates of each other. A quadratic equation always has two roots, if complex roots are included; and a double root is counted for two. A quadratic equation can be factored into an equivalent equation
given that
5(x-1)3x = 7(x+1)
15[tex]x^{2}[/tex]-15x = 7x +7
15[tex]x^{2}[/tex]-22x -7 = 0
x = -b ± [tex]\sqrt{b^{2}-4ac }[/tex]/2a
x = -(-22) ± [tex]\sqrt{(-22)-4(15)(-7)}[/tex] /2(15)
x = 1.7355 or -0.26886
To learn more about quadratic equation:
https://brainly.com/question/17177510
#SPJ4
Answer: x = 12
Step-by-step explanation:
Distribute the parenthesis on both sides of the equation
5x - 5 + 3x = 7x + 7
8x - 5 = 7x + 7 ( subtract 7x from both sides )
x - 5 = 7 ( add 5 to both sides )
x = 12
Therefore, your answer is: x = 12
Please! I don't understand this question! Help!
Zachary purchased a computer for $ on a payment plan. months after he purchased the computer, his balance was $. months after he purchased the computer, his balance was $. What is an equation that models the balance y after x months?
If a circular flower bed has a diameter of 18ft.
What is the area of the flower bed?
mark spent a total of $12.33 on 9 oranges and a packet of strawberries. if the packet of strawberries costs $2.88 how much did each orange cost
Answer: $1.05 per orange
Step-by-step explanation:
12.33 - 2.88 = 9.45
9.45 ÷ 9 = 1.05
The sum of the elements in a tuple can be recursively calculated as follows: the sum of the elements in a tuple of size 0 is 0 otherwise, the sum is the value of the first element added to the sum of the rest of the elements write a function named sum that accepts a tuple as an argument and returns the sum of the elements in the tuple.
The following is a code in python.
What is Python and why it is used?Python is a popular computer programming language used to create software and websites, automate processes, and analyze data. Python is a general-purpose language, which means it can be used to make many different types of programs and isn't tailored for any particular issues.
What are the advantages of Python?One of Python's biggest benefits is the variety of libraries and frameworks it offers. Everything from data visualization, machine learning, data science, natural language processing, and complex data analysis uses the Python Library, from NumPy to TensorFlow.
#Specify the function in
DefinedSum(tu)
# Verify whether the tuple contains 0
if len(tu) == 0
#Then, give back 0
return 0
#Otherwise
else:
#invoke the recursive function.
return tu[0]+Sum (tu[1:])
Set a variable of the tuple type
tu=(2,5,1,8,10)
#print, then invoke the function.
print("The total of tuple is:"), sum(tu),
Output:
The sum of tuple is: 26
Here, we define the method "sum()" and send the parameter "tu" to the function, which saves the value of the tuple type.
If the length of the tuple is 0, then the if conditional expression should verify the condition and return 0.
If not, invoke the function, return the tuple's total (which is determined recursively), and exit.
Last but not least, initialize the "tu" variable of the tuple type, print, then run the sum function.
To learn more about python, click the following link :-
https://brainly.com/question/14239610
#SPJ1
Find the coordinates of the circumcenter of the triangle with the given vertices.
2. R(-2,5), S(-6, 5), T(-2,-1)
P(4, 7.25) are the coordinates of circumcentre of the triangle
How to find the coordinates of the circumcenter of a triangle
The circumcenter of a triangle is the point where the perpendicular bisectors of the sides of that particular triangle intersect
Given: The vertices R(-2,5), S(-6, 5), T(-2,-1)
Let P(x,y) be the circumcentre of triangle. Then,
PR = PS = PT
PR² = PS²
(x-(-2))² + (y-5)² = (x-(-6))² + (y-5)²
(x+2)² + (y-5)² = (x+6)² + (y-5)²
x²+4x+4 + y²-10y+25 = x²+12x+36 + y²-10y+25
12x-4x = 36 -4
8x = 32
x = 32/8 = 4
Also, PS² = PT²
(x-(-6))² + (y-5)² = (x-(-2))² + (y-(-1))²
(x+6)² + (y-5)² = (x+2)² + (y+1)²
x²+12x+36 + y²-10y+25 = x²+4x+4 + y²+2y+2
12x-4x-10y-2y = 4+2-36-25
8x-12y = -55 .......(1)
put x= 4 into (1):
8x-12y = -55
8(4)-12y = -55
32 -12y = -55
-12y = -55-32
-12y = -87
y = 7.25
Therefore, the coordinates of circumcentre of the triangle are P(4, 7.25)
Learn about the circumcenter of a triangle on:
brainly.com/question/29482852
#SPJ1
longobardi corporation bases its predetermined overhead rate on the estimated labor- hours for the upcoming year. at the beginning of the most recently completed year, the corporation estimated the labor-hours for the upcoming year at 46,000 labor- hours. the estimated variable manufacturing overhead was $6.25 per labor-hour and the estimated total fixed manufacturing overhead was $1,026,260. the actual labor- hours for the year turned out to be 41,200 labor-hours. the predetermined overhead rate for the recently completed year was closest to:______.
The predetermined overhead rate for the recently completed year was closest to $28.56 par labor - hour.
What is Labor - hour?
4 to 8 hours or more are typical for active labor. Your cervix will expand on average at a rate of 1 cm per hour. What you can do: Seek encouragement and support from your labor partner and your medical team. To ease your discomfort, try deep breathing and relaxation exercises.
Given:
Longobardi corporation bases its predetermined overhead rate on the estimated labor- hours for the upcoming year.
At the beginning of the most recently completed year, the corporation estimated the labor-hours for the upcoming year at 46,000 labor- hours.
The estimated variable manufacturing overhead was $6.25 per labor-hour and the estimated total fixed manufacturing overhead was $1,026,260.
The actual labor- hours for the year turned out to be 41,200 labor-hours.
Estimated total manufacturing overhead
= $1,026,260 + ($6.25 per labor- hour X 46,000 labor - hours)
= $1,313,760
Predetermined overhead rate
= $1,313,760 / 46,000 labor-hours
= $28.56 per labor-hour
Hence, the predetermined overhead rate for the recently completed year was closest to $28.56 par labor - hour.
To know more about labor - hour, click on the link
https://brainly.com/question/24924489
#SPJ4
a local amateur ice skater estimates that the probability she will place first in the next regional competition is 0.56. what are the odds she will win this competition? a) 14 to 39 b) 11 to 14 c) 33 to 17 d) 39 to 14 e) 14 to 11 f) none of the above.
The odds she will win this competition is 14 to 11.
What is probability?
Probability refers to potential. A random event's occurrence is the subject of this area of mathematics. The range of the value is 0 to 1. Mathematics has incorporated probability to forecast the likelihood of various events. The degree to which something is likely to happen is basically what probability means. The potential outcomes for a random experiment using this fundamental theory of probability, which is also applied to the probability distribution. Knowing the total number of outcomes is necessary before we can calculate the likelihood that a specific event will occur.Odds in favor of an event is ratio of probability of an event to its completion:
Probability =0.56 / 1-0.56
= 0.56/0.44
= 56/44
= 14/11
Hence, the odds she will win this competition is 14 to 11.
To know more about probability check the below link:
https://brainly.com/question/25870256
#SPJ4
Complete the program so that it takes in 4 integers (a, b, c, and d) as arguments, stores them in the 2D array nums, and then prints their row, column, and total sums. The program should print the integers according to this formula:
(a) (b) (a+b)
(c) (d) (c+d)
(a+c) (b+d) ((a+b)+(c+d)+(a+c)+(b+d))
// (a+b) is the first row's sum
// (c+d) is the second row's sum
// (a+c) is the first column's sum
// (b+d) is the second column's sum.
// ((a+b)+(c+d)+(a+c)+(b+d)) is the total sum of all rows and columns
The program should print the integers according to this formula is
nums[0][0]=a;
nums[0][1]=b;
nums[1][0]=c;
nums[1][1]=d;
nums[0][2]= nums[0][0] + nums[0][1]; //a+b
nums[1][2]= nums[1][0] + nums[1][1]; //c+d
nums[2][0] = nums[0][0] + nums[1][0]; //a+c
nums[2][1] = nums[0][1] + nums[1][1]; //b+d
//sum = (a+b) + (c+d) + (a+c) + (b+d)
nums[2][2] = nums[0][2] + nums[1][2] + nums[2][0] + nums[2][1];
The nums array is 2 dimensional as shown below.
row, column column 0 column 1 column 2
row 0 a b a+b
row 1 c d c+d
row 2 a+c b+d (a+b)+(c+d)+(a+c)+(b+d)
The first index of an array always starts from 0.
Thus, nums[rows][columns] is used to access each element of the array.
The sum of first row elements is to be stored in the last index of row0, that is in nums[1][2].
Thus we equate nums[0][2] = nums[0][0] + nums[0][1]
Similarly, for 2nd row; nums[1][2] = nums[1][0] + nums[1][1]
The sum of first column is to be stored in last index of column0.
Thus, nums[2][0] = nums[0][0] + nums[1][0]
and for 2nd column,
nums[2][1] = nums[0][1] + nums[1][1].
Thus, the answer is--
-------------------------------------------------------------------------------------------------------------------------------------
nums[0][0]=a;
nums[0][1]=b;
nums[1][0]=c;
nums[1][1]=d;
nums[0][2]= nums[0][0] + nums[0][1]; //a+b
nums[1][2]= nums[1][0] + nums[1][1]; //c+d
nums[2][0] = nums[0][0] + nums[1][0]; //a+c
nums[2][1] = nums[0][1] + nums[1][1]; //b+d
//sum = (a+b) + (c+d) + (a+c) + (b+d)
nums[2][2] = nums[0][2] + nums[1][2] + nums[2][0] + nums[2][1];
To learn more about program visit:https://brainly.com/question/11023419
#SPJ4
A line with a slope of –1/4 passes through the point (3,3). What is its equation in point-slope form? Use the specified point in your equation. Write your answer using integers, proper fractions, and improper fractions. Simplify all fractions.
The equation of the line is y = -1/4x + 15/4
How to determine the equation of the line?From the question, we have the following parameters that can be used in our computation:
Slope = -1/4
Point = (3, 3)
The equation of a line is calculated using
y = m(x - X) + Y
Where
m = Slope = -1/4
(x, y) = Point = (3, 3)
Substitute the known values in the above equation, so, we have the following representation
y = -1/4(x - 3) + 3
So, we have
y = -1/4x + 3/4 + 3
Evaluate
y = -1/4x + 15/4
Hence, the equation is y = -1/4x + 15/4
Read more about linear equations at
https://brainly.com/question/13738662
#SPJ1
Sort the following polygons in order of increasing area
The area of the polygons sorted in ascending order of area is:
Rectangle = 4
Triangle = 12
Square = 13
What is a polygon?In geometry, a polygon is a planar shape defined by a restricted number of straight line segments linked to form a closed polygonal chain.
Area of the triangle is:
[Ax(By - Cy) + Bx(Cy - Ay) + Cx(Ay - By)]/2
Where Ax and Ay are the x and y coordinates of A's vertex. The same is true for the x and y notations of the B and C vertices.
Given,
A(-4-3), B(1, -3), C(-1,2)
We have
[-4(-3-2) + (1(2-(-3)) + (-1(-2-(-3))]/2
= 24/2
= 12
As a result, the area of the triangle is 12.
We use the distance formula to calculate the area of the rectangle. The equation is as follows:
d² = (x₂ - x₁)² + (y₂-y₁)²
Where (x₁, x₂) are the first point's coordinates and (y₁, y₂) are the coordinates of the second point.
Assuming that the vertices are labeled as follows:
A(7,9), B(6,9), C(6,5), D(7,5), then
AB² = (6-7)² + (9-9)²
AB² = 1 + 0
AB = 1
BC² = (6-6)² + (5-9)²
BC² = 0² + -4²
BC = 4
CD² = (7-6)² +(5-5)²
CD² = 1² + 0²
CD = 1
DA² = (7-7)² + (9-5)²
DA² = 0² +4²
DA = 4
As is typical of a rectangle, we can deduce that AB = CD and BC = DA
Since the Area of the rectangle is AB x CD OR BC x DA
The area of the rectangle =4 x 1 = 4
We may also calculate the length of the square's sides using distance methods.
We only need the length of one side because the area of a square is provided as L2.
Hence,
AB = 3.60555
Hence the area of the square =3.60555²
= 12.9999908025
Area of the square is 13
Thus, the polygons are placed in increasing area order as follows:
Rectangle = 4
Triangle = 12
Square = 13
To know more about polygon, visit:
https://brainly.com/question/24464711
#SPJ1
Write the equation of the line that passes through the points (-5, 9) and (8,-9).
Put your answer in fully simplified point-slope form, unless it is a vertical or
horizontal line.
Answer:
y - 9 = -18/13(x + 5)
Step-by-step explanation:
For a fully discrete whole life insurance of 1000 issued to (x), you are given:
2Ax = 0.08
Ax = 0.2
The annual premium is determined using the equivalence principle.
S is the sum of the loss-at-issue random variables for 100 such independent policies. Calculate the standard deviation of S. (Ans 2500)
The value of the standard deviation of the variance S is equivalent to 250 and the value of the variance (S) is equivalent to 62500.
Given that:
2Ax = 0.08
Ax = 0.2
A fully discrete whole life insurance issued to (x) is 1000.
Firstly we have to find out the value of variance S.
Variance S = (insurance issued)^2 * [2Ax - Ax^2]/(1- Ax)^2
Variance S = (1000)^2 * [0.08 - 0.2^2]/(1- 0.2)^2
Variance S = (1000)^2 * [0.04]/.64
Variance S = (1000)^2 * .0625
Variance S = 62500
Standard deviation of S = (insurance issued) * [[tex]\sqrt{2Ax - Ax^2}[/tex]]/(1- Ax)
Standard deviation = 1000 * [[tex]\sqrt{0.08 - 0.2^2}[/tex]]/(1- 0.2)
Standard deviation = 1000 * 0.2/0.8
Standard deviation = 1000 * 1/4 = 250
The value of the standard deviation of the variance S is equivalent to 250 and the value of the variance (S) is equivalent to 62500.
To learn more about the standard deviation visit: https://brainly.com/question/12402189
#SPJ4
state a recursive definition for 2, -2, 2, -2
Answer:
Step-by-step explanation:
Chinese people eat beans so it would be Chinese
people
In the first week of July, a record 1,060 people went to the local swimming pool. In the second week,105 fewer people went to the pool than in the first week. In the third week, 145 more people went to the pool than in the second week. In the fourth week, 199 fewer people went to the pool than in the third week. What is the percent decrease in the number of people who went to the pool over these four weeks?
The percent decrease in the number of people who went to the pool over these four weeks is 15%.
How to calculate the percentage?A percentage is a value or ratio that may be stated as a fraction of 100. If we need to calculate a percentage of a number, we should divide it's entirety and then multiply it by 100.
The number of people by the fourth week will be:
= 1060 - 105 + 145 - 199
= 901
The percentage decrease will be:
= (1060 - 901) / 1060 × 100
= 159/1060 × 100
= 15%
Learn more about percentages on:
brainly.com/question/13797493
#SPJ1
what does it mean to say that two variables are negatively associated?what does it mean to say that two variables are negatively associated?
When two variables are correlated negatively, the other variable's value falls as the value of the first variable rises.
Express the term negative correlation?When two variables are correlated negatively, the other variable's value falls as the value of the first variable rises.
The correlation coefficent, which expresses correlation on a scale from +1 to -1, is used. Values less than 0 indicate a negative connection. An increase in one variable confidently foretells a drop in the other when there is a perfect negative correlation, with a coefficient of -1. An rise or decrease inside one variable consistently forecasts the same directional shift for the second variable, according to a perfect positive correlation that has a coefficient of +1. Non-zero coefficients between -1 and +1 are used to show lower degrees of connection.Zero denotes the absence of a correlation: There is no propensity is for variables to change simultaneously.
Thus, when two variables are correlated negatively, the other variable's value falls as the value of the first variable rises.
To know more about the negative correlation, here
https://brainly.com/question/16913516
#SPJ4
Two blueberry farms are similar in shape. the ratio of the side lengths of the farms is 6 : 7, and the smaller farm has a perimeter of 360 yards. the cost to dig a trench is $0.75 per yard. what is the cost to dig a trench around the larger blueberry farm?
Two blueberry farms are similar in shape. the ratio of the side lengths of the farms is 6 : 7 then $337.50 is the cost to dig a trench around the larger blueberry farm
The farms are sized with a ratio of 4:5 which means that the perimeter of the larger farm can be found by subtracting the perimeter of the smaller farm from that of the total of both farms which can be found by the following formula where it is assumed to be x.
4/(4+5) * x = 360 yards
4x = 360 * 9
x = (360 * 9) / 4
x = 810 yards
Size of larger farm = 810 - 360 = 450 yards
If it costs $0.75 to dig a trench per yard, the total cost for the larger farm is;
= 450 * 0.75
= $337.50
learn more about of farm here
https://brainly.com/question/18572338
#SPJ4
which inequality has –12 in its solution set?abcdx + 6 less-than negative 8x + 4 greater-than-or-equal-to negative 6x minus 3 greater-than negative 10x + 5 less-than-or-equal-to negative 4abcd
The inequality contain -12 in its solution is x + 5 ≤ -4.
What is inequality?
The phenomenon of an unfair and/or unequal distribution of opportunities and resources among the people who make up a society is referred to as inequality. To different people and in various contexts, the word "inequality" may mean different things.
We have to find from the given inequalities which inequality has -12 in its solution.
Consider, the given inequalities
(1) x + 6 < -8
⇒ x < - 8 - 6
⇒ x < -14
This inequality does not contain -12 in its solution.
(2) x + 4 ≥ - 6
⇒ x ≥ -6 - 4
⇒ x ≥ - 10
This inequality does not contain -12 in its solution.
(3) x - 3 > -10
⇒ x > -10 + 3
⇒ x > -7
This inequality does not contain -12 in its solution.
(4) x + 5 ≤ -4
⇒ x ≤ - 4 - 5
⇒ x ≤ -9
This inequality contain -12 in its solution.
Hence, the inequality contain -12 in its solution is x + 5 ≤ -4.
To know more about inequality, click on the link
https://brainly.com/question/24372553
#SPJ4
A group of friends wants to go to the amusement park. They have $69. 75 to spend on parking and admission. Parking is $17. 25, and tickets cost $17. 50 per person, including tax. Write and solve an equation which can be used to determine pp, the number of people who can go to the amusement park.
The equation to determine the number of persons is x/(y+z) and total 2 people are there in total.
What does a math equation mean?The definition of an equation in algebra is a mathematical statement that demonstrates the equality of two mathematical expressions.For instance, the equation 3x + 5 = 14 consists of the two expressions 3x + 5 and 14, which are separated by the 'equal' sign.Given: Several buddies want to visit the theme park. Spending money for parking and entry totals $69.75. Tickets cost $17.50 per person, tax included, and parking is $17.25.
Let,
x = total amount for parking and admission fee
y = ticket per person
z = parking cost per person
Total number of people who can go to the amusement park is given as:
= x/(y+z) =69.75/(17.50+17.25)
= 2
Therefore, the equation to determine the number of persons is x/(y+z) and total 2 people are there in total.
Learn more about equation here:
brainly.com/question/18831322
#SPJ4
Please help asap now !!!!!
Answer: I need the Problem?
Step-by-step explanation:
he radius of a circle is 12 m. Find its circumference in terms of pi
Answer:
24π m
Step-by-step explanation:
r = 12 m
C = 2πr
C = 2 × π × 12 m
C = 24π m
If ƒ(x) = 2x³ – 11x² + 13x − 4 and x − 4 is a factor of f(x), then find all of the
zeros of f(x) algebraically.
Answer:
The zeros of ƒ(x) are 4, 1, and -2.
a local aquarium found that if the price of admission was $11$11, the attendance was about 20002000 customers per week. when the price of admission was dropped to $7$7, attendance increased to about 26002600 per week. write a linear equation for the attendance in terms of the price, p
The linear equation for the attendance in terms of the price, p is
2600= -150p + 3650
A =m*p + b
where A= attendance , m = slope , b = y-intercept and p = price
When p=11 then A=2000 , i e , (11, 2000).
When p= 7 , then A=2600, i .e , (7 , 2600).
m= (b-d)/(a-c)
=> m = (2600-2000)/(7 - 11)
= -150
Therefore , 2600= -150p + b
To get the value of b,
putting the value of p in the obtained equation,
we get,
2600= -150 * 7+ b
2600 = -1050 + b
b = 3650
Hence , our equation becomes
2600= -150p + 3650
Linear equations are equations of the first order. The linear equations are defined for lines in the coordinate system. When the equation has a homogeneous variable of degree 1 (i.e. only one variable), then it is known as a linear equation in one variable. A linear equation can have more than one variable. If the linear equation has two variables, then it is called linear equations in two variables and so on
To learn more about linear equation
https://brainly.com/question/28882406
#SPJ4
A local deli makes turkey sandwiches and salami sandwiches at a weekly ratio of 2 salami sandwiches for every 5 turkey sandwiches. If the deli makes 60 turkey sandwiches this week, how many salami sandwiches did they make?
1. 5 salami sandwiches
2. 16 salami sandwiches
3. 30 salami sandwiches
4. 24 salami sandwiches
Please answer :)
Answer:
1.5
Step-by-step explanation:
a rectangular package to be sent by a postal service can have a maximum combined length and girth (perimeter of a cross section) of 120 inches (see figure). find the dimensions of the package of maximum volume that can be sent. (assume the cross section is square.)
The dimensions of the package of maximum volume that can be sent are 20 inches by 40 inches.
Let us represent the length of the square cross-section of the postal package with x, and the width of the package with y.
So, the perimeter is given by the equation -
y + 4x = 120
y = 120-4x -----------(1)
the volume will be
V = [tex]x^{2} y[/tex] -----------(2)
Now, substitute (1) in (2), and we get,
V = [tex]x^{2}[/tex] (120-4x)
V = 120[tex]x^{2}[/tex] - 4[tex]x^{3}[/tex]
Differentiating with respect to x, we get,
V' = 240x - 12[tex]x^{2}[/tex]
V'=0
hence, 240x - 12[tex]x^{2}[/tex] = 0
12[tex]x^{2}[/tex] = 240x
dividing by 120x on both sides,
hence, x=20
Now, we know that,
y = 120 - 4x
y = 120-4(20)
y = 120-80
y=40
Hence, the dimensions that maximize the volume of the package are 20 inches by 40 inches.
Read more about maximum volumes:
brainly.com/question/10373132
#SPJ4
describe the relationship between the variables in the graph and equation
The equation that describes the proportional relationship between the variables on the graph is given as follows:
y = 12x.
What is the proportional relationship?The general format of a proportional relationship is defined as follows:
y = kx.
In which k is the constant of proportionality, and hence the output variable y is obtained as the multiplication of the input x and the constant of proportionality k.
One point from the graph given at the end of the answer is given as follows:
(8, 96).
Hence the constant of the proportional relationship is given as follows:
k = 96/8 = 12.
Then the equation is of:
y = 12x.
Meaning that the output variable y is obtained by the multiplication of the input variable x and the constant of proportionality k.
Missing InformationThe graph is given by the image presented at the end of the answer.
More can be learned about proportional relationships at https://brainly.com/question/10424180
#SPJ1
I’ll give you points and brainlest answer if you answer with a legit answer!
answer:
(1/y)^3(1/z)^4
step-by-step explanation:
negative exponents just move the number to the denominator. so all you have to do is move the y & z to the denominator to change the exponents to positive. hope that helps!
develop a class shapes 2d to represent all 2d geometric shapes excluding line. class should represent the name of the object (a string) the color of the objects (color) and methods that all subclasses should implement (abstract methods) including:
This is the UML diagram for the development of the program, in which Shapes 2D is the superclass and Circle, Square, Triangle, Rectangle, Rhombus, and Parallelogram are subclasses.
This is the program in C++ demonstrating the above classes.
#include<iostream>
using namespace std;
class shapes
{
public:
string name;
string color;
virtual void getAttributes()=0;
};
class Circle: public shapes
{
public:
float radius;
Circle(string n,string c, float r)
{
name=n;
color=c;
radius=r;
}
float getPerimeter()
{
return(2*(3.142)*radius);
}
float getArea()
{
return((3.142)*(radius*radius));
}
void getAttributes()
{
cout<<"Name :"<<name<<endl;
cout<<"Color :"<<color<<endl;
}
};
class Square:public shapes
{
public:
float side;
Square(string n,string c, float s)
{
name=n;
color=c;
side=s;
}
float getPerimeter()
{
return(4*side);
}
float getArea()
{
return(side*side);
}
void getAttributes()
{
cout<<"Name :"<<name<<endl;
cout<<"Color :"<<color<<endl;
}
};
class Triangle:public shapes
{
public:
float base;
float height;
float side1;
float side2;
float side3;
Triangle(string n,string c)
{
name=n;
color=c;
}
float getPerimeter()
{
cout<<"Enter side1\n";
cin>>side1;
cout<<"Enter side2\n";
cin>>side2;
cout<<"Enter side3\n";
cin>>side3;
return(side1+side2+side3);
}
float getArea()
{
cout<<"Enter base\n";
cin>>base;
cout<<"Enter height\n";
cin>>height;
return((0.5)*base*height);
}
void getAttributes()
{
cout<<"Name :"<<name<<endl;
cout<<"Color :"<<color<<endl;
}
};
class Rectangle:public shapes
{
public:
float length;
float breadth;
Rectangle(string n,string c, float l,float b)
{
name=n;
color=c;
length=l;
breadth=b;
}
float getPerimeter()
{
return(2*(length+breadth));
}
float getArea()
{
return(length*breadth);
}
void getAttributes()
{
cout<<"Name :"<<name<<endl;
cout<<"Color :"<<color<<endl;
}
};
class Rhombus:public shapes
{
public:
float diagonal1;
float diagonal2;
float side;
Rhombus(string n,string c)
{
name=n;
color=c;
}
float getPerimeter()
{
cout<<"Enter Side\n";
cin>>side;
return(4*side);
}
float getArea()
{
cout<<"Enter diagonal 1\n";
cin>>diagonal1;
cout<<"Enter diagonal 2\n";
cin>>diagonal2;
return((0.5)*diagonal1*diagonal2);
}
void getAttributes()
{
cout<<"Name :"<<name<<endl;
cout<<"Color :"<<color<<endl;
}
};
class Parallelogram:public shapes
{
public:
float base;
float height;
Parallelogram(string n,string c, float b,float h)
{
name=n;
color=c;
base=b;
height=h;
}
float getPerimeter()
{
return(2*(base+height));
}
float getArea()
{
return(base*height);
}
void getAttributes()
{
cout<<"Name :"<<name<<endl;
cout<<"Color :"<<color<<endl;
}
};
int main()
{
int choice;
while(1)
{
cout<<"\n\nEnter your choice :";
cout<<"\n1 for Circle\n";
cout<<"2 for Square\n";
cout<<"3 for Triangle\n";
cout<<"4 for Rectangle\n";
cout<<"5 for Rhombus\n";
cout<<"6 for Parallelogram\n";
cin>>choice;
system("cls");
switch(choice)
{
case 1:
{
float r;
cout<<"Enter radius\n";
cin>>r;
Circle c("Circle","Yellow",r);
c.getAttributes();
cout<<"Perimeter : "<<c.getPerimeter()<<endl;
cout<<"Area : "<<c.getArea()<<endl;
}break;
case 2:
{
float side;
cout<<"Enter side\n";
cin>>side;
Square s("Square","Red",side);
s.getAttributes();
cout<<"Perimeter : "<<s.getPerimeter()<<endl;
cout<<"Area : "<<s.getArea()<<endl;
}break;
case 3:
{
Triangle t("Triangle","Green");
t.getAttributes();
cout<<"Perimeter : "<<t.getPerimeter()<<endl;
cout<<"Area : "<<t.getArea()<<endl;
}break;
case 4:
{
float l,b;
cout<<"Enter Length and breadth\n";
cin>>l>>b;
Rectangle r("Rectangle","Blue",l,b);
r.getAttributes();
cout<<"Perimeter : "<<r.getPerimeter()<<endl;
cout<<"Area : "<<r.getArea()<<endl;
}break;
case 5:
{
Rhombus r("Rhombus","Purple");
r.getAttributes();
cout<<"Perimeter : "<<r.getPerimeter()<<endl;
cout<<"Area : "<<r.getArea()<<endl;
}break;
case 6:
{
float b,h;
cout<<"Enter base\n";
cin>>b;
cout<<"Enter height\n";
cin>>h;
Parallelogram p("Parallelogram","Pink",b,h);
p.getAttributes();
cout<<"Perimeter : "<<p.getPerimeter()<<endl;
cout<<"Area : "<<p.getArea()<<endl;
}break;
}
}
}
To learn more about objects and classes,
https://brainly.com/question/21113563
#SPJ4
Scale: 4 inches = 21 miles If the drawing length is 13 inches, what is the actual length?
Answer:
Step-by-step explanation:
do 21 ÷ 4 = 5.25
Now we have 5.25 miles for each inch. So all we have to do is multiply 5.25 by 13 to find the answer:
5.25 × 13 = 68.25
Let me know if this helped!
A classroom has seven blue chairs five green chairs 18 red chairs and yellow nine chairs if a chair is selected at random which color is the least likely to be chosen
Answer:
green
Step-by-step explanation:
green
Carmen made 6 identical necklaces, each having beads and a pendant. The total cost of the beads and pendants for all 6 necklaces was $31.80 . If the beads cost a total of $21.60, how much did each pendant cost?
Answer:
The answer is $1.70
Step-by-step explanation:
What I did is $31.80-21.60=$10.20. $10.20 is the amount of money for all 6 pendants, so to find how much 1 pendant is I just divided $10.20 by 6 which got me $1.70. Hope that helped you. :)