Consider the following equations. š“ = 2š„ šµ = 2 cos š„ , š¤āššš š„ šš 10° , 20° , 30° ⦠180° š¶ = ā š + 5 5 100 š=0 Construct a C++ program to calculate and print out the value of A, B and C by considering the following conditions; 1- User must keyed-in āstartā and āstopā to control the program. 2- Use function to display all the above equations. 3- If user keyed-in āfunction1ā, calculate the value of A divided by C for the value of x from 1 to 100. 4- If user keyed-in āfunction1ā, calculate the value of B divided by A for the value of x from 2 to 200.
Create an Investment class that contains fields to hold the initial value of an investment, theĀ
current value, the profit (calculated as the difference between current value and initial value),Ā
and the percent profit (the profit divided by the initial value). Include a constructor thatĀ
requires initial and current values and a display function.Ā
Create a House class that includes fields for street address and square meter, a constructorĀ
that requires values for both fields, and a display function.Ā
Create a HouseThatIsAnInvestment class that inherits from Investment and House. It includes aĀ
constructor and a display function that calls the display functions of the parents.Ā
Write a main() function that declares a HouseThatIsAnInvestment and displays its values.
Draw expression tree for the following arithematic expression.Draw diagram after each step clearly.No points will be given for diect answer.
Expression: 1 + 7 - 3 + 4 + 1 * 6 / 3 * 4
Note:
No code is required.
List the output of the following program segment. If an error is contained in the program,please mark and explain the error. For the rest of the program, assume that all lines with an error are removed from the program.
#include<iostream.h>
class Node{
public: double data
private: Node *next;
};
int main(void){
double *px,*py;
double x,y;
Node *p,*q,*r;
x=9.5;
y=-2.0;
px=8.6;
*px=10.0;
*x=*px;
x=*px;
py=&y;
p=new Node();q=new Node();r=new Node();
p->data=1.0;
q->data=2.0;
r->data=3.0;
p->next=q;
q->next=r;
r->next=p;
cout<<*px<<endl;
cout<<x<<endl;
cout<<*py<<endl;
cout<<q->next;
cout<<p->next->next->next->next->data<<endl;
delete q;
cout<<p->next->next->next->next->data<<endl;
return 0;
}
AnĀ eventsĀ ticketĀ bookingĀ SystemĀ promptsĀ theĀ userĀ toĀ makeĀ aĀ choiceĀ asĀ wellĀ asĀ theĀ numberĀ ofĀ ticketsĀ required.Ā ItĀ thenĀ displaysĀ theĀ totalĀ costĀ ofĀ theĀ order.Ā TheĀ menuĀ optionsĀ andĀ costĀ perĀ ticketĀ isĀ asĀ follows:Ā 1 Exclusive VIP area A : R3 000.00 2 VIP area B : R2 000.00 3 Elevated area :R1200.00 4 General area R600. 0 QUIT
Create an AVL tree with the following keys,clearly show visually each step.Each step wil contain a mark.
12,33,44,43,99,0,88,13,43,2,222
Convert the expression into postfix notation and then verify if it is correct or not,direct answers for both 5conversion are not allowed for verification take dummy values for eachvariable.
a+b*(c/d-e)%(f+g*h)-i
Note:
1)No code is required.