<h2><u>
Answer:</u></h2>
relative.
<h2><u>
Explanation:</u></h2>
The coordinates for the section element need not be defined as long as its position is set to relative.
If the position is set as relative, then it will have no effect on the positioning attributes, it will consider as static position. If positioning is mentioned explicitly like top: 20px; then it will position 10 pixels down from where it is located. An ability for positional shifts is extremely helpful.
Two things happen when an element is set as relative, one is it introduces the ability to use z-index on that element, second is it limits the scope of absolutely positioned child elements.
Answer:
Code is completed below
Explanation:
Source Code in Java:
class Parenthesis
{
boolean hasBalancedParentheses(String eq) //method to check and return if a set of parenthesis is balanced or not
{
int count=0; //to store count of current unclosed opening brackets
for(int i=0;i<eq.length();i++)
{
if(eq.charAt(i)=='(')
count++;
else if(eq.charAt(i)==')')
count--;
if(count<0) //if count falls below zero, there were more closing brackets than opening brackets till this point
return false;
}
if(count>0) //if count is still more than zero, there were less closing brackets than opening brackets
return false;
return true; //if program reaches this point, it has passed all the tests
}
public static void main(String args[])
{
//testing the function
Parenthesis ob=new Parenthesis();
System.out.println(ob.hasBalancedParentheses("()(()())((())())"));
System.out.println(ob.hasBalancedParentheses(")((()())(()))())"));
}
}
Answer:
See explaination
Explanation:
#include <iostream>
using namespace std;
class Circle{
// private member variable named radius
private:
double radius;
// get function for radius
public:
double getRadius(){
return radius;
}
// set function for radius
void setRadius(double rad){
radius=rad;
}
// returning area = 3.14159 * radius * radius
double getArea(){
return (3.14159 * radius * radius);
}
};
// Sample run
int main()
{
// Declaring object of Circle
Circle myCircle;
myCircle.setRadius(5);
// printing radius of circle
cout<<"Radius of circle is: "<<(myCircle.getRadius())<<endl;
// printing area of circle
cout<<"Area of circle is: "<<(myCircle.getArea())<<endl;
return 0;
}
False. The clutch only exists in vehicles with manual transmissions.