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:
For a Know Simple query, a Fully Meets rating can be given if the result does not display the answer, but it is at the very top of the landing page.
B) False
Explanation:
- A know simple query is special form of a know query. The query which are intended to know something like what is the length of pitch of a cricket ground?
- A know simple query is such a know query that can be described in very little amount of words.
- A know simple query would only get the fully meet ratings if the result shown has the result in a special result block or it is shown upfront. You don't need to open a link to get the answer in such scenario.
I think it should be Java of package instead
Answer: Option(d) is correct option
Explanation:
At-will employment is the employment in contractual manner in which employer can fire employee without any warning or indication .They can fire employee for any cause .
- According to the question, even though Megan was hired at at-will employment base ,she does not persist much right over the company but she should not be dismissed for not performing illegal act as the reason for getting fired.This is a unfair and illegal manner of firing.
- Other options are incorrect because employer was not correct on firing her because of loyalty duty or based on legal right or with just reason.Thus, the correct option is option(d)