Answer:
<em>C++</em>
///////////////////////////////////////////////////////////////////////////////////////////
#include <iostream>
using namespace std;
//////////////////////////////////////////////////////////////////
class QuadraticEquation {
int a, b, c;
public:
QuadraticEquation(int a, int b, int c) {
this->a = a;
this->b = b;
this->c = c;
}
////////////////////////////////////////
int getA() {
return a;
}
int getB() {
return b;
}
int getC() {
return c;
}
////////////////////////////////////////
// returns the discriminant, which is b2-4ac
int getDiscriminant() {
return (b*2)-(4*a*c);
}
int getRoot1() {
if (getDiscriminant() < 0)
return 0;
else {
// Please specify how to calculate the two roots.
return 1;
}
}
int getRoot2() {
if (getDiscriminant() < 0)
return 0;
else {
// Please specify how to calculate the two roots.
return -1;
}
}
};
//////////////////////////////////////////////////////////////////
int main() {
return 0;
}
2 Consider the sequence of keys (5,16,22,45,2,10,18,30,50,12,1). Draw the result of inserting entries with these keys (in the gi
Juliette [100K]
Answer:
A) (2,4) tree
- Insertion of key 45 makes key unbalanced and this is because it violates the 2,4 tree so we split the node
- insertion of key 10 makes key unbalanced and this is because it violates the 2,4 tree so we split the node
B) Red-black tree
Explanation:
The diagrams for the solutions are attached showing the results of inserting entries
Computer Monitors are not storage devices.
Answer: Business analysis
Explanation:
Business analysis is the review of the sales, costs, and profit projections for a new product to find out whether these factors satisfy the company's objectives.
Based on the business analysis a company is able to set a marketing strategy for a better promotion of its products. So this step is particularly very important.
Answer:Event action
Explanation:Event-handling mechanism is the technique through which the the management of any event is Java is controlled and coordinated. The event handler code is used for the managing of the mechanism and execution.
Event action is not a part of the event handling mechanism in the java because no such step comes under the code of event handler and rest other option are present in java event handler.