Implement a Linked List (LL) discussed above
including following operations.
◼ Insertion of node at any place in LL.
◼ Deletion of node at any place in LL
◼ Searching for a node at any place in LL
◼ Printing whole Linked List (LL)
◼ Checking emptiness of the LL
The manager of the Lakeview Hotel needs a program that evaluates and displays a guest's total bill. Each guest pays a room charge that is based on a per-night rate. For illustration if the per night rate is $100 and the guest stays two nights, the room charge is $200.Customer also can incur a one-time room service charge and a one-time telephone charge.
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