run a code with c++ and comments to explain and use binary search tree
when the tree leaf goes to the left side grows bigger and when the tree leaf goes into the right side grows smaller. The subject: Data Structure &algorithms specific Tree(BST)
write a programme that represent the object computer which has features such as Memory, storage, speed and brand. suggest at least one method in addition to to the constructor
Write a program that uses a structure to store the following data about a customer account:
· Name
· Address
· City
· Telephone Number
· Account Balance
With a function of withdrawMoney( float amountwithdraw) and depositMoney(float amountdeposit).
Implement a structure of car having car model, plate number, location, isParked (boolean type).
Car can move and park.
Move(): This function may update the location of car as it is moved.
Park(): This function added car details in the system and update is parked status.
Your program will also tell the parking managemt about the status of parking using isParked().
IsParked() : This function can find a car is it parked on not?
Write a class named
Student that has the following member variables:
• name. A string that holds the student ’s name.
• ID Number. An int variable that holds the student ’s ID number.
• major. A string that holds the name of the major of the student.
• Grade. A string that holds the student ’s grade.
The class should have the following member functions:
• get (): A member function that defined outside of the class, accepts the following values as arguments and assigns them to the appropriate member variables: student’s name, student’s ID number, major, and grade.
• put (): A member function that defined in side the class and display all the values as an output.
Write a C++ program that creates one object of Student class to hold the following data.
Name: Susan Meyers
ID Number: 47899
Major: MIS
Grade: A
The manager of the company has informed his assistant to enter the age
of all the workers working in production department. Among all he has to
find the employee with maximum age employee. Help the manager with
c++ program based on the concept of object oriented programming by
creating a class employee having members empid, empname, edept,eage
and display the name ,dept. and salary employee whose age is maximum.
Store the date of at least 7 employees. Make the data members of class
only public .
Constraints
Employee age should greater than 22 if constraints are not matched then
display "wrong age input
Look at the following code and identify what is wrong with it:
void multiply(int, int);
int main() {
std::cout << "The answer is: " << multiply(num1, num2);
}
void multiply(int a, int b) {
return a * b;
}
Prototype is missing variable names
Int parameters should be doubles
Void functions cannot return a value
Value-returning functions must be called in a statement that stores the returned value in a variable
This program will calculate the average(%) of exam grades.
It will also add extra credit points to the exam average given the course difficulty.
Enter all of the grades for one student. Type (-1) when finished with that student.
If you have additional students, you will be prompted to repeat the program at the end.
Enter an exam grade (type -1 to quit): user types: ten
Error: Grades must be an integer 0 or higher.
Enter an exam grade (type -1 to quit): user types: 100
Enter an exam grade (type -1 to quit): user types: 50
Enter an exam grade (type -1 to quit): user types: -1
Exam average, including extra credit, is: 78
The equivalent letter grade is: C
Would you like to enter grades for another student (Y or N)? user types: N
This program will calculate the average(%) of exam grades.
It will also add extra credit points to the exam average given the course difficulty.
Enter all of the grades for one student. Type (-1) when finished with that student.
If you have additional students, you will be prompted to repeat the program at the end.
Enter an exam grade (type -1 to quit): [user types: 100]
Enter an exam grade (type -1 to quit): [user types: 90]
Enter an exam grade (type -1 to quit): [user types: 80]
Enter an exam grade (type -1 to quit): [user types: -1]
Exam average, including extra credit, is: 93