Home / Expert Answers / Computer Science / write-a-python-code-nbsp-problem-1-you-will-implement-and-test-an-application-that-acts-as-ma-pa251

(Solved): Write a Python Code:  PROBLEM 1 You will implement and test an application that acts as ma ...



Write a Python Code: 

PROBLEM 1
You will implement and test an application that acts as main-memory database containing information about movies. A

7. IsBSTBalanced(): returns true if the tree is balanced and no otherwise. A tree is balanced if no twosuch leaf nodes differ

PROBLEM 1 You will implement and test an application that acts as main-memory database containing information about movies. All the records with movie information will be stored in a Binary Search tree container class. The insertion of each movie record will be based on the movie title. For simplicity we will assume movie titles consisting of either one word, or multiple words separated by a dash - . For example: Platoon, Alien, Titanic,. The following diagram illustrates a general level organization of a movies database for these three movies, when inserted in that order In reality, each node will not have simply the movie title, but a record that has the following information: 1. Movie Title 2. Cast (Actors will be stored in linked list (singly or doubly or circular up to you. You can use your previous linked list code) 3. Movie year of release 4. Duration of the movie (minutes) You will implement the following operations for the movie database application 1. Add movie - add a new movie record to the movie database. You cannot insert the movie which already exist in the list. 2. Delete movie - deletes a movie record from the movie database. 3. Add actor \( - \) add an actor in given movie cast 4. Find movie - finds the information record for a movie 5. Find actor - Prints all movies in which actor has worked 6. Print movies in order - prints all the movies in the list sorted order. 7. IsBSTBalanced(): returns true if the tree is balanced and no otherwise. A tree is balanced if no twosuch leaf nodes differ in distance from the root by more than one. 8. BalanceTree 0 - This function will take the already built BST (done in previous assignment) and convert it into a balanced BST 9. InsertMovie_Balanced 0 - Insert movie in BST but resultant BST should be balanced. IsBSTBalanced() should return true before executing this function. 10. DeleteMovie_BalancedO - Delete movie in BST but resultant BST should be balanced. IsBSTBalancedO should return true before executing this function.


We have an Answer from Expert

View Expert Answer

Expert Answer


The answer provided below has been developed in a clear step by step manner. Please do comment if any doubt in that, PLease do like it will encourage
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe